Claude Code cannot call the model after configuration - CC Switch
Quick fix
Confirm cc-switch only rewrites config, then check the skip-first-install option, proxy and region restrictions, and upstream API compatibility.
Symptom
Section titled “Symptom”配置后无法正常工作,疑似正常包括以下之一:
- Base URL 域名/路径校验过严
- 细节工作流进行了硬编码假设(endpoint/path/header 或配置字段限制)Does not work after configuration; suspected normal causes include one of: - Base URL domain/path validation too strict - Hard-coded assumptions in the detailed workflow (endpoint/path/header, or config field restrictions)
This cluster holds three related but different Claude Code connection failures: 1) an Anthropic aggregation service such as ZenMux not working after configuring a custom Base URL + API key; 2) local tests working with a proxy on while calling the model in the terminal still reports the region unavailable; 3) routing an Ollama cloud model through the OpenAI-compatible protocol where ordinary questions work but tool calls fail. Maintainers explain cc-switch only helps configure — it works by editing config files and does not modify requests — so custom gateway, proxy, and model capability problems have to be investigated against the upstream service, the proxy environment, and Claude Code itself. For the terminal region-unavailable case, comments mention checking whether "skip first install confirmation" is enabled. For tool calls failing over OpenAI-compatible routing, the problem remains open with no confirmed fix.
Confirm what cc-switch does: it only edits Claude Code config files and does not proxy or rewrite the actual requests. If you use a third-party Anthropic-compatible gateway such as ZenMux, first confirm that service's Base URL, API key, endpoint, and headers are compatible with what Claude Code expects.
If a browser or local test works with a proxy/VPN while Claude Code in the terminal still reports the model unavailable in your region, check whether the system proxy and terminal proxy environment variables apply to Claude Code, and confirm the VPN/proxy node region can reach the model service.
Check whether 跳过初次安装确认 (skip first install confirmation) is enabled in cc-switch. Comments suggest that option can affect the first login/call flow.
If you connect an Ollama cloud or self-hosted gateway through the OpenAI-compatible protocol and ordinary questions work while tool calls fail, first confirm the upstream model/gateway supports the tools/tool_calls capability Claude Code needs. That problem has no confirmed fix — collect cc-switch debug logs, upstream logs, and a curl request, and file or follow the issue.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 3 real issues
- Does cc-switch proxy or modify my requests?
- No. Maintainers explain cc-switch only helps configure: it works by editing config files and does not modify requests. Custom Base URL, gateway compatibility, and upstream service problems need the provider or your upstream config checked.
- My proxy/VPN is on and local tests pass, but the Claude Code terminal still says the region is unavailable. What now?
- Confirm the terminal and Claude Code actually go through the proxy, not just your browser or local test tool. Also check whether 跳过初次安装确认 (skip first install confirmation) is enabled in cc-switch, and that the proxy node region can call the model.
- An Anthropic aggregation service like ZenMux does not work. Does cc-switch not support it?
- The issues do not confirm cc-switch lacks support. Maintainers say cc-switch only edits config files and does not modify requests, so confirm the Base URL / API key / endpoint behaviour ZenMux provides is compatible with Claude Code, or ask ZenMux support.
- Ordinary questions work but tool calls fail routing Ollama cloud over OpenAI-compatible. Is there a fix?
- Still open in the cluster with no confirmed fix. Check whether upstream supports tools/tool_calls, and provide cc-switch debug logs, Ollama logs, and a curl capture to help pin it down.
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.