From 940161fb0e5033d2a994d1e93fa47acda8678773 Mon Sep 17 00:00:00 2001 From: Jason Date: Thu, 14 May 2026 17:51:42 +0800 Subject: [PATCH] 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. --- src/components/providers/ProviderCard.tsx | 27 +++++++++++++++++++++++ src/i18n/locales/en.json | 7 ++++++ src/i18n/locales/ja.json | 7 ++++++ src/i18n/locales/zh.json | 7 ++++++ 4 files changed, 48 insertions(+) diff --git a/src/components/providers/ProviderCard.tsx b/src/components/providers/ProviderCard.tsx index 00c057e88..859393dcd 100644 --- a/src/components/providers/ProviderCard.tsx +++ b/src/components/providers/ProviderCard.tsx @@ -334,6 +334,33 @@ export function ProviderCard({ )} + {appId === "claude" && + provider.category !== "official" && + provider.meta?.apiFormat && + provider.meta.apiFormat !== "anthropic" && ( + + {t("claudeCode.needsRouting", { + defaultValue: "需要路由", + })} + + )} + + {appId === "claude" && provider.category === "official" && ( + + {t("claudeCode.noRoutingSupport", { + defaultValue: "不支持路由", + })} + + )} + + {appId === "codex" && provider.category === "official" && ( + + {t("codex.noRoutingSupport", { + defaultValue: "不支持路由", + })} + + )} + {isProxyRunning && isInFailoverQueue && health && (