model field is still overridden — Claude Code proxy takeover
Quick fix
Update to the latest CC Switch 4.0 release and retry. If it persists, temporarily remove the model fields from settings.json and report the result.
Symptom
Section titled “Symptom”BASE_URL 已指向代理,但 model 字段仍被覆盖BASE_URL already points to the proxy, but the model field is still overridden.
In the reported 3.16.x versions, the proxy takeover write path still wrote fields such as `ANTHROPIC_DEFAULT_HAIKU/SONNET/OPUS_MODEL` to Claude Code's `~/.claude/settings.json`; the direct-connection path also wrote these fields unconditionally. This duplicated the mechanism that already mapped upstream models inside the proxy through `model_mapper.rs`, causing the configuration file to change with the preset when switching providers and potentially exposing provider-specific differences such as `[1M]`.
The issue was closed because it timed out without new reproduction details, not because a fix was confirmed. The maintainer said 4.0 substantially refactored the relevant functionality and recommended retrying with the latest version, but the thread contains no post-upgrade verification result.
Update CC Switch to the latest 4.0 release, then re-enable proxy takeover, switch providers, and check whether the model fields are still written back.
If upgrading is not currently possible, remove all `*_MODEL` and `*_MODEL_NAME` fields from the Claude Code configuration, leaving only the proxy address and the `PROXY_MANAGED` token. This is a temporary workaround; the fields may be written back the next time providers are switched through the UI.
~/.claude/settings.json "env": {"ANTHROPIC_AUTH_TOKEN": "PROXY_MANAGED","ANTHROPIC_BASE_URL": "http://127.0.0.1:15721","ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5","ANTHROPIC_DEFAULT_HAIKU_MODEL_NAME": "glm-5-turbo","ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8[1M]","ANTHROPIC_DEFAULT_OPUS_MODEL_NAME": "glm-5.2","ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6[1M]","ANTHROPIC_DEFAULT_SONNET_MODEL_NAME": "glm-5.2"}If the problem persists in the latest version, reopen the issue with the CC Switch version, operating system, complete reproduction steps, and relevant logs or screenshots.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
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.