Skip to content

Config error: Claude Provider is missing base_url configuration - Claude Code

Quick fix

Turn cc-switch local proxy takeover off and run /logout then /login in the terminal, or upgrade past v3.14.0.

Error output
API Error: 400 {"error":{"message":"配置错误: Claude Provider 缺少 base_url 配置","type":"proxy_error"}}
English translation

API Error: 400 {"error":{"message":"config error: Claude Provider is missing base_url configuration","type":"proxy_error"}}

With 本地代理接管 (local proxy takeover) enabled in cc-switch and the provider switched to the official one (Claude Official), requests are forwarded through the local proxy. Because the official provider signs in with OAuth and has no base_url configured, the proxy forwarding layer cannot find a target address when making the actual request and reports a 400.

Reaching the official API through a local proxy also carries a high account ban risk, so an official account and local proxy takeover are not designed to be used together. From v3.14.0 on, cc-switch blocks switching to an official provider outright while the local proxy is on, to avoid this.

  1. Turn 本地代理接管 (Local Routing) off in cc-switch.

  2. Run /logout in the Claude Code terminal to sign out.

  3. Run /login in the terminal to sign in again with your official account.

  4. Upgrade cc-switch to v3.14.0 or newer. That version disables switching to an official provider while the proxy is on and gives a clear notice, preventing the mistake.

ToolClaude Code
Version3.10.2 - 3.13.0
PlatformsWindows
Why does it still error after turning the cc-switch local proxy off?
The config state may not have fully refreshed after turning the proxy off. Run /logout and /login once in the Claude Code terminal to sign back into your official account and it returns to normal.
Why does cc-switch not support the local proxy with an official account?
That is deliberate. Routing official API traffic through a local proxy looks like forwarding to the provider and carries a high account ban risk. Local proxy takeover has to be off when using an official account.

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.