Skip to content

deepseek接入 模型勾选了1m, but the Claude Code model picker has no 1M context option

Quick fix

Upgrade cc-switch to v3.17.0+, leave the DeepSeek provider's ANTHROPIC_MODEL empty or check 1M there too, fill only Haiku/Sonnet/Opus mappings… (Claude Code)

Error output
deepseek接入 模型勾选了1m,但是在claudecode里模型选择里没有1m上下文的选项。
English translation

Connected DeepSeek and checked 1M for the model, but the Claude Code model picker has no 1M context option.

The root cause is Claude Code's priority when selecting the main model: it first reads the CLI --model flag; if absent, it reads ANTHROPIC_MODEL directly (the "default fallback model" field in the cc-switch form). If a value is found, it is used and the role aliases ANTHROPIC_DEFAULT_OPUS_MODEL / SONNET / HAIKU are ignored; the role mappings only take effect when you actively select via /model. Older cc-switch versions only offered the "declares 1M support" checkbox on the Sonnet/Opus/Haiku rows, not next to the fallback field. When users checked only the role rows, the fallback field carried no [1m] suffix and overrode the role-row settings, so 1M was not enabled, the model picker showed no 1M option, and /context still displayed a 200K denominator. This UI defect was fixed in v3.17.0 (PR #5124, originating from PR #3680): the fallback field gained a 1M checkbox (matching is case-insensitive; the Claude Code source uses /\[1m\]/i, so the "uppercase [1M] not recognized" report in #3679 was later confirmed to be a misdiagnosis). A related variant appears when CCS local routing/proxy is enabled: the provider's model field is then treated by CCS as the real upstream API model value in mapping (src-tauri/src/proxy/model_mapper.rs writes it directly back into the request body, with no normalizeModelStringForAPI()-style suffix stripping like Claude Code has). If the model field is set to deepseek-v4-pro[1m], CCS forwards [1m] verbatim to DeepSeek; DeepSeek decides it is not a canonical model name and falls back to deepseek-v4-flash. The CCS stats page then shows a "deepseek-v4-pro -> deepseek-v4-flash" record (left is the requested model, right is the actual model declared in the upstream response). Additionally, #2780 reported a variant: with ANTHROPIC_MODEL=deepseek-v4-pro[1m] configured and the proxy disabled, Claude Code's implicit haiku/flash sub-calls are missing from cc-switch usage statistics; comments note this is a sub-agent stats issue when the proxy is off, and enabling the Proxy avoids the missed records.

  1. Upgrade cc-switch to v3.17.0 or newer (in older forms the "default fallback model" field has no 1M checkbox and will override the 1M settings on the role rows).

  2. If CCS local routing/proxy is enabled: leave main model / ANTHROPIC_MODEL / Default model empty, and fill all three rows Haiku, Sonnet, Opus with deepseek-v4-pro (do not add the [1m] suffix). When left empty, Claude Code uses its own default Opus/Sonnet presets that support 1M, and CCS maps the model family to the real DeepSeek model name.

  3. Equivalently, directly inspect the configuration written to Claude Code and make sure there is no fixed ANTHROPIC_MODEL, keeping only the model-family mappings:

    // ~/.claude/settings.json(由 cc-switch 写入的 env 块)
    {
    "env": {
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4-pro",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4-pro"
    }
    }
  4. If local routing/proxy is not enabled (CCS only writes config and does not take over forwarding): you can use [1m] per Claude Code client syntax. Set main model to deepseek-v4-pro[1m], Haiku to deepseek-v4-pro[1m], and Sonnet/Opus to deepseek-v4-pro (adding [1m] there too is not recommended, or /model may show a duplicated suffix like deepseek-v4-pro[1m][1m]).

  5. Restart Claude Code (a real restart is required to re-read settings.json), confirm with /context that the denominator becomes 1M tokens, and confirm with /model that a 1M context option appears; if the current model does not automatically land on a 1M-capable preset, switch manually via /model.

ToolClaude Code
Versioncc-switch 3.14.1 - 3.16.x 受影响(兜底字段无 1M 勾选框),v3.17.0 起修复
PlatformsmacOSWindows
I checked 1M, so why does /context still show 200K tokens?
Because Claude Code reads ANTHROPIC_MODEL (the default fallback model) first, and its priority is higher than the Sonnet/Opus/Haiku role aliases. In older cc-switch versions the fallback field had no 1M checkbox, so checking only the role rows had no effect. After upgrading to v3.17.0+, also check 1M on the fallback field, or simply leave the fallback field empty, then restart Claude Code and verify again.
Why does the model automatically switch to v4 flash after I type /context?
This usually means CCS local routing is enabled and the model field contains deepseek-v4-pro[1m]: CCS treats [1m] as part of the upstream model name and forwards it verbatim; DeepSeek decides deepseek-v4-pro[1m] is not a canonical model name and falls back to deepseek-v4-flash. In local routing mode, remove the [1m] suffix and keep only deepseek-v4-pro.
Is the "deepseek-v4-pro -> deepseek-v4-flash" entry on the CCS stats page a stats error?
No. The left side is the model in the request body entering the CCS proxy; the right side is the actual model declared in the DeepSeek upstream response. This record means the proxy did send the string with [1m] to DeepSeek, DeepSeek fell back to flash, and the stats page faithfully recorded the difference.
Is there a difference between uppercase [1M] and lowercase [1m]?
No. The Claude Code source matches with /\[1m\]/i, which is case-insensitive, so uppercase is correctly recognized and stripped. The "uppercase doesn't work" claim originally reported in #3679 was acknowledged by the reporter himself as a misdiagnosis (Claude Code had not actually been restarted to re-read the config at the time).
Why do I keep getting model not found when the context contains images?
deepseek-v4-pro is a text-only model; for contexts containing images, Claude Code misreports this as model not found instead of unsupported image. Switching to a vision-capable model (one user verified mimo-v2.5 works) resolves it.

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.