[BUG] opusplan setting doesn't switch to Opus during plan mode
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
When using "model": "opusplan" in settings, Claude Code does not switch to the Opus model during plan mode. The model remains on Sonnet throughout the planning session.
Expected Behavior
Claude should report running on Opus 4.5 during plan mode.
Additional Context
- Manual switching works: /model opus and /model sonnet correctly switch to the respective Bedrock ARNs
- Using AWS Bedrock inference profiles (not direct Anthropic API)
- Claude Code version: 2.1.2
Question
Is opusplan supported when using custom Bedrock ARNs via ANTHROPIC_DEFAULT_OPUS_MODEL? If not, please document this limitation.
What Should Happen?
Claude reports running on Sonnet 4.5 even while in plan mode. The automatic model switch isn't happening.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Set "model": "opusplan" in settings
- Enter plan mode (/plan or start a planning task)
- Ask Claude which model it's running on or run /status
- Set "model": "opusplan" in settings
- Enter plan mode (/plan or start a planning task)
- Ask Claude which model it's running on or run /status
Claude Model
Other
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.2
Platform
AWS Bedrock
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Configuration
~/.claude/settings.json:
{
"env": {
"ANTHROPIC_DEFAULT_SONNET_MODEL": "arn:aws:bedrock:us-east-1:...:inference-profile/global.anthropic.claude-sonnet-4-5-20250929-v1:0",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "arn:aws:bedrock:us-east-1:...:inference-profile/global.anthropic.claude-opus-4-5-20251101-v1:0"
},
"model": "opusplan"
}
11 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
Hi, trying to test out
opusplanand have the same issue, only switching manually works, i switched to opusplan by doing/model opusplanand it "adds" the opusplan as a separate model.Maybe I've missed an update or a doc entry, but this seems so contrived, why not just add an option so we can tell it what to use in plan mode and what to use in execution. I guess sub agents might be able to do the trick but it feels like a workaround for something that should have been simple.
And it doesn't help that they have a section for "opusplan" in their docs which implies it should be operational.
Any updates please?
yep, same experience here
I use Claude Max subscription.
If I set a model as
/model opusplanin Claude Code (2.1.45) and switch to Plan mode then I see latest Opus in a/contextoutput, If I switch back from Plan mode then I see latest Sonnet.If you set a
Haikumodel as default, then Sonnet will be active in Plan mode.It should work in the same way for AWS.
Docs: https://code.claude.com/docs/en/model-config
I can reproduce the issue.
I use bedrock, have configured
ANTHROPIC_DEFAULT_OPUS_MODEL,ANTHROPIC_DEFAULT_SONNET_MODEL,ANTHROPIC_DEFAULT_HAIKU_MODEL, use{ "model": "opusplan" }in my~/.claude/settings.json.I use plan mode extensively, but when I look at my aws cost explorer I was never charged for opus.
<img width="247" height="203" alt="Image" src="https://github.com/user-attachments/assets/2ef2e3e4-bec3-4fdf-b265-60c7c5575087" />
<img width="810" height="325" alt="Image" src="https://github.com/user-attachments/assets/a7aee315-09f9-46cc-9d64-33dd24025933" />
Same issue here on v2.1.61 (Linux, API direct — not Bedrock/Vertex).
/model opusplanresolves toclaude-sonnet-4-6in both plan mode and execution mode. The system prompt confirms: "You are powered by the model named Sonnet 4.6. The exact model ID is claude-sonnet-4-6" — even while actively in plan mode.Expected: Opus 4.6 in plan mode, Sonnet 4.6 in execution mode.
Same here on v..2.1.68, but it's been the case of the past few months. We use bedrock.
Confirming this bug in non-interactive (
-p) mode with Claude Code v2.1.86Adding data from an automated CI/CD use case (hive-mind issue solver). We pass
--model opusplanwith the-pflag for headless operation, and the bug manifests there as well.Our configuration
Environment variables set:
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-4-6What happened
The init event reported:
All API calls throughout the session used
claude-sonnet-4-6(main) andclaude-haiku-4-5-20251001(sub-agents). Zero Opus API calls in the entire session despiteopusplanbeing requested.Full log evidence
Full session log (gist) — search for
model:to see all API requests going to sonnet/haiku, never opus.Key lines from the log
| Line | Content |
|------|---------|
| 214 |
claude --model opusplan -p "..."(correct command) || 452 |
ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-4-6(env var set correctly) || 502 |
"model": "claude-sonnet-4-6"(init event — wrong model!) || 555 |
model: 'claude-sonnet-4-6'(first API call — sonnet, not opus) |Environment
2.1.86-pflag)This confirms the bug is not Bedrock-specific — it reproduces with the direct Anthropic API in non-interactive mode as well.
@Felix-M-27 check with a
/contextcommand@Felix-M-27 in general your report looks like as expected, the most reliable option here to figure out actual model in use is the
/context.the opusplan is just an alias, main model is supposed to be the sonnet.
I observed this:
opusplan only works when manually setting opus and sonnet like so:
Now the interesting and inconsistent part:
running a command like this:
/plan my planwill get routed to sonnet at first, but if you run/planand then type the plan, it will get routed to Opus correctly.We are using bedrock as well.