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.
Symptom
Section titled “Symptom”API Error: 400 {"error":{"message":"配置错误: Claude Provider 缺少 base_url 配置","type":"proxy_error"}}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.
Turn 本地代理接管 (Local Routing) off in cc-switch.
Run /logout in the Claude Code terminal to sign out.
Run /login in the terminal to sign in again with your official account.
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.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- 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.
Related problems
Section titled “Related problems”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.