Which Model a Claude Code Session Runs - Model Aliases by Provider, availableModels, and Two Kinds of Fallback
First Published:
Last Updated:
--model sonnet, the actual model used is not determined by that name alone. The model alias sonnet can refer to different models depending on the provider: in v2.1.332, it points to Sonnet 5.5 with the Anthropic API, Sonnet 4.5 with Amazon Bedrock, and Sonnet 5 within sessions that exclusively use Mantle. If an administrator has restricted the allowed models, the alias may be replaced with an approved version, or the selection may be rejected. If a model is unavailable, the session may switch to a different model, or it may terminate with an error. If a safety classifier flags the request, it may be re-executed with a different model, or the request may end with a refusal.The documentation for Claude Code addresses these scenarios in separate sections. A single, sequential description of the decision-making process, from alias to final model selection, is not found within the documentation. This article organizes the documentation's descriptions into five layers: selection, alias resolution, restriction, availability fallback, and content-based fallback. Each layer is accompanied by supporting text from the documentation. The order of these layers is a structure used in this article and does not reflect the decision-making sequence defined in the documentation.
This article was written after reviewing the Claude Code v2.1.332 documentation on November 30, 2026. The models associated with aliases and the default models are subject to change with each version update. This article is based on the documentation and has not been tested in a live environment. All descriptions of the process are derived from the documentation. This article does not include information on pricing or recommended model selection.
Related articles on this site:
- Running Claude Apps Gateway on AWS - What the Gateway Holds and Enforces, What Stays on Developer Machines, and Where the Worked Example Stops
- Claude Code on Pay-As-You-Go API Billing - Anthropic API, Amazon Bedrock, and Google Cloud Vertex AI
- Claude Code Version History and Timeline - Release Channels, Changed Defaults, and Where Each Version Date Comes From
- Claude Platform on AWS or Amazon Bedrock - Who Operates It, What Differs, and What a Move Breaks
- Where Claude Code Auto Mode Gets Its Verdict - Server Review, the Local Classifier, and the Denial When No Verdict Arrives
- AI Model Deprecation and Lifecycle Calendar - Anthropic, OpenAI, Google, and Amazon Bedrock
Table of Contents
- 1. Scope and Assumptions
- 2. Selection Layer
- 3. Alias Resolution Layer
- 4. Restriction Layer
- 5. Availability Fallback Layer
- 6. Content-Based Fallback Layer
- 7. The Same Model Retires on Different Dates by Provider
- 8. Verifying the Model Used
- 9. Frequently Asked Questions about How Claude Code Selects a Model
- 10. Summary
- 11. References
1. Scope and Assumptions
This chapter will first define the intended audience, the scope of this article, the relevant source materials, and the terminology used. The following ten points will outline the key conclusions.- The model selected for a session is determined by priority, following this order:
/model,--model,ANTHROPIC_MODEL, themodelsetting, andANTHROPIC_DEFAULT_MODEL. The organization's default model serves as a starting point, not a limitation (Chapter 2). - The aliases
opus,sonnet, andhaikurefer to different models depending on the provider. As shown in the table in version v2.1.332,sonnetrefers to Sonnet 5.5 on the Anthropic API, Sonnet 4.6 on the Claude Platform on AWS, Sonnet 4.5 on Amazon Bedrock, and Sonnet 5 in sessions using only Mantle (Section 3.2). - On Amazon Bedrock, Sonnet 5.5 has been available since September 28, 2026. However, in version v2.1.332, the
sonnetalias on Bedrock still refers to Sonnet 4.5. The reason for this discrepancy is not documented (Section 3.4). - In versions prior to v2.1.332,
sonneton Google Cloud's Agent Platform and Microsoft Foundry referred to Sonnet 4.5. As of December 1, 2026, npm'sstabledist-tag points to 2.1.330 (Section 3.3). - When managed settings define the
availableModels, only that list is used, and user, project, or local settings cannot expand upon it.availableModelson its own can leave the Default option outside the list. TheenforceAvailableModelssetting brings it into the list (Chapter 4). - Availability fallback mechanisms activate during periods of overload or unavailability, and only function for the duration of that specific turn. They are not triggered by authentication, billing, or rate limiting errors (Chapter 5).
- Content-based fallback (Automatic model fallback) activates when a safety classifier flags a request. The rest of the session then continues on the fallback model. If an allowlist blocks the destination, the request ends with a refusal (Chapter 6).
- These two fallback mechanisms are separate systems, described in separate sections of the documentation. This article states which mechanism it means each time (Section 6.8).
- The lifetime of the same model differs by operator. Sonnet 4.5 was retired from Anthropic-operated platforms on November 30, 2026, and will reach its end-of-life (EOL) on April 8, 2027, on Amazon Bedrock (Chapter 7).
- You can verify which model is currently running by checking the output of
/status,/model, the startup header, and notifications. Availability fallback chains are not displayed in the/statusoutput (Chapter 8).
1.1 Intended Audience
This article is intended for the following audiences:- Administrators who configure managed settings to restrict the models available within Claude Code.
- Developers using Claude Code through Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry.
- Support personnel who receive inquiries related to issues such as incorrect models being used (e.g., despite specifying
--model sonnet), errors occurring, or requests being blocked.
1.2 Scope of this Article
This article will focus on how the main model within Claude Code sessions is determined based on various settings, when it switches to a different model, and when it encounters errors or is rejected. This article touches on subagent models only where they relate to the layers.This article does not cover:
- Comparisons of model performance and recommendations on which model to choose.
- Pricing and billing procedures. This is covered on this site at Claude Code on Pay-As-You-Go API Billing.
- Configuration of the Claude apps gateway's allowlist. This is covered on this site at Running Claude Apps Gateway on AWS.
- A comprehensive overview of settings. This is covered on this site at Claude Code Features and Settings Reference 2026.
- The model used for classification within auto mode. This is covered on this site at Where Claude Code Auto Mode Gets Its Verdict.
- Methods for avoiding or triggering content-based fallback, and the criteria the classifier uses for its decisions.
1.3 Checked Date and Reviewed Materials
The verification date is November 30, 2026. The latest version as of that date was v2.1.332. The CHANGELOG page indicates the date of this version as November 25, 2026. The npm registry records the publication time of this version as 2026-11-24T22:06:38Z. The two dates differ by one day.The
stable dist-tag in npm pointed to version 2.1.326 on the same day. The settings reference states that the stable release channel typically tracks a version approximately one week prior to the latest version. Users of the stable channel may therefore be using a different version than the latest version listed. The mechanism behind release channels is discussed on this site's Claude Code Version History and Timeline.On December 1, 2026, the pages this article draws on were checked again. The latest version is v2.1.333, and the CHANGELOG page states the date of this version as November 30, 2026. The npm registry records the publication time of this version as 2026-11-30T19:04:51Z. The most recent row in the Version History table remains v2.1.332, and the destinations of the aliases have not changed. The changes were in the descriptions related to the retirement of Sonnet 4.5 and to model pinning; Sections 3.3, 3.4, 7.2, and 7.3 use the values from that check.
The materials reviewed for this article include:
- Claude Code documentation: Model configuration, Claude Code on Amazon Bedrock, Claude Code on Google Cloud's Agent Platform, Claude Code on Microsoft Foundry, Claude Code on Claude Platform on AWS, Claude Code with Claude Models on Google Cloud (Anthropic managed), All settings, Environment variables, CLI reference, changelog.
- Anthropic's Model deprecations page.
- Amazon Bedrock model cards (Claude Sonnet 4.5, Claude Opus 4.5, Claude Haiku 4.5, Claude Sonnet 5.5), and the AWS What's New article from September 28, 2026.
- Google Cloud's Claude Sonnet 4.5 page.
The English quotations in this article are taken from the Markdown versions of the documents, with the link formatting removed.
1.4 Source Indicators
This article uses three indicators to distinguish the origin of each statement.| Indicator | Meaning |
|---|---|
| Stated | Directly written in the document. |
| Not stated | Cannot be found within the document. This does not constitute proof of non-existence. |
| Inference | Constructed from multiple statements within the document. |
Statements without an indicator are considered Stated. The division into five layers itself is an Inference.
1.5 Five Layers
The Model configuration page describes ordering across several sections. The five tiers of priority are described in the "Setting your model" section, the conditions under whichANTHROPIC_DEFAULT_MODEL is active are detailed in a separate subsection, the models that an organization's default model can be overridden by are outlined in the "Organization default model" section, and the order in which models are selected when a default is blocked is described in the "Block specific models or versions" section. How fallback chains prioritize flags over settings is explained in the "Fallback model chains" section. This article organizes these elements into five layers.
| Layer | What it Determines | Primary Settings | Chapter |
|---|---|---|---|
| Selection | Which name selects the model | /model, --model, ANTHROPIC_MODEL, model, ANTHROPIC_DEFAULT_MODEL | Chapter 2 |
| Alias Resolution | Which model ID an alias resolves to | ANTHROPIC_DEFAULT_OPUS_MODEL and similar variables, modelOverrides | Chapter 3 |
| Restriction | Which models are selectable | availableModels, enforceAvailableModels, deniedModels, availableModelsMatch | Chapter 4 |
| Availability Fallback | Where to move when a model is unavailable | fallbackModel, --fallback-model, CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK | Chapter 5 |
| Content-Based Fallback | Where to move when a safety classifier flags a request | switchModelsOnFlag | Chapter 6 |
The layers interact with each other. The restriction layer examines the values from the selection layer, the alias resolution layer, and the destinations for both fallback mechanisms. The order of the layers in Figure 1 does not represent the order of processing.
1.6 Terminology
This article uses the following terms as defined below:- Alias: A name that does not include a version, such as
opus,sonnet,haiku,fable,best, oropusplan. These are distinguished from model IDs and provider IDs. An example of a model ID isclaude-sonnet-5-5, while an example of a provider ID is the ID from a Bedrock inference profile. - Default: One of the options in
/model, the same thing as the settings valuedefault. The Model configuration page refers todefaultas a special value, not an alias. - Availability Fallback: A mechanism described in the Fallback model chains section. This is activated when a model is overloaded or unavailable.
- Content-Based Fallback: A mechanism described in the Automatic model fallback section. This is activated when a safety classifier flags a request.
- Version: A specific version of Claude Code (e.g., v2.1.332). Model versions are referenced using the model's name (e.g., Sonnet 4.5).
2. Selection Layer
The selection layer determines which model is chosen based on a specified name. This layer selects either an alias, a model ID, or a provider ID. The specific model that is chosen is ultimately determined after passing through the alias resolution layer (described in Chapter 3) and the restriction layer (described in Chapter 4).2.1 Five Priority Levels
The "Setting your model" section on the Model configuration page begins with the following statement regarding how to configure the model.You can configure your model in several ways, listed in order of priority:
The following five options are available:
| Rank | Method | Scope |
|---|---|---|
| 1 | /model within the session | By default, this setting is written to the model in user settings and becomes the default for the next session. |
| 2 | --model at startup | Applies only to that specific session. |
| 3 | Environment variable ANTHROPIC_MODEL | Applies only to that specific session. |
| 4 | model in settings | Remains in effect until the settings are changed. |
| 5 | Environment variable ANTHROPIC_DEFAULT_MODEL | Sets the default for new sessions. |
The
--model section in the CLI reference also states that this flag takes precedence over the model setting and the ANTHROPIC_MODEL environment variable.2.2 What /model Saves
When you press Enter after selecting a model in the /model picker, Claude Code will switch to that model and also set it as the default. Pressing s will only change the model for the current session, without changing the default. Typing /model <name> directly will have the same effect as pressing Enter.When using
/model with the -p flag in non-interactive mode, the selection will only apply to the current session. This feature requires v2.1.205 or later.The
--model flag and the ANTHROPIC_MODEL environment variable only affect the session in which they are used. If you need to run different models simultaneously in separate terminals, it's recommended to launch each terminal with its own --model flag, rather than using the /model command to switch models.2.3 When ANTHROPIC_DEFAULT_MODEL Takes Effect
The ANTHROPIC_DEFAULT_MODEL variable determines the default model used when a new session begins, and requires version v2.1.236 or later. Claude Code will only begin a new session using the model specified by this variable when no other model has been explicitly selected. That is, all of the following hold:- The
--modelflag is not used. - The
ANTHROPIC_MODELvariable is not set. - No model is specified in any settings file, including any model selections saved via
/model. - No organization-level default model is in effect.
The documentation states that Claude Code will ignore this variable under the following conditions:
- The value is one of
default,inherit,opusplan, orhaiku. enforceAvailableModelsis enabled.- The organization's model restrictions exclude that model.
- That model is not available for the account.
2.4 Organization's Default Model
In the Claude Enterprise plan, organization administrators can specify the default Claude Code model through the claude.ai admin console, either for the entire organization or for individual custom roles. When a default model is set, the Default option will resolve to that model. This feature requires version v2.1.196 or later.The documentation describes this default as follows:
The organization default is a starting point, not a restriction. These selections take precedence over it:
The
--model flag, the ANTHROPIC_MODEL environment variable, and the model value supplied by managed settings or --settings take precedence over the organization's default model. So does the model value set in user, project, and local settings, including models saved using /model.Administrators can also configure the organization's default model to take precedence over user selections. In this case, the organization's default model takes precedence over user, project, and local settings, but models saved using
/model will only apply to the current session. Even so, in the terminal, a new session will begin using the model specified by the --model flag, ANTHROPIC_MODEL, managed settings, or the --settings parameter.The organization's default model is only applied to sessions authenticated through the Anthropic API. To set a default model for other pathways, including the LLM gateway, use the
model setting within managed settings.2.5 What default Resolves To
The default value of a setting resolves to a pre-defined model determined by the account type. According to the documentation for v2.1.332, the values are as follows:| Account Type | default Resolves To |
|---|---|
| Pro, Max, Ultra, Team, Enterprise, Anthropic API | Opus 5.5 |
| Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), Amazon Bedrock, Google Cloud's Agent Platform | Opus 5.5 |
| Microsoft Foundry | Sonnet 5.5 |
This resolution can be overridden by:
- The organization's default model. If configured, it takes precedence over the default for the account type.
- The model specified by
ANTHROPIC_DEFAULT_MODEL. This applies under the conditions outlined in Section 2.3. - For Enterprise plans, the model saved to the account via
/model. This applies when there is no organization default, the restrictions do not exclude that model, and the model is available to the account. - The Default enforced by
enforceAvailableModels. This is discussed in Section 4.5.
When both the organization default and the enforced default apply, the organization default overrides the account type default first, and then the enforced default is applied. Organization defaults on the allowlist remain in effect, while organization defaults not on the allowlist resolve to the enforced default.
Fable models are not the default model for any plan or provider, regardless of the account type.
2.6 When the Next Session Doesn't Start with the Selected Model
If you select a model using/model but the next session starts with a different model, the documentation lists several possible causes. One of these is the following:Something with higher priority sets the model. A `model` value in project or managed settings, `ANTHROPIC_MODEL` in your shell, or an organization default set to override user choices applies again at every new-session launch.
When project or managed settings determine the model, the startup header will display the name of the file that's being used.
Sessions resumed with
claude --resume or --continue often continue using the model that was active when the session was saved. However, if the saved model has been retired or is excluded by availableModels, if you've set an alias variable, or if the provider uses its own ID instead of Anthropic's model ID, the system will follow the established priority order. Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry are examples of providers that use their own IDs.3. Alias Resolution Layer
The alias resolution layer determines which model ID corresponds to each alias, as selected in Chapter 2. Even with the same alias, the destination model may vary depending on the provider and the version of Claude Code.3.1 List of Aliases
The Model Aliases section on the Model configuration page lists the following names:| Name | Page Description Summary |
|---|---|
default | A special value that reverts to the account's default settings, overriding any previous changes. This is not an alias. |
best | Uses the same model as opus. |
fable | Uses the Fable model provided by the provider. |
sonnet | Uses the latest Sonnet model. |
opus | Uses the latest Opus model. |
haiku | Uses the fast and efficient Haiku model. |
sonnet[1m], opus[1m] | Used with a context window of 1 million tokens. |
opusplan | Uses opus in plan mode and switches to sonnet during execution. |
If
ANTHROPIC_DEFAULT_FABLE_MODEL is not defined, fable resolves to Fable 5 within Claude apps gateway sessions and to Fable 5.2 elsewhere. Starting with version v2.1.321, best uses the same model as opus. In earlier versions, it used the same model as fable when the Fable model was available.The word "latest" in this table is the wording of the page's alias table. In the per-provider table in Section 3.2, the
sonnet alias on Amazon Bedrock and on Claude Platform on AWS does not point to the most recent Sonnet model available from that provider (see Section 3.4).3.2 Table by Provider
The following table shows the destinations foropus, sonnet, and haiku for each provider. The values, as read from the v2.1.332 documentation on November 30, 2026, are as follows:| Provider | opus | sonnet | haiku |
|---|---|---|---|
| Anthropic API | Opus 5.5 | Sonnet 5.5 | Haiku 5.5 |
| Claude Platform on AWS | Opus 5.5 | Sonnet 4.6 | Haiku 4.5 |
| Claude Models on Google Cloud (Anthropic managed) | Opus 5.5 | Sonnet 5.5 | Haiku 4.5 |
| Amazon Bedrock | Opus 5.5 | Sonnet 4.5 | Haiku 4.5 |
| Mantle only | Opus 5.5 | Sonnet 5 | Haiku 4.5 |
| Google Cloud's Agent Platform, Microsoft Foundry | Opus 5.5 | Sonnet 5.5 | Haiku 4.5 |
Following the table, the document includes the following line:
Aliases point to the recommended version for your provider and update over time. To pin to a specific version, use the full model name, for example `claude-opus-5-5`, or set the corresponding environment variable like `ANTHROPIC_DEFAULT_OPUS_MODEL`.
The Claude Code on Amazon Bedrock page states the same values in this sentence:
Without `ANTHROPIC_DEFAULT_SONNET_MODEL`, the `sonnet` alias resolves to Sonnet 4.5, or to Sonnet 5 in a session that uses only Mantle.
The CHANGELOG entry for v2.1.332 also notes that the value for Bedrock's
sonnet remains unchanged.Changed the `sonnet` model alias on Google Cloud's Agent Platform and Microsoft Foundry to Sonnet 5.5, and Foundry's `opus` alias to Opus 5.5; `sonnet` on Amazon Bedrock stays at Sonnet 4.5
Therefore, the value for Bedrock's
sonnet is consistent across two pages in the document and in the CHANGELOG, for a total of three locations.3.3 Values Different in Versions Prior to v2.1.332
The Version History table on the Model configuration page lists versions where the destination alias has changed. The row for v2.1.332 indicates that thesonnet for Agent Platform and Foundry resolves to Sonnet 5.5, the sonnet for Mantle only resolves to Sonnet 5, and the opus and default models for Foundry resolve to Opus 5.5 and Sonnet 5.5, respectively. Combining this information with the warning in the "Pin models for third-party deployments" section and the correction in the CHANGELOG for v2.1.332, the values for versions prior to v2.1.332 are as follows:| Path and Name | Prior to v2.1.332 | v2.1.332 | Justification |
|---|---|---|---|
Agent Platform's sonnet | Sonnet 4.5 | Sonnet 5.5 | Warning text, Version History |
Foundry's sonnet | Sonnet 4.5 | Sonnet 5.5 | Warning text, Version History |
| Foundry's default model | Sonnet 4.5 | Sonnet 5.5 | Warning text, CHANGELOG |
Mantle-only sonnet | Haiku 4.5 (bug) | Sonnet 5 | Correction in CHANGELOG |
Foundry's opus | Not stated | Opus 5.5 | Version History |
The justification for the Mantle row is based on the following line in the CHANGELOG:
Fixed the `sonnet` alias on Bedrock Mantle resolving to Haiku 4.5: it now means Sonnet 5, not Sonnet 5.5, and an account without Sonnet 5 gets an error, so enable it first
The warning in the "Pin models for third-party deployments" section advises users of the Agent Platform, Microsoft Foundry, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed) to migrate away from Sonnet 4.5. The retirement date of Sonnet 4.5 on these platforms is November 30, 2026. The warning concludes with the following statement:
After Sonnet 4.5 retires on your platform, requests to it stop working, including background tasks.
As stated in Section 1.3, npm's
stable dist-tag pointed to 2.1.330 on December 1, 2026. Therefore, if you are using a version prior to v2.1.332 on the stable channel, and your session does not have the sonnet model pinned on Agent Platform or Foundry, it may point to the retired Sonnet 4.5. On Foundry, the default model may also point to Sonnet 4.5 (Inference). You can verify which version you are currently running by using the command claude --version.3.4 Bedrock Already Has Sonnet 5.5
The model card for Claude Sonnet 5.5 on Amazon Bedrock lists the launch date as September 28, 2026, and its lifecycle as Active. AWS's What's New also states that Claude Sonnet 5.5 became available on both Amazon Bedrock and the Claude Platform on AWS on the same date.However, in v2.1.332, the
sonnet alias on Bedrock refers to Sonnet 4.5, while on the Claude Platform on AWS, the sonnet alias refers to Sonnet 4.6. The aliases point to the version that the sentence in Section 3.2 calls recommended for your provider, rather than the latest model available from that provider. The reason why Bedrock still uses Sonnet 4.5 is Not stated.The documentation notes that these aliases may point to older versions rather than the latest, and recommends pinning models for deployments with third-party providers. The section titled "Pin models for third-party deployments" begins with the following text:
Pin model versions before rolling out Claude Code on Amazon Bedrock, Google Cloud's Agent Platform, Microsoft Foundry, Claude Platform on AWS, or Claude Models on Google Cloud (Anthropic managed).
Runtime aliases on AWS Lambda have a similar shape, in that a party other than the user can modify the destination. The mechanism behind this is covered in this site's article Customer-Managed Runtimes on AWS Lambda - How an Alias Update Reaches a Function and Who Owns the Patch.
3.5 Variables to Change Model Destinations
The Environment variables section on the Model configuration page lists variables that can be used to change the destination model. These variables accept either the model's full name or the equivalent ID from a third-party provider.| Variable | Summary of Page Description |
|---|---|
ANTHROPIC_DEFAULT_FABLE_MODEL | The fable model. On third-party providers, also the ID that content-based fallback treats as a Fable model. |
ANTHROPIC_DEFAULT_OPUS_MODEL | The opus model. Also the opusplan model while plan mode is active. |
ANTHROPIC_DEFAULT_SONNET_MODEL | The sonnet model. Also the opusplan model while plan mode is not active. |
ANTHROPIC_DEFAULT_HAIKU_MODEL | The haiku model. This is used for background functionality. |
ANTHROPIC_SMALL_FAST_MODEL has been replaced by ANTHROPIC_DEFAULT_HAIKU_MODEL and is deprecated.When a variable is set, the
/model picker will display only one entry for that model, instead of multiple entries for its associated models. The "Control the model users run on" section notes that these variables not only determine the model destination but also the version the account-type default uses.These variables cannot point an alias outside the allowlist. This is discussed in Section 4.3.
3.6 modelOverrides
modelOverrides allows you to map Anthropic model IDs to specific strings sent to the provider, on a one-to-one basis. This is useful when you want to route multiple versions of the same model family to different inference profile ARNs or deployment names. Keys are Anthropic model IDs, and any unknown keys will be ignored.The documentation regarding
modelOverrides specifies the following:- In Amazon Bedrock,
modelOverridestakes precedence over the inference profile automatically detected for Claude Code at startup. - It also applies when Anthropic model IDs are directly provided using
--model,ANTHROPIC_MODEL, orANTHROPIC_DEFAULT_*_MODEL. Prior to version v2.1.200, these values were passed directly to the provider without any mapping. - The allowlist evaluates values based on the Anthropic model ID, not the mapped value.
- When managed settings define
availableModels, only themodelOverrideswithin the managed settings apply to directly provided IDs.
3.7 Provider ID Format
When specifying a model without using an alias, use the provider's ID format.- Amazon Bedrock's Invoke API: This requires either the ID of an inference profile or the ARN of an application inference profile. An example is
us.anthropic.claude-opus-4-8. - Mantle: IDs begin with
anthropic.and do not include a version suffix. Examples includeanthropic.claude-sonnet-5andanthropic.claude-haiku-4-5. - Google Cloud's Agent Platform: This requires the version name. Some IDs include a date following the
@symbol. - Microsoft Foundry: This requires the deployment name. Because users define the names, Claude Code does not recognize the specific model.
In both Bedrock and Agent Platform, starting a session with a specific version of Sonnet or Opus will make that version act as the session's pin for the matching alias. It does not act as a pin when the session starts with an alias or with an ID that Claude Code does not recognize. The ARN of an application inference profile falls under the category of unrecognized IDs.
4. Restriction Layer
The restriction layer determines which models users are able to select. Administrators use theavailableModels setting within managed settings, along with three additional keys to supplement it.4.1 Three Ways to Specify availableModels
Each item within availableModels must match one of the following:- A model family. For example,
sonnet. - A version prefix. For example,
claude-sonnet-4-5. It also matches later model IDs that extend it with another segment.claude-fable-5accepts Fable 5, Fable 5.1, and Fable 5.2, whileclaude-fable-5-1only accepts Fable 5.1. - A complete model ID. For example,
claude-sonnet-4-5-20250929.
When matching a prefix, newer versions are also accepted. The documentation states that a list including
claude-sonnet-5 lets an unpinned sonnet run Sonnet 5.5, and that this applies from version v2.1.332 in both the Agent Platform and Foundry.If a list includes either a version prefix or a complete ID for a specific model family, the wildcard entry for that family becomes inactive. For example,
["sonnet", "claude-sonnet-4-5"] limits the user's choices to only IDs that match claude-sonnet-4-5, and not all Sonnet models.4.2 The Managed List Cannot Be Extended
The Merge behavior section states the following:When the managed settings Claude Code applies define `availableModels`, that list alone applies, apart from a host platform that supplies its own: entries in user, project, or local settings cannot extend it, and Claude Code never merges `availableModels` across managed sources either; how Claude Code combines managed sources says which source's list applies.
When managed settings do not define a list, the user, project, and local settings are concatenated and duplicates are removed, just like other array configurations. Prior to version v2.1.175, lower-level items were merged into the managed list.
The settings table on the All settings page lists the file for
availableModels as Any file. The Model configuration page is written assuming that administrators will use managed settings. This article is written assuming that settings are distributed through managed settings.4.3 Scope of the List and Restricted Choices
WhenavailableModels is configured, the list encompasses all locations where users can specify a model. In the main session, this includes /model, --model, ANTHROPIC_MODEL, model settings, ANTHROPIC_DEFAULT_MODEL, and the model used when resuming. It also applies to models used by subagents, skills, and advisors.The variables of the alias resolution layer cannot point outside the list either. The documentation states the following under "Alias Resolution":
the `ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`, and `ANTHROPIC_DEFAULT_FABLE_MODEL` environment variables cannot redirect an allowed alias to a model outside the list
In Anthropic API and Claude Platform on AWS, if the list blocks the model that a family alias usually points to, Claude Code will replace it with the latest version of that family that the list permits and will issue a notification naming both models. For example,
["sonnet", "claude-opus-4-6"] means that /model opus and --model opus will select Claude Opus 4.6. This replacement requires version v2.1.205 or later.When there is no available replacement and the selection remains restricted, the behavior differs depending on where the model is configured.
| Configuration Location | Behavior |
|---|---|
/model | The change is rejected with an error. |
--model, ANTHROPIC_MODEL, model settings | The value is replaced at startup, a warning is issued, and the session starts on the default model. |
ANTHROPIC_DEFAULT_MODEL | The variable is ignored. |
| Subagent or teammate specification | The request is processed using a fallback model without failure. |
| Skill or command specification | The specification is ignored, and the session's model is used. |
4.4 Provider IDs and List
When using third-party providers, it's necessary to format list items to match the provider's ID format. The note in the "Pin models for third-party deployments" section states the following:Provider-specific prefixes such as `us.anthropic.` are not stripped, so to allow a specific model, map it through `modelOverrides` or list its full provider-form ID:
Within Google Cloud's Agent Platform, when Claude Code sends an ID that includes a date preceded by
@, ensure that the list item also includes that date. For models pinned using ANTHROPIC_DEFAULT_*_MODEL, list the values configured in the variable.When configuring
enforceAvailableModels in managed settings and aligning the checks for Amazon Bedrock startup with the list, the checks compare each item against the inference profile ID that it is intended to send. This ID includes a regional prefix; therefore, list the items using that ID.In Bedrock, Agent Platform, and Foundry, rows listing models that do not begin with the prefix
anthropic. will not be added to the /model picker. Mantle IDs do have this prefix.4.5 Extending the List to Default with enforceAvailableModels
The section on default model behavior includes the following two lines:With the default prefix matching, `availableModels` on its own leaves the Default option on the system's runtime default for the account until you also set `enforceAvailableModels`.
With `availableModels: []`, named model selections are blocked and `enforceAvailableModels` has no effect.
When
enforceAvailableModels: true is set alongside a non-empty availableModels list within managed settings, the list is also applied to the default option. This feature requires v2.1.175 or later. For users without a model recorded on their account, the default option will resolve to either the account-type default or the organization default. If that model is not in the list, the default will resolve to the first item in the availableModels list that names a permitted and available model. This applies to startup, when selecting Default via /model, to the "default" entry in a fallback chain, and to the default used when an excluded selection is dropped.Even if the list is not empty, if no item resolves to a permitted and available model, the enforcement is bypassed, and a warning is only displayed when using the
--debug flag. The documentation recommends ensuring that at least one item in the list resolves to a model that is guaranteed to be usable.The documentation specifies that these two keys should be placed together in the highest-ranked managed source you deliver. By default, Claude Code only reads from that single source. Therefore, when the admin console is distributing settings, the two keys placed in the managed settings file will be ignored.
4.6 Blocking Specific Versions with deniedModels and availableModelsMatch
An entry like claude-opus-5 also permits later versions like Opus 5.5 as soon as Claude Code supports them. To hold such versions back, versions v2.1.283 and later include two keys. Both are read only from managed settings; if placed in user, project, or local settings, or within the --settings configuration, they will be ignored along with a warning.deniedModels: Blocks the specified models. It prevents access even if the models are listed inavailableModels, and functions even if the model list is absent.availableModelsMatch: When set to"exact", the model IDs listed inavailableModelswill only permit access to the specifically listed versions.
Earlier versions ignore both keys. The documentation also specifies setting
requiredMinimumVersion to prevent those versions from starting.The default behavior also follows these two keys. When
enforceAvailableModels is not enabled, the default model selection, when a blocked model would normally be chosen, will fall back in the following order:- The most recent permitted version within the same model family.
- The most recent permitted model within a lower-cost family, prioritizing Sonnet, then Haiku.
- The first
availableModelsentry that names a permitted model.
If none of these options are available, sessions attempting to start with the default model will be rejected and an error message will be displayed, indicating the keys that need to be modified.
4.7 Relationship with Organizational Model Restrictions
In the Claude Enterprise plan, organizational administrators can disable individual models through the claude.ai admin console. This restriction operates independently of theavailableModels setting, and both can be active simultaneously. Users can select a model only when the availableModels setting permits it and the organization has not imposed a restriction.Organizational restrictions apply only to sessions through the Anthropic API and the LLM gateway. With a gateway credential, or with other providers, the
availableModels setting is used. The Haiku model is always available and cannot be disabled.4.8 Configuration Example in the Documentation
The section "Control the model users run on" shows an example that starts users on Sonnet 5, limits the picker to the Sonnet 5 family and Haiku, and keeps Default inside the list.{
"model": "claude-sonnet-5",
"availableModels": ["claude-sonnet-5", "haiku"],
"enforceAvailableModels": true,
"env": {
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5"
}
}
The documentation states that
enforceAvailableModels makes Default follow the list, while the env block pins the version of a permitted alias. It also states that the two cover different scopes. In this example, model is the initial selection but is not enforced. The enforceAvailableModels and env blocks determine what model is used when the user selects "Default."5. Availability Fallback Layer
The availability fallback layer determines which model to switch to (or whether to stop entirely) when the selected model is unavailable. This layer does not consider the content of the request. Content-based fallback will be discussed in Chapter 6.5.1 Errors That Trigger a Chain and Errors That Don't
The section on fallback model chains begins with the following text:When the primary model is overloaded, unavailable, or returns another non-retryable server error, Claude Code can switch to a fallback model instead of failing the request. Authentication, billing, rate-limit, request-size, and transport errors, and a denial by your organization's policy check, never trigger a switch; those follow their normal retry and error handling.
This section states that when Amazon Bedrock or Google Cloud's Agent Platform rejects a model due to an inability to access it within the account, the system switches to a fallback. Claude Code treats this as an issue of model unavailability, rather than an authentication error.
The
--fallback-model section in the CLI reference lists retired models as an example of models that are not available.5.2 Chain Configuration and How Long a Switch Lasts
Chains are specified within a single session using the--fallback-model flag, provided as a comma-separated list. To persist chains across sessions, configure the fallbackModel setting as an array. Examples are provided below:claude --fallback-model sonnet,haiku
{
"fallbackModel": ["claude-sonnet-5", "claude-haiku-5-5"]
}
The
--fallback-model flag takes precedence over the fallbackModel setting. Each item accepts either the model name or an alias; "default" will resolve to the default model.Regarding how long a switch lasts and how many models a chain holds, the documentation states:
The switch lasts for the current turn only, so your next message tries the primary model first again. Claude Code caps chains at three models after duplicate removal and ignores extra entries.
The documentation also describes how to determine if a chain is configured:
Claude Code doesn't confirm the chain at startup and `/status` doesn't display it. The notice shown when a switch happens is the first visible sign that a fallback is configured.
When a chain is not defined, the All settings page indicates that Claude Code will retry the same model before returning the server's error.
5.3 Items Excluded from the Chain
Claude Code will skip items in the chain under the following circumstances:- Items that are not permitted by the
availableModelslist. These items are dropped during chain processing. - Models with a context window size smaller than the primary model, encountered during compaction.
- Models that auto mode does not support, in auto mode and in plan mode while the classifier is reviewing commands.
If an item is inaccessible, such as with retired models, Claude Code will similarly proceed to the next item. The chain also applies to subagents, which continue using models that accept requests, while the session model remains unchanged. In versions prior to v2.1.247, a failure that the chain covers ended the subagent instead.
5.4 Startup Checks for Bedrock and Agent Platform
When starting up with Amazon Bedrock and Google Cloud's Agent Platform, Claude Code verifies whether the account and project have access to the models it intends to use.If a model is not pinned and the current default model is unavailable, Claude Code will switch to a different model for that session only and issue a notification. It first attempts earlier versions of the default model; if the default is an Opus model and none of the Opus versions are available, it will switch to the default Sonnet model. This change is not saved.
The documentation also states the following regarding startup checks:
- If a newer version of a model than the currently pinned version is available, Claude Code will ask whether to update the pin. It does not perform checks or ask questions regarding pins in the
envblock within managed settings, nor for pins to an application inference profile ARN. - If a session is started with a specific version of Sonnet or Opus, that version acts as a pin, bypassing the check for the built-in default it replaces.
- If Claude Code encounters a model that cannot be accessed, it will remember this rejection on this machine for up to 24 hours. This memory can be disabled by setting the environment variable
CLAUDE_CODE_SKIP_MODEL_ACCESS_MEMORY=1. - When
enforceAvailableModelsis configured in managed settings, the checks and switching will be limited to models permitted by theavailableModelslist. This feature requires version v2.1.287 or later. In Bedrock, this applies to the Invoke API.
5.5 When the Model Becomes Unavailable Mid-Session
If Bedrock or Agent Platform rejects Claude Code's attempt to use a session's model for your account, Claude Code will switch the session to a different model. The message will begin withSwitched to <fallback> because <model> is not available. If a chain is configured, the process will proceed to that chain item.If no chain is set, the request will fail in the following cases:
- The session is on a pinned model, or on a specific version you picked.
- None of the models that Claude Code attempts to use are available.
Setting
CLAUDE_CODE_DISABLE_MODEL_ACCESS_FALLBACK=1 in Bedrock and Agent Platform will cause requests that are rejected mid-session to fail immediately, without switching to an older model. This feature requires version v2.1.285 or later. The Environment variables page states that even with this variable set, a chain configured by the user still switches on that rejection, and the startup model checks still move to a different model at startup. To stop the switching, remove the chain as well.5.6 Microsoft Foundry
The Claude Code page on Microsoft Foundry states that when your resource has no deployment for the default model, Claude Code will either switch to an older model or report a failure. The message when switching models begins with the same text as Bedrock:Switched to <fallback> because <model> is not available.The CHANGELOG for v2.1.332 indicates that Foundry now counts Claude Sonnet 4, Opus 4, and Opus 4.1 as retired, so step-downs stop above them.
5.7 v2.1.332 --model default Changes
The CHANGELOG for v2.1.332 changed what Default does when the model it resolves to is unavailable.Changed `--model default` and a Default pick to move to an older model when that model isn't available, instead of stopping with an error; in auto mode, only to a model auto mode accepts
In versions prior to v2.1.332, the system would previously halt with an error in such cases.
6. Content-Based Fallback Layer
The content-based fallback layer determines, when a safety classifier stops a request, whether to re-process it using a different model or to end with a refusal. This article covers only the destinations the documentation states, the cases that end in a refusal, and the relationship with administrator settings. It does not detail the criteria used by the classifier's decision-making process, nor does it explain how to avoid or initiate rerouting.6.1 Target Models and Destinations
The section on automatic model fallback specifies the scope with the following text:This section covers content-based fallback from Fable models, Opus 5.5, Sonnet 5.5, and Opus 5. For availability-based fallback when a model is overloaded or unavailable, see Fallback model chains.
This section notes that the classifiers for these models most often flag content related to cybersecurity and biology. It then lists the destination models for each model, categorized by cybersecurity and biology.
| Model That Flagged | When it flags cybersecurity content | When it flags biology content |
|---|---|---|
| Fable models | Rerun with Opus 4.8 | Rerun with Opus 5 |
| Opus 5.5 | Rerun with Opus 4.8 | Rerun with Opus 5 |
| Sonnet 5.5 | Rerun with Sonnet 5 | Ends with a refusal. Sonnet 5.5 does not have a destination model for biology. |
| Opus 5 | Rerun with Opus 4.8 | Ends with a refusal. Opus 5 has its own biology classifier and does not have a destination model. |
These destinations are valid as of version v2.1.219 and later. In earlier versions, all flagged Fable 5 requests were re-run on the provider's default Opus model, and Opus 5 was not a fallback source. As new models are introduced, this table may be expanded.
6.2 After Model Switching
Claude Code re-executes the flagged request on the destination model and provides a notification within the main conversation. After switching models, the session continues on that model. To return to the original model, use the/model command.This is the opposite of the chaining process described in Chapter 5. When chaining, the switch occurs only for that turn, and the primary model processes the subsequent message.
Even after switching models, Claude Code retains the effort level associated with the flagged request. For example, a session running on Opus 5.5 with the default
medium setting will remain at medium when switched to Opus 4.8, even though Opus 4.8's default setting is high. You can check the current effort level using the /effort status command.6.3 When the Allowlist Blocks Destinations
Destination models are also subject to checks based on the defined restrictions.The fallback model is checked against `availableModels`. When it is blocked, no fallback occurs. The refusal is shown as a normal error and the session's model is unchanged.
If the administrator has excluded Opus 4.8 or Opus 5 in the
availableModels list, any requests to those destinations will end with a refusal (Inference: based on the table in Section 6.1 and the preceding text). It is the administrator's responsibility to determine whether a destination model should be included in the allow list.6.4 Ask each time and switchModelsOnFlag
Users can choose "Ask each time" under "Switch models when a message is flagged" in the /config settings. Alternatively, if switchModelsOnFlag is set to false, the system will prompt the user to make a selection before switching models. The user can then choose to either switch to the destination model or to correct the prompt and retry.In an interactive session, if a model switch occurs for the first time and
switchModelsOnFlag has not been configured, Claude Code may subsequently prompt the user to confirm whether to automatically switch models and may save the response in the user settings.Even if the user has selected "Ask each time," the request ends with a refusal without prompting in the following cases:
- When the flagged category has no fallback model. For example, categories related to biology under Opus 5 or Sonnet 5.5.
- When the
availableModelssettings block the destination model.
6.5 Subagents and Non-Interactive Mode
In the subagent feature initiated by Claude within the Agent tool, Claude Code does not pause to ask. If "Switch models when a message is flagged" is set to "Switch automatically" or has no choice yet, the request is re-executed on the destination model, while the session model remains unchanged. If "Ask each time" is selected, the subagent will fail, returningAgent terminated early due to an API error and the refusal message. If no destination model is available, the subagent will fail regardless of the selection. In versions prior to v2.1.318, the request would be re-executed regardless of the selection.In non-interactive mode, or when integrating with SDKs that cannot display a prompting interface, if "Ask each time" is selected, a flagged request ends the turn with a refusal.
6.6 Conditions for Content-Based Fallback on Bedrock, Agent Platform, and Foundry
On Amazon Bedrock, Google Cloud's Agent Platform, and Microsoft Foundry, switching only works when Claude Code can identify each model involved. The conditions outlined in the documentation are as follows:- The current model must be identifiable as a fallback source. Fable models are identified when their ID includes
claude-fable-5, matches the value ofANTHROPIC_DEFAULT_FABLE_MODEL, or is configured inmodelOverrides. Opus 5.5, Sonnet 5.5, and Opus 5 are identified either by their provider model ID or through a configuration inmodelOverrides. - The destination for Opus models is resolved within the deployment. This can be achieved by setting
ANTHROPIC_DEFAULT_OPUS_MODELor by ensuring that Opus 4.8 is included in the list of provider models. If neither of these options is configured, switching will not function for any source model, including Sonnet 5.5, and flagged requests end with a refusal. - The fallback model for the flagged category is also resolved within the deployment.
If the context window of the destination model is smaller than that of the session model, switching will not occur, and the request ends with the same refusal.
6.7 Expected Routing, as the Documentation Puts It
Regarding sections related to security research and biology workloads, the text states that in offensive security and biology work, fallback occurs frequently, often on the first request, and includes this sentence:This is expected routing for these domains, not an account flag.
The same section indicates that organizations requiring Fable-level capabilities for such work should contact Anthropic's account team to inquire about trusted access programs. This article will not delve further into this topic.
6.8 How the Two Fallbacks Differ
The fallbacks in Chapters 5 and 6 are separate mechanisms described in separate sections of the documentation.
| Perspective | Availability Fallback | Content-Based Fallback |
|---|---|---|
| Document Section | Fallback model chains | Automatic model fallback |
| Trigger | Overload, unavailability, or other non-retryable server errors | A safety classifier has stopped the request. |
| What Sets the Target | User-configured chains | The model that stopped the request and the category. For third-party providers, this is resolved using pinned model IDs. |
| Configuration | fallbackModel, --fallback-model | switchModelsOnFlag |
| How Long It Lasts | Only that turn. | The rest of the session. |
| What Stops It | The availableModels list drops an item. | A target blocked by availableModels ends the request with a refusal. |
| Visibility | Notifications during the switch. Not displayed in /status. | Transcript notifications. |
7. The Same Model Retires on Different Dates by Provider
When an alias keeps pointing to an older model, that model's lifetime matters. Even for the same model, the lifetime varies depending on the operator of the provider.7.1 Two Types of Operators
The Anthropic Model deprecations page lists the applicable date range as follows:The dates on this page apply to Anthropic-operated platforms: the Claude API, Claude Platform on AWS, Claude Models on Google Cloud (Anthropic managed), and Microsoft Foundry. Partner-operated platforms, Claude Models on Google Cloud (Google managed) and Amazon Bedrock, set their own retirement schedules, so a model’s lifecycle status and dates can differ.
This article divides the tables into two sections, following this distinction.
7.2 Anthropic-Operated Platforms
As of December 1, 2026, the values listed in the "Model Status" table on the "Model deprecations" page are as follows:| API Model Name | Status | Deprecation Announcement | Scheduled Retirement Date |
|---|---|---|---|
claude-sonnet-4-5-20250929 | Retired | September 30, 2026 | November 30, 2026 |
claude-opus-4-5-20251101 | Deprecated | November 23, 2026 | January 22, 2027 |
claude-haiku-4-5-20251001 | Active | None | Not before October 15, 2026 |
The same page states that the retirement of Sonnet 4.5 and Opus 4.5 includes the IDs
claude-sonnet-4-5 and claude-opus-4-5, which do not have specific dates. The recommended replacements are claude-sonnet-5-5 for Sonnet 4.5 and claude-opus-5-5 for Opus 4.5.The dates listed for Haiku 4.5 have already passed. However, its status remains "Active," and there is no deprecation announcement listed on this table. What will happen after this date is Not stated.
7.3 Partner-Operated Platforms
As of December 1, 2026, the values found on the Amazon Bedrock model cards and the Google Cloud page are as follows:| Model | Page | Status | Date |
|---|---|---|---|
| Claude Sonnet 4.5 | Amazon Bedrock model card | Legacy | End-of-life (EOL) April 8, 2027 |
| Claude Opus 4.5 | Amazon Bedrock model card | Legacy | Public extended access February 23, 2027, EOL May 23, 2027 |
| Claude Haiku 4.5 | Amazon Bedrock model card | Active | End-of-life (EOL) no sooner than October 16, 2026; Model EOL date N/A |
| Claude Sonnet 4.5 | Google Cloud page for Claude Sonnet 4.5 | Deprecated (as of September 29, 2026) | Shut down November 30, 2026 |
The Google Cloud page describes the Sonnet 4.5 for the Agent Platform as follows:
As of September 29, 2026, Anthropic's Claude Sonnet 4.5 on Google Cloud (claude-sonnet-4-5) is deprecated and will be shut down on November 30, 2026.
The warning section for "Pin models for third-party deployments" cites the Google Cloud page for the Agent Platform and the "Model deprecations" page for Microsoft Foundry, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). While both pages indicate the same retirement date, the deprecation announcement differs: the Google Cloud page states September 29, 2026, while the "Model deprecations" page states September 30, 2026, a difference of one day.
7.4 What Happened on November 30, 2026
November 30, 2026, the checked date, is the retirement date of Sonnet 4.5 on Anthropic-operated platforms and its shutdown date on the Agent Platform. On the same day, in v2.1.332, thesonnet alias on Amazon Bedrock still refers to Sonnet 4.5. The Sonnet 4.5 model on Bedrock is considered Legacy, with its End-of-Life (EOL) date set for April 8, 2027. When checked again on December 1, 2026, the "Model deprecations" page lists the status of Sonnet 4.5 as Retired (see Section 7.2).Consequently, the following conditions hold simultaneously (Inference: from Sections 3.2, 3.3, 7.2, and 7.3):
- Sessions in Bedrock that do not have the
sonnetmodel pinned will potentially continue to operate with Sonnet 4.5 until April 8, 2027. Whether a Claude Code update changes where the alias points before that date is Not stated. - Sessions on the Agent Platform and Foundry that use versions prior to v2.1.332 and do not have the
sonnetmodel pinned may still refer to the retired Sonnet 4.5. - Whenever Sonnet 4.5 is explicitly referenced in any configuration, regardless of the version, it will need to be replaced with the appropriate designation on the Agent Platform, Microsoft Foundry, Claude Platform on AWS, and Claude Models on Google Cloud (Anthropic managed). The warning names
ANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_MODEL,--model, andavailableModelsas examples.
The section on "Setting your model" describes that a warning will be displayed when requesting a model that has a scheduled retirement date or will automatically be migrated to a new version. In interactive sessions, this warning will be displayed as a startup notice. From version v2.1.182 onwards, it will also be output to stderr in non-interactive modes with the default text output format.
A list of models spanning multiple providers, including lifetime, is covered on this site's AI Model Deprecation and Lifecycle Calendar. Information on migrating prompts and workloads is available in this site's Anthropic Claude Model Migration Guide.
8. Verifying the Model Used
You can check which model was used and what occurred at each layer in the following locations:| Location | Information Available | Layer |
|---|---|---|
/status | Current model and account. For Bedrock's Mantle, the provider line will display Amazon Bedrock (Mantle). | Overall |
| Status line | If configured, the currently active model. | Overall |
Default line in /model | The default resolution. If it's an organization default, it will display "Org default." If it's a variable, it will display "Set by ANTHROPIC_DEFAULT_MODEL." | Selection, Restriction |
| Header at startup | If the project or managed settings determined the model, the relevant file. | Selection |
| Replacement notifications and warnings | When the selection was replaced due to an allowlist or organizational restriction, displaying the requested model and the model it was replaced with. | Restriction |
| Switching notifications | When switched due to availability fallback. | Availability Fallback |
Transcript notifications and /effort status | When switched due to content-based fallback, and the effort level. | Content-Based Fallback |
modelUsage in result messages | When outputting JSON in non-interactive mode, displaying the model actually used. | Overall |
If content-based fallback occurred on the initial request, try using
claude --safe-mode to start with customizations like CLAUDE.md, skill, MCP servers, and hooks disabled, to determine if a customization was the trigger. The documentation notes that the initial request may carry contextual information from the workspace, such as CLAUDE.md content or Git status, and that repositories containing security or biological material could be blocked by the classifier based on that context alone. Git status and directory names are not considered customizations and are included even with --safe-mode.Availability fallback chains are not displayed in
/status. When using an availability fallback chain, it's necessary to record the value somewhere (Inference).9. Frequently Asked Questions about How Claude Code Selects a Model
Q1. Why doesn't it run on Sonnet 5.5 even though it was launched with --model sonnet?
sonnet is an alias, and the destination varies depending on the provider and the Claude Code version. In v2.1.332, sonnet refers to Sonnet 4.5 on Amazon Bedrock, Sonnet 4.6 on the Claude Platform on AWS, and Sonnet 5 for sessions using Mantle alone. It's also possible that an allowlist replaced the selection. To specify a particular version, use the model's full name or set the ANTHROPIC_DEFAULT_SONNET_MODEL variable (see Sections 3.2 and 3.5).Q2. Can users add entries to a managed availableModels list from their own settings?
No, they cannot. When managed settings define the availableModels list, only that list is used, and items in user, project, or local settings cannot extend the list (see Section 4.2).Q3. If you restrict models with availableModels, does Default stay inside the list?
Not with availableModels alone. With the default prefix matching, Default stays on the account's default. To make Default follow the list, place enforceAvailableModels alongside a non-empty availableModels within the managed settings (see Section 4.5).Q4. If a fallbackModel is configured, will requests blocked by the classifier be handled by an alternative model?
No. The fallbackModel is a fallback setting for availability, designed to function during periods of overload or unavailability. Requests flagged by the classifier will be handled by the content-based fallback mechanism, and their destination will be determined based on the model that flagged them and the category. (See Sections 5.1 and 6.1.)Q5. After switching due to availability fallback, will the subsequent message also be processed by the same model?
No. The chain switch occurs only for that turn, and the primary model will process the next message. Conversely, with content-based fallback, the session continues on the fallback model (see Sections 5.2 and 6.2).Q6. On Bedrock, what settings make sonnet Sonnet 5.5?
To configure Bedrock to use the sonnet model as Sonnet 5.5, you need to either set the ANTHROPIC_DEFAULT_SONNET_MODEL to the Bedrock ID for Sonnet 5.5, or start the session using that ID. If you are using availableModels, ensure that ID is included in the list. If you are also using enforceAvailableModels, Claude Code's startup checks on Bedrock compare the items in the list with the ID of the inference profile they would send, which includes a regional prefix (see Sections 3.5 and 4.4).Q7. Why did errors begin occurring on the Agent Platform starting November 30, 2026?
It may be because the Google Cloud page gives this date as the shutdown date for Sonnet 4.5 on the Agent Platform. In versions prior to v2.1.332, the Agent Platform'ssonnet referred to Sonnet 4.5. Verify the version using claude --version and check the configuration to ensure that it doesn't explicitly reference Sonnet 4.5 (see Sections 3.3 and 7.4).Q8. Can administrators block the target of content-based fallback?
Yes, they can. If the destination model is not permitted byavailableModels, the fallback will not occur, and the request ends with a refusal. The session model will remain unchanged (see Section 6.3).10. Summary
Before deploying Claude Code and when responding to inquiries, verify the following:- Ensure the method for selecting the model aligns with the five priority levels outlined in Section 2.1. Understand that the organization default serves as a starting point, not a limitation.
- Confirm where the aliases point for your provider in the documentation for your Claude Code version. If using the
stablechannel, read the values for that version. - For third-party providers, ensure the version is pinned using either
ANTHROPIC_DEFAULT_*_MODELormodelOverrides. - The
availableModelswithin managed settings are listed using the provider's ID. If you want to restrict the default options, includeenforceAvailableModels. To prevent the use of later versions, usedeniedModelsoravailableModelsMatch, and consider usingrequiredMinimumVersion. - The values for the availability fallback chain are recorded somewhere other than
/status. - Determine whether to include the content-based fallback targets in the allowlist.
- Verify the lifetime of the model each alias points to on the operator's page. Be aware that the dates may differ between Bedrock and other providers.
- A process exists to re-evaluate the alias destination, default settings, and lifetime dates after the verification date.
11. References
- Model configuration - Claude Code Docs
- Claude Code on Amazon Bedrock - Claude Code Docs
- Claude Code on Google Cloud's Agent Platform - Claude Code Docs
- Claude Code on Microsoft Foundry - Claude Code Docs
- Claude Code on Claude Platform on AWS - Claude Code Docs
- Claude Code with Claude Models on Google Cloud (Anthropic managed) - Claude Code Docs
- All settings - Claude Code Docs
- Environment variables - Claude Code Docs
- CLI reference - Claude Code Docs
- Claude Code changelog - Claude Code Docs
- @anthropic-ai/claude-code - npm
- Model deprecations - Claude API Docs
- Claude Sonnet 4.5 - Amazon Bedrock
- Claude Opus 4.5 - Amazon Bedrock
- Claude Haiku 4.5 - Amazon Bedrock
- Claude Sonnet 5.5 - Amazon Bedrock
- Claude Sonnet 5.5 now available on AWS
- Claude Sonnet 4.5 - Google Cloud
- Running Claude Apps Gateway on AWS - What the Gateway Holds and Enforces, What Stays on Developer Machines, and Where the Worked Example Stops
- Claude Code on Pay-As-You-Go API Billing - Anthropic API, Amazon Bedrock, and Google Cloud Vertex AI
- Claude Code Version History and Timeline - Release Channels, Changed Defaults, and Where Each Version Date Comes From
- Claude Code Features and Settings Reference 2026
- Claude Platform on AWS or Amazon Bedrock - Who Operates It, What Differs, and What a Move Breaks
- Where Claude Code Auto Mode Gets Its Verdict - Server Review, the Local Classifier, and the Denial When No Verdict Arrives
- AI Model Deprecation and Lifecycle Calendar - Anthropic, OpenAI, Google, and Amazon Bedrock
- Anthropic Claude Model Migration Guide - Upgrading Prompts and Workloads Across Model Generations
References:
Tech Blog with curated related content
Written by Hidekazu Konishi