@@ -33,49 +33,107 @@ export function getProviderInitial(provider: string): string {
3333 return provider . charAt ( 0 ) . toUpperCase ( ) ;
3434}
3535
36+ const LOBEHUB_CDN = "https://cdn.jsdelivr.net/npm/@lobehub/icons-static-svg@latest/icons" ;
37+ const LITELLM_LOGOS = "https://raw.githubusercontent.com/BerriAI/litellm/main/ui/litellm-dashboard/public/assets/logos" ;
38+
3639/**
37- * Get the logo URL for a provider from the LiteLLM GitHub repository
38- * Returns null if no logo is available for the provider
40+ * Get the logo URL for a provider.
41+ * Uses LobeHub icon CDN for most providers, falls back to LiteLLM repo for a few.
42+ * Returns null if no logo is available.
3943 */
4044export function getProviderLogo ( provider : string ) : string | null {
4145 if ( ! provider ) return null ;
42-
43- // Map provider names to their logo filenames in the LiteLLM repo (actual files from GitHub)
44- const providerLogoMap : { [ key : string ] : string } = {
45- "openai" : "openai_small.svg" ,
46- "azure" : "microsoft_azure.svg" ,
46+
47+ const lobehubMap : { [ key : string ] : string } = {
48+ "openai" : "openai.svg" ,
49+ "azure" : "azure.svg" ,
50+ "azure_ai" : "azureai.svg" ,
51+ "azure_text" : "azure.svg" ,
4752 "anthropic" : "anthropic.svg" ,
4853 "bedrock" : "bedrock.svg" ,
54+ "bedrock_converse" : "bedrock.svg" ,
4955 "vertex_ai" : "google.svg" ,
5056 "vertexai" : "google.svg" ,
5157 "cohere" : "cohere.svg" ,
58+ "cohere_chat" : "cohere.svg" ,
5259 "groq" : "groq.svg" ,
5360 "mistral" : "mistral.svg" ,
54- "deepinfra" : "deepinfra.png" ,
55- "databricks" : "databricks.svg" ,
61+ "deepinfra" : "deepinfra.svg" ,
5662 "fireworks_ai" : "fireworks.svg" ,
5763 "fireworks" : "fireworks.svg" ,
5864 "ollama" : "ollama.svg" ,
5965 "openrouter" : "openrouter.svg" ,
6066 "deepseek" : "deepseek.svg" ,
6167 "cerebras" : "cerebras.svg" ,
62- "oracle" : "oracle.svg" ,
63- "text-completion-openai" : "openai_small.svg" ,
68+ "text-completion-openai" : "openai.svg" ,
6469 "text-completion-codestral" : "mistral.svg" ,
6570 "codestral" : "mistral.svg" ,
6671 "sagemaker" : "aws.svg" ,
6772 "aws" : "aws.svg" ,
73+ "aws_polly" : "aws.svg" ,
6874 "google" : "google.svg" ,
6975 "gemini" : "google.svg" ,
76+ "google_pse" : "google.svg" ,
77+ "palm" : "palm.svg" ,
78+ "ai21" : "ai21.svg" ,
79+ "aleph_alpha" : "alephalpha.svg" ,
80+ "anyscale" : "anyscale.svg" ,
81+ "assemblyai" : "assemblyai.svg" ,
82+ "cloudflare" : "cloudflare.svg" ,
83+ "elevenlabs" : "elevenlabs.svg" ,
84+ "exa_ai" : "exa.svg" ,
85+ "fal_ai" : "fal.svg" ,
86+ "featherless_ai" : "featherless.svg" ,
87+ "friendliai" : "friendli.svg" ,
88+ "github_copilot" : "githubcopilot.svg" ,
89+ "huggingface" : "huggingface.svg" ,
90+ "hyperbolic" : "hyperbolic.svg" ,
91+ "jina_ai" : "jina.svg" ,
92+ "lambda_ai" : "lambda.svg" ,
93+ "meta_llama" : "meta.svg" ,
94+ "minimax" : "minimax.svg" ,
95+ "moonshot" : "moonshot.svg" ,
96+ "morph" : "morph.svg" ,
97+ "novita" : "novita.svg" ,
98+ "nvidia_nim" : "nvidia.svg" ,
99+ "perplexity" : "perplexity.svg" ,
100+ "recraft" : "recraft.svg" ,
101+ "replicate" : "replicate.svg" ,
102+ "runwayml" : "runway.svg" ,
103+ "sambanova" : "sambanova.svg" ,
104+ "snowflake" : "snowflake.svg" ,
105+ "stability" : "stability.svg" ,
106+ "tavily" : "tavily.svg" ,
107+ "together_ai" : "together.svg" ,
108+ "v0" : "v0.svg" ,
109+ "vercel_ai_gateway" : "vercel.svg" ,
110+ "volcengine" : "volcengine.svg" ,
111+ "voyage" : "voyage.svg" ,
112+ "watsonx" : "ibm.svg" ,
113+ "xai" : "xai.svg" ,
114+ "zai" : "zai.svg" ,
115+ "amazon_nova" : "nova.svg" ,
116+ "chatgpt" : "openai.svg" ,
117+ "dashscope" : "alibaba.svg" ,
118+ } ;
119+
120+ const litellmMap : { [ key : string ] : string } = {
121+ "databricks" : "databricks.svg" ,
122+ "oracle" : "oracle.svg" ,
70123 } ;
71124
72125 const lowerProvider = provider . toLowerCase ( ) ;
73- const logoFilename = providerLogoMap [ lowerProvider ] ;
74-
75- if ( logoFilename ) {
76- return `https://raw.githubusercontent.com/BerriAI/litellm/main/ui/litellm-dashboard/public/assets/logos/ ${ logoFilename } ` ;
126+
127+ const lobeFile = lobehubMap [ lowerProvider ] ;
128+ if ( lobeFile ) {
129+ return `${ LOBEHUB_CDN } / ${ lobeFile } ` ;
77130 }
78-
131+
132+ const litellmFile = litellmMap [ lowerProvider ] ;
133+ if ( litellmFile ) {
134+ return `${ LITELLM_LOGOS } /${ litellmFile } ` ;
135+ }
136+
79137 return null ;
80138}
81139
0 commit comments