Skip to content

Failover Does Not Update API Base URL When Switching Providers, Claude Code

Quick fix

Upgrade to 4.0 or the latest version and retry; failover forwards requests using the target provider's API URL and model mapping.

Error output
[Claude] >>> 请求 URL: https://token-plan-cn.xiaomimimo.com/anthropic/v1/messages?beta=true (model=glm-5.1)
English translation

[Claude] >>> Request URL: https://token-plan-cn.xiaomimimo.com/anthropic/v1/messages?beta=true (model=glm-5.1)

In the failover path in cc-switch 3.16.0, the proxy switched the model name and API Key but did not also switch the API Base URL. As a result, glm-5.1 requests for 智谱 were still sent to 小米's endpoint and returned 400. The maintainer said that 4.0 reworked local routing and failover: after a successful switch, it records only the new route, and each forwarded request reads the endpoint and model mapping for the target provider. The maintainer also asked the user to retest on the latest version.

  1. Upgrade to 4.0 or the latest version, then retest with the original 小米 primary/backup and 智谱 fallback configuration. If the endpoint and model still do not match, provide the version number and forwarding logs.

ToolClaude Code
Version3.16.0(受影响版本;维护者称 4.0 重做了相关路由与故障转移)
PlatformsmacOS
After upgrading, if the endpoint and model still do not match, what information should I provide?
Provide the cc-switch version number and forwarding logs.

This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.