Skip to content

"There's an issue with the selected model" claude-code error

Quick fix

Upgrade cc-switch to v3.13.0+ for the environment variable sync fix, and use the alias mapping variables to override the default model.

Error output
There's an issue with the selected model

In cc-switch versions before v3.13.0, takeover mode or local routing wrote only the proxy URL and token into settings.json without syncing ANTHROPIC_MODEL, so the model fell back or OpenCode generated a wrong config. Separately, Claude Code's own logic treats ANTHROPIC_MODEL as the startup main model only: when it requests an alias such as sonnet internally, it reads mapping variables such as ANTHROPIC_DEFAULT_SONNET_MODEL first. So configuring ANTHROPIC_MODEL alone cannot change which model an alias request actually reaches.

  1. Upgrade cc-switch to v3.13.0 or newer, fixing ANTHROPIC_MODEL being lost in takeover mode and the wrong config being generated.

  2. To change which model a Claude Code alias request actually reaches, set the matching alias mapping environment variable explicitly in the provider config.

    ~/.ccs/claude.settings.json
    {
    "env": {
    "ANTHROPIC_MODEL": "claude-opus-4-6",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "your-custom-sonnet-model",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "your-custom-opus-model"
    }
    }
Toolclaude-code
Versioncc-switch < 3.13.0 (已在 v3.13.0 修复)
PlatformsWindowsmacOSLinux
I changed ANTHROPIC_MODEL — why does Claude Code still call Sonnet by default?
Because when Claude Code requests an alias (sonnet/opus/haiku) it prefers alias mapping variables such as ANTHROPIC_DEFAULT_SONNET_MODEL. ANTHROPIC_MODEL only names the startup main model and cannot override the alias mapping case.
With routing on, switching model with /model inside Claude Code does not update the model field on the cc-switch provider page. Why?
A known experience problem with cc-switch UI sync: in routing mode, a switch inside Claude Code is not synced back into the cc-switch provider JSON config. Change the config in the cc-switch UI directly.

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.