mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
feat(ui): add Scaleway provider logo
Scaleway models are already supported server-side — they appear in `model_prices_and_context_window.json` with `litellm_provider: "scaleway"` and route correctly through the proxy. Only the dashboard was unaware of them, so every Scaleway model rendered with the generic grey letter fallback instead of a provider logo. This adds the missing entries in the three structures that the dashboard uses to resolve a logo (`Providers`, `provider_map`, `providerLogoMap`), each inserted at its alphabetical position, plus the logo asset. The SVG comes from Simple Icons (CC0) and is tinted with Scaleway's brand violet, so it sits consistently among the other coloured marks in the list.
This commit is contained in:
parent
30f33a949b
commit
cd18740cd9
3 changed files with 20 additions and 0 deletions
1
ui/litellm-dashboard/public/assets/logos/scaleway.svg
Normal file
1
ui/litellm-dashboard/public/assets/logos/scaleway.svg
Normal file
|
|
@ -0,0 +1 @@
|
|||
<svg fill="#4F0599" role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Scaleway</title><path d="M16.605 11.11v5.72a1.77 1.77 0 01-1.54 1.69h-4a1.43 1.43 0 01-1.31-1.22 1.09 1.09 0 010-.18 1.37 1.37 0 011.37-1.36h1.74a1 1 0 001-1v-3.62a1.4 1.4 0 011.18-1.39h.17a1.37 1.37 0 011.39 1.36zm-6.46 1.74V9.26a1 1 0 011-1h1.85a1.37 1.37 0 001.37-1.37 1 1 0 000-.17 1.45 1.45 0 00-1.41-1.2h-3.96a1.81 1.81 0 00-1.58 1.66v5.7a1.37 1.37 0 001.37 1.37h.21a1.4 1.4 0 001.15-1.4zm12-4.29V20a4.53 4.53 0 01-4.15 4h-7.58a8.57 8.57 0 01-8.56-8.57V4.54A4.54 4.54 0 016.395 0h7.18a8.56 8.56 0 018.56 8.56zm-2.74 0a5.83 5.83 0 00-5.82-5.82h-7.19a1.79 1.79 0 00-1.8 1.8v10.89a5.83 5.83 0 005.82 5.8h7.44a1.79 1.79 0 001.54-1.48z"/></svg>
|
||||
|
After Width: | Height: | Size: 738 B |
|
|
@ -73,6 +73,21 @@ describe("provider_info_helpers", () => {
|
|||
expect(fromEnumKey.logo).toBe(providerLogoMap[Providers.SCX_AI]);
|
||||
});
|
||||
|
||||
it("should map the scaleway slug and Scaleway enum key to the Scaleway display name and logo", () => {
|
||||
// The models table passes the litellm_provider slug the backend emits
|
||||
// ("scaleway"), while the Add Model dropdown passes the provider_map key
|
||||
// ("Scaleway"). Both must resolve, or Scaleway models fall back to the
|
||||
// grey letter placeholder.
|
||||
const fromSlug = getProviderLogoAndName("scaleway");
|
||||
expect(fromSlug.displayName).toBe(Providers.Scaleway);
|
||||
expect(fromSlug.logo).toBe(providerLogoMap[Providers.Scaleway]);
|
||||
expect(fromSlug.logo).toBeTruthy();
|
||||
|
||||
const fromEnumKey = getProviderLogoAndName("Scaleway");
|
||||
expect(fromEnumKey.displayName).toBe(Providers.Scaleway);
|
||||
expect(fromEnumKey.logo).toBe(providerLogoMap[Providers.Scaleway]);
|
||||
});
|
||||
|
||||
it("should map bedrock_mantle slug to Bedrock Mantle display name and logo", () => {
|
||||
const result = getProviderLogoAndName("bedrock_mantle");
|
||||
expect(result.displayName).toBe(Providers.BedrockMantle);
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import replicateLogo from "../../public/assets/logos/replicate.svg";
|
|||
import runwayLogo from "../../public/assets/logos/runway.png";
|
||||
import sambanovaLogo from "../../public/assets/logos/sambanova.svg";
|
||||
import sapLogo from "../../public/assets/logos/sap.png";
|
||||
import scalewayLogo from "../../public/assets/logos/scaleway.svg";
|
||||
import scxAiLogo from "../../public/assets/logos/scx_ai.svg";
|
||||
import snowflakeLogo from "../../public/assets/logos/snowflake.svg";
|
||||
import sonioxLogo from "../../public/assets/logos/soniox.svg";
|
||||
|
|
@ -159,6 +160,7 @@ export enum Providers {
|
|||
SAGEMAKER_LEGACY = "Sagemaker",
|
||||
Sambanova = "Sambanova",
|
||||
SAP = "SAP Generative AI Hub",
|
||||
Scaleway = "Scaleway",
|
||||
SCX_AI = "SCX.ai",
|
||||
Snowflake = "Snowflake",
|
||||
Soniox = "Soniox",
|
||||
|
|
@ -275,6 +277,7 @@ export const provider_map: Record<string, string> = {
|
|||
SageMaker: "sagemaker_chat",
|
||||
Sambanova: "sambanova",
|
||||
SAP: "sap",
|
||||
Scaleway: "scaleway",
|
||||
SCX_AI: "scx-ai",
|
||||
Snowflake: "snowflake",
|
||||
Soniox: "soniox",
|
||||
|
|
@ -372,6 +375,7 @@ export const providerLogoMap: Partial<Record<Providers, string>> = {
|
|||
[Providers.SAGEMAKER_LEGACY]: bedrockLogo.src,
|
||||
[Providers.Sambanova]: sambanovaLogo.src,
|
||||
[Providers.SAP]: sapLogo.src,
|
||||
[Providers.Scaleway]: scalewayLogo.src,
|
||||
[Providers.SCX_AI]: scxAiLogo.src,
|
||||
[Providers.Snowflake]: snowflakeLogo.src,
|
||||
[Providers.Soniox]: sonioxLogo.src,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue