Model configuration changedmodel-config
Upstream edited this page at 29 Nov 2026 00:04 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 29 Nov 2026 00:07 UTC.
Upstream edited
Recorded here
Lines+6added
Lines−6removed
From line
136
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits125to this page, all time
The whole hunk
from line 136, old and new numbered
/
from line 136
136136
137137If you switch models with `/model`, the switch also reaches [subagents that inherit the main conversation's model](https://code.claude.com/docs/en/sub-agents.md#choose-a-model), because Claude Code resolves their model from the one your session is using when Claude starts them. Switch to Opus before Claude delegates research or test runs to one of them, and that work runs on Opus too. To keep a custom subagent on a smaller model, set `model` in its definition.
138138
139If you set a model with `/model` in [non-interactive mode](https://code.claude.com/docs/en/headless.md), with the `-p` flag, your choice applies to the current session only and isn't saved as your default. `/model` in that mode requires Claude Code v2.1.205 or later.
139If you set a model with `/model` in [non-interactive mode](https://code.claude.com/docs/en/headless.md), with the `-p` flag, your choice applies to the current session only. `/model` in that mode requires Claude Code v2.1.205 or later.
140140
141141In v2.1.144 through v2.1.152, `/model` applied to the current session only and `d` in the picker saved a default.
142142
from line 277
277277
278278The substitution needs a permitted version to land on: when the allowlist permits no version of the alias's family, the alias follows the rejection and replacement behavior below like any other blocked value.
279279
280Claude Code handles any other blocked selection according to where the model was set:
280When a selection stays blocked, Claude Code handles it according to where the model was set:
281281
282282* **`/model`**: Claude Code rejects the switch with an error
283283* **`--model` flag, `ANTHROPIC_MODEL`, or the `model` setting**: Claude Code replaces the value at startup with a warning naming both the requested and substituted models, and the session starts on the default model
from line 295
295295Claude Code hides excluded models from the `/model` picker. Whether a model ID you list also gets a row of its own differs by provider:
296296
297297* **Anthropic API, [Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws.md), [Claude apps gateway](https://code.claude.com/docs/en/claude-apps-gateway), or an [LLM gateway](https://code.claude.com/docs/en/llm-gateway) set through `ANTHROPIC_BASE_URL`**: an Anthropic model ID you list that has no built-in picker row appears as its own labeled row. Claude Code adds such a row for Opus, Sonnet, and Haiku versions, such as an older version that the list pins. If you set `replaceBuiltInOptions` in a [`modelPicker`](https://code.claude.com/docs/en/settings-reference#modelpicker) lineup, that row doesn't appear. Before v2.1.199, such an ID was selectable only by typing `/model <id>`.
298* **Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry**: unless a model ID you list starts with `anthropic.`, Claude Code doesn't add a row for it, whether it's an Anthropic model ID or a provider-specific one. [Mantle model IDs](#mantle-model-ids) carry that prefix. To show a listed version that has no built-in row, also add it to a [`modelPicker`](https://code.claude.com/docs/en/settings-reference#modelpicker) lineup, which accepts IDs in your provider's format.
298* **Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry**: unless a model ID you list starts with `anthropic.`, Claude Code doesn't add a row for it. [Mantle model IDs](#mantle-model-ids) carry that prefix. To show a listed version that has no built-in row, also add it to a [`modelPicker`](https://code.claude.com/docs/en/settings-reference#modelpicker) lineup, which accepts IDs in your provider's format.
299299
300Model changes that Claude Code makes on your behalf are checked the same way:
300When Claude Code changes models on your behalf, it avoids excluded models in most of these cases:
301301
302302* **[Fallback model chains](#fallback-model-chains)**: entries outside the allowlist are dropped
303303* **Plan-mode upgrades**: on the Anthropic API and Claude Platform on AWS, an upgrade such as [`opusplan`](#opusplan-model-setting) to an excluded model uses the newest permitted version of the upgrade family. On providers with provider-specific model IDs, and when no version is permitted, the upgrade is skipped and planning continues on the session's model
from line 1078
10781078* **Recognized**: the exact ID of a model Claude Code knows, such as its Anthropic API ID or your provider's or gateway's form of it, with or without the `[1m]` suffix. Pin `us.anthropic.claude-sonnet-4-5-20250929-v1:0` and the row reads `Sonnet 4.5`.
10791079* **Not recognized**: any other ID, such as an application inference profile ARN or a model version Claude Code doesn't know, unless a [`modelOverrides`](#override-model-ids-per-version) entry maps a model to that ID. On Microsoft Foundry, deployment names are user-defined, so Claude Code never recognizes a pinned ID there, mapped or not, and the row shows the deployment name by default.
10801080
1081When a row shows the model's name, its default description includes the pinned ID so you can still see which ID is pinned.
1081When a row shows the model's name, its default description includes the pinned ID.
10821082
10831083Claude Code may also not recognize which features a pinned model supports. You can set the display name and description yourself and declare capabilities with companion environment variables for each pinned model.
10841084
No line in this hunk matches that.