diff --git a/public/providers/anthropic.png b/public/providers/anthropic.png new file mode 100644 index 00000000..a3c374d3 Binary files /dev/null and b/public/providers/anthropic.png differ diff --git a/public/providers/gemini.png b/public/providers/gemini.png new file mode 100644 index 00000000..f687493c Binary files /dev/null and b/public/providers/gemini.png differ diff --git a/public/providers/glm.png b/public/providers/glm.png new file mode 100644 index 00000000..22956015 Binary files /dev/null and b/public/providers/glm.png differ diff --git a/public/providers/kimi.png b/public/providers/kimi.png new file mode 100644 index 00000000..f060fe43 Binary files /dev/null and b/public/providers/kimi.png differ diff --git a/public/providers/minimax.png b/public/providers/minimax.png new file mode 100644 index 00000000..ac198eaf Binary files /dev/null and b/public/providers/minimax.png differ diff --git a/public/providers/oai-cc.png b/public/providers/oai-cc.png new file mode 100644 index 00000000..47a08283 Binary files /dev/null and b/public/providers/oai-cc.png differ diff --git a/public/providers/oai-r.png b/public/providers/oai-r.png new file mode 100644 index 00000000..9c192c15 Binary files /dev/null and b/public/providers/oai-r.png differ diff --git a/public/providers/openai.png b/public/providers/openai.png new file mode 100644 index 00000000..9ddf6a0b Binary files /dev/null and b/public/providers/openai.png differ diff --git a/public/providers/openrouter.png b/public/providers/openrouter.png new file mode 100644 index 00000000..76ad989e Binary files /dev/null and b/public/providers/openrouter.png differ diff --git a/src/app/(dashboard)/dashboard/providers/[id]/page.js b/src/app/(dashboard)/dashboard/providers/[id]/page.js index 9ab80424..2af51c17 100644 --- a/src/app/(dashboard)/dashboard/providers/[id]/page.js +++ b/src/app/(dashboard)/dashboard/providers/[id]/page.js @@ -23,6 +23,7 @@ export default function ProviderDetailPage() { const [showEditNodeModal, setShowEditNodeModal] = useState(false); const [selectedConnection, setSelectedConnection] = useState(null); const [modelAliases, setModelAliases] = useState({}); + const [headerImgError, setHeaderImgError] = useState(false); const { copied, copy } = useCopyToClipboard(); const providerInfo = providerNode @@ -298,7 +299,7 @@ export default function ProviderDetailPage() { ); - } +} if (!providerInfo) { return ( @@ -311,6 +312,14 @@ export default function ProviderDetailPage() { ); } + // Determine icon path: OpenAI Compatible providers use specialized icons + const getHeaderIconPath = () => { + if (isOpenAICompatible && providerInfo.apiType) { + return providerInfo.apiType === "responses" ? "/providers/oai-r.png" : "/providers/oai-cc.png"; + } + return `/providers/${providerInfo.id}.png`; + }; + return (
{/* Header */} @@ -327,19 +336,19 @@ export default function ProviderDetailPage() { className="rounded-lg flex items-center justify-center" style={{ backgroundColor: `${providerInfo.color}15` }} > - {providerInfo.textIcon ? ( + {headerImgError ? ( - {providerInfo.textIcon} + {providerInfo.textIcon || providerInfo.id.slice(0, 2).toUpperCase()} ) : ( {providerInfo.name} { e.currentTarget.style.display = "none"; }} + onError={() => setHeaderImgError(true)} /> )}
diff --git a/src/app/(dashboard)/dashboard/providers/page.js b/src/app/(dashboard)/dashboard/providers/page.js index 2f7435d0..648b4c54 100644 --- a/src/app/(dashboard)/dashboard/providers/page.js +++ b/src/app/(dashboard)/dashboard/providers/page.js @@ -233,10 +233,19 @@ ProviderCard.propTypes = { }).isRequired, }; -// API Key providers - only use textIcon, no image +// API Key providers - use image with textIcon fallback (same as OAuth providers) function ApiKeyProviderCard({ providerId, provider, stats }) { const { connected, error, errorCode, errorTime } = stats; const isCompatible = providerId.startsWith(OPENAI_COMPATIBLE_PREFIX); + const [imgError, setImgError] = useState(false); + + // Determine icon path: OpenAI Compatible providers use specialized icons + const getIconPath = () => { + if (isCompatible) { + return provider.apiType === "responses" ? "/providers/oai-r.png" : "/providers/oai-cc.png"; + } + return `/providers/${provider.id}.png`; + }; return ( @@ -247,12 +256,24 @@ function ApiKeyProviderCard({ providerId, provider, stats }) { className="size-8 rounded-lg flex items-center justify-center" style={{ backgroundColor: `${provider.color}15` }} > - - {provider.textIcon || provider.id.slice(0, 2).toUpperCase()} - + {imgError ? ( + + {provider.textIcon || provider.id.slice(0, 2).toUpperCase()} + + ) : ( + {provider.name} setImgError(true)} + /> + )}

{provider.name}