ANTHROPIC_DEFAULT_OPUS_MODEL
Updated by Alex Sorokoletov
ANTHROPIC_DEFAULT_OPUS_MODEL sets the model ID the opus alias resolves to, and the model opusplan uses in Plan Mode. Default: Opus 5.5 on the Anthropic API, Bedrock, Agent Platform and Claude Platform on AWS; Opus 4.6 on Foundry. Values: a model ID for your provider, such as claude-opus-4-8, a Bedrock inference profile ID or ARN; add [1m] for a 1M variant. Its release history is not tracked here. It is listed in the official reference.
| Status | Present in v2.1.332 |
|---|---|
| Default | Opus 5.5 on the Anthropic API, Bedrock, Agent Platform and Claude Platform on AWS; Opus 4.6 on Foundry |
| Values | a model ID for your provider, such as claude-opus-4-8, a Bedrock inference profile ID or ARN; add [1m] for a 1M variant |
| Category | Models and thinking |
| Official docs | Listed |
| Checked against | v2.1.330 |
How to set it
For one session, export it in the shell that starts Claude Code:
export ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-8
claudeUs.anthropic.claude-opus-4-8 pins the opus alias to Opus 4.8 on Amazon Bedrock.
To apply it to every session, add it to the env object of a settings file:
// ~/.claude/settings.json
{
"env": {
"ANTHROPIC_DEFAULT_OPUS_MODEL": "us.anthropic.claude-opus-4-8"
}
}Known issues
- Setting it collapses the Opus family in the /model picker to one row labelled Custom Opus model, so other Opus versions are not listed. ANTHROPIC_DEFAULT_OPUS_MODEL_NAME and _DESCRIPTION set the row's text. Source: issue #81689.
- For a model that reaches 1M context through its [1m] variant, such as Opus 4.6, append [1m] to the ID, for example claude-opus-4-6[1m]. Source: docs: model config.
- In the VS Code extension, a value set in the settings env block makes sessions restored after a restart switch to the model last picked in any session. Source: issue #108923.
Related variables
ANTHROPIC_DEFAULT_OPUS_MODEL_DESCRIPTIONANTHROPIC_DEFAULT_OPUS_MODEL_NAMEANTHROPIC_DEFAULT_OPUS_MODEL_SUPPORTED_CAPABILITIESANTHROPIC_DEFAULT_FABLE_MODELANTHROPIC_DEFAULT_FABLE_MODEL_DESCRIPTIONANTHROPIC_DEFAULT_FABLE_MODEL_NAMEANTHROPIC_DEFAULT_FABLE_MODEL_SUPPORTED_CAPABILITIESANTHROPIC_DEFAULT_HAIKU_MODEL: Override Haiku model ID.
Frequently asked questions
What does ANTHROPIC_DEFAULT_OPUS_MODEL do?
Sets the model ID the opus alias resolves to, and the model opusplan uses in Plan Mode.
What is the default value of ANTHROPIC_DEFAULT_OPUS_MODEL?
Opus 5.5 on the Anthropic API, Bedrock, Agent Platform and Claude Platform on AWS; Opus 4.6 on Foundry.
What values does ANTHROPIC_DEFAULT_OPUS_MODEL accept?
A model ID for your provider, such as claude-opus-4-8, a Bedrock inference profile ID or ARN; add [1m] for a 1M variant.
Which Claude Code version has ANTHROPIC_DEFAULT_OPUS_MODEL?
Its release history is not tracked here.
How do I set ANTHROPIC_DEFAULT_OPUS_MODEL?
Export it before starting Claude Code (export ANTHROPIC_DEFAULT_OPUS_MODEL=us.anthropic.claude-opus-4-8), or add it to the "env" object in ~/.claude/settings.json to apply it to every session. Us.anthropic.claude-opus-4-8 pins the opus alias to Opus 4.8 on Amazon Bedrock.
All variables, searchable: Claude Code environment variables.