Model configuration changedmodel-config
Upstream edited this page at 11 Nov 2026 18:51 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 11 Nov 2026 19:07 UTC.
Upstream edited
Recorded here
Lines+13added
Lines−13removed
From line
164
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits93to this page, all time
The whole hunk
from line 164, old and new numbered
/
from line 164
164164
165165See [Model is not a recognized model id](https://code.claude.com/docs/en/errors.md#model-is-not-a-recognized-model-id) and [Model not found](https://code.claude.com/docs/en/errors.md#model-not-found) for the messages.
166166
167If you set the model with the `--model` flag, the `ANTHROPIC_MODEL` environment variable, or the `model` setting, Claude Code doesn't reject a mistyped value up front. The session starts, and the first request produces [There's an issue with the selected model](https://code.claude.com/docs/en/errors.md#theres-an-issue-with-the-selected-model). On the Anthropic API, a value that doesn't start with `claude-` and nearly spells a model name or alias can also produce a [startup warning that suggests it](#fix-a-mistyped-model-name).
167If you set the model with the `--model` flag, the `ANTHROPIC_MODEL` environment variable, or the `model` setting, Claude Code doesn't reject a mistyped value up front. The session starts, and the first request produces [There's an issue with the selected model](https://code.claude.com/docs/en/errors.md#theres-an-issue-with-the-selected-model). On the Anthropic API, you can see a [warning that suggests the closest name](#fix-a-mistyped-model-name) if the value nearly spells a model name or alias and doesn't start with `claude-`.
168168
169169When the requested model has a scheduled retirement date or is automatically remapped to a newer version, Claude Code shows a warning that names the requested model. Interactive sessions show it as a startup notice. From v2.1.182, the same warning is written to stderr in [non-interactive mode](https://code.claude.com/docs/en/headless.md) when using the default text output format. The check also covers a `model` set in [subagent frontmatter](https://code.claude.com/docs/en/sub-agents.md). The stderr warning is suppressed for `--output-format json` and `stream-json`; read the actual model from the `modelUsage` field of the [result message](https://code.claude.com/docs/en/headless.md#get-structured-output) instead.
170170
from line 191
191191}
192192```
193193
194#### Fix a mistyped model name
195
196Either of these warnings means Claude Code doesn't recognize the model ID you set, and the ID nearly spells a model name or alias it does recognize:
197
198```text theme={null}
199⚠ Model "<model>" isn't recognized · did you mean "<suggestion>"?
200Claude Code doesn't recognize the model "<model>". Did you mean "<suggestion>"?
201```
202
203* **You mistyped the ID**: change it to the suggestion [wherever you set the model](#setting-your-model)
204* **The ID is deliberate**: leave it as it is. The session sends it as you wrote it. If the context window Claude Code assumes for it is wrong, [correct the window](#correct-the-window-for-a-gateway-or-custom-model-id)
205
194206#### Set a default model for new sessions
195207
196208Set `ANTHROPIC_DEFAULT_MODEL=<alias|name>` to choose the model your sessions start on by default. Requires Claude Code v2.1.236 or later.
from line 914
902914* **Any other window**: set [`CLAUDE_CODE_MAX_CONTEXT_TOKENS`](https://code.claude.com/docs/en/env-vars) to the window size in tokens in the environment that starts Claude Code, such as `CLAUDE_CODE_MAX_CONTEXT_TOKENS=400000`. For an unrecognized ID that doesn't start with `claude-` and has no `[1m]` suffix, the variable takes effect on its own. For any other ID, check [which IDs it applies to](#which-ids-claude_code_max_context_tokens-applies-to) first.
903915
904916Once Claude Code recognizes the ID or uses the window you gave it, the warning no longer appears when you start a session on that ID.
905
906#### Fix a mistyped model name
907
908Either of these warnings means Claude Code doesn't recognize the model ID you set, and the ID nearly spells a model name or alias it does recognize:
909
910```text theme={null}
911⚠ Model "<model>" isn't recognized · did you mean "<suggestion>"?
912Claude Code doesn't recognize the model "<model>". Did you mean "<suggestion>"?
913```
914
915* **You mistyped the ID**: change it to the suggestion [wherever you set the model](#setting-your-model)
916* **The ID is deliberate**: leave it as it is. The session sends it as you wrote it. If the context window Claude Code assumes for it is wrong, [correct the window](#correct-the-window-for-a-gateway-or-custom-model-id)
917917
918918#### Which IDs `CLAUDE_CODE_MAX_CONTEXT_TOKENS` applies to
919919
No line in this hunk matches that.