feat(providers): add routing support badges for Claude Code and Codex

Add visual indicators for routing capabilities on provider cards:
- Claude Code: "Needs Routing" badge for non-official providers with non-anthropic API formats
- Claude Code: "No Routing Support" badge for official providers
- Codex: "No Routing Support" badge for official providers

The badges help users understand which providers support format conversion through routing.
This commit is contained in:
Jason
2026-05-14 17:51:42 +08:00
parent 0d09555503
commit 940161fb0e
4 changed files with 48 additions and 0 deletions
+27
View File
@@ -334,6 +334,33 @@ export function ProviderCard({
</span>
)}
{appId === "claude" &&
provider.category !== "official" &&
provider.meta?.apiFormat &&
provider.meta.apiFormat !== "anthropic" && (
<span className="inline-flex items-center rounded-md bg-sky-100 px-1.5 py-0.5 text-[10px] font-semibold text-sky-700 dark:bg-sky-900/40 dark:text-sky-300">
{t("claudeCode.needsRouting", {
defaultValue: "需要路由",
})}
</span>
)}
{appId === "claude" && provider.category === "official" && (
<span className="inline-flex items-center rounded-md bg-slate-200 px-1.5 py-0.5 text-[10px] font-semibold text-slate-700 dark:bg-slate-700/60 dark:text-slate-200">
{t("claudeCode.noRoutingSupport", {
defaultValue: "不支持路由",
})}
</span>
)}
{appId === "codex" && provider.category === "official" && (
<span className="inline-flex items-center rounded-md bg-slate-200 px-1.5 py-0.5 text-[10px] font-semibold text-slate-700 dark:bg-slate-700/60 dark:text-slate-200">
{t("codex.noRoutingSupport", {
defaultValue: "不支持路由",
})}
</span>
)}
{isProxyRunning && isInFailoverQueue && health && (
<ProviderHealthBadge
consecutiveFailures={health.consecutive_failures}
+7
View File
@@ -173,6 +173,13 @@
}
}
},
"claudeCode": {
"needsRouting": "Needs Routing",
"noRoutingSupport": "No Routing Support"
},
"codex": {
"noRoutingSupport": "No Routing Support"
},
"claudeDesktop": {
"officialNotice": "Claude Desktop official providers use the built-in 1P sign-in. No API key or endpoint URL is required.",
"mode": "Model handling",
+7
View File
@@ -173,6 +173,13 @@
}
}
},
"claudeCode": {
"needsRouting": "ルーティングが必要",
"noRoutingSupport": "ルーティング非対応"
},
"codex": {
"noRoutingSupport": "ルーティング非対応"
},
"claudeDesktop": {
"officialNotice": "Claude Desktop の公式プロバイダーは内蔵の 1P サインインを使用します。API キーやエンドポイントの設定は不要です。",
"mode": "モデル処理方式",
+7
View File
@@ -173,6 +173,13 @@
}
}
},
"claudeCode": {
"needsRouting": "需要路由",
"noRoutingSupport": "不支持路由"
},
"codex": {
"noRoutingSupport": "不支持路由"
},
"claudeDesktop": {
"officialNotice": "Claude Desktop 官方供应商使用应用内置的 1P 登录,无需配置 API Key 和接口地址。",
"mode": "模型处理方式",