mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-27 08:32:32 +08:00
fix: allow provider switch without proxy, show warning instead of blocking
Remove the hard block that prevented switching to providers requiring proxy (OpenAI format, Copilot, full URL mode) when the proxy is not running. Now the switch proceeds with a warning toast. Also deduplicate the proxy hint info toast so it doesn't appear alongside the warning.
This commit is contained in:
@@ -183,7 +183,6 @@ export function useProviderActions(activeApp: AppId, isProxyRunning?: boolean) {
|
||||
"此供应商{{reason}},需要代理服务才能正常使用,请先启动代理",
|
||||
}),
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -203,13 +202,14 @@ export function useProviderActions(activeApp: AppId, isProxyRunning?: boolean) {
|
||||
|
||||
// 根据供应商类型显示不同的成功提示
|
||||
if (
|
||||
!proxyRequiredReason &&
|
||||
activeApp === "claude" &&
|
||||
provider.category !== "official" &&
|
||||
(isCopilotProvider ||
|
||||
provider.meta?.apiFormat === "openai_chat" ||
|
||||
provider.meta?.apiFormat === "openai_responses")
|
||||
) {
|
||||
// OpenAI format provider: show proxy hint
|
||||
// OpenAI format provider: show proxy hint (skip if warning already shown)
|
||||
toast.info(
|
||||
isCopilotProvider
|
||||
? t("notifications.copilotProxyHint")
|
||||
|
||||
Reference in New Issue
Block a user