ANTHROPIC_DEFAULT_SONNET_MODEL not taking effect: Claude Code
Quick fix
In CC Switch local proxy mode, set the target model in ANTHROPIC_DEFAULT_SONNET_MODEL; the proxy maps this field, not *_MODEL_NAME.
Symptom
Section titled “Symptom”"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6"The CC Switch proxy reads `ANTHROPIC_DEFAULT_SONNET_MODEL` and other `*_MODEL` fields for model mapping. It does not read the corresponding `*_MODEL_NAME` fields. The name shown in the interface may be `DeepSeek-V4-Flash`, while the actual request model written to the configuration may still be `claude-sonnet-4-6`, so the proxy forwards the latter. In issue #3565, a user reported accurate mapping after opening the CC Switch terminal; the maintainer later explained that the interface and configuration-writing behavior had changed significantly in v4.0, then closed the issue.
Check the `ANTHROPIC_DEFAULT_SONNET_MODEL` value for the corresponding model in `~/.claude/settings.json`; the local proxy maps this field.
Write the target model ID to `ANTHROPIC_DEFAULT_SONNET_MODEL`; do not only change `ANTHROPIC_DEFAULT_SONNET_MODEL_NAME`.
If the problem persists after using CC Switch v4.0, follow the maintainer's suggestion to report it again with the version and reproduction steps.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 2 real issues
- Why is the model in `ANTHROPIC_DEFAULT_SONNET_MODEL_NAME` a DeepSeek model, while proxy requests still use a Claude model?
- The proxy maps using `ANTHROPIC_DEFAULT_SONNET_MODEL` and does not read the `_NAME` field. Check and set the field for the actual request model.
- What should I do if the problem persists after upgrading to v4.0?
- The maintainer recommends reporting it again with the version and reproduction steps.
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.