[BUG] /model switching drops [1m] context variant for Opus 4.7 but preserves it for Sonnet 4.6
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?
The /model slash command is inconsistent in how it preserves the 1M-context variant flag ([1m]) when switching between models. Switching to Sonnet 4.6 from Opus 4.7 (1M) preserves the 1M flag. Switching back to Opus 4.7 from Sonnet 4.6 (1M) silently drops the 1M flag and lands on the base 200K-context Opus variant.
This means a session that started on claude-opus-4-7[1m] can end up on the base claude-opus-4-7 after a single round-trip through the model picker, with no warning that the available context window just shrank from 1M to 200K.
Workaround: Use the explicit model ID with /model claude-opus-4-7[1m] instead of selecting from the picker, or set "model": "claude-opus-4-7[1m]" in ~/.claude/settings.json to make the 1M variant the persistent default.
What Should Happen?
The model picker should preserve the [1m] variant flag in both directions, the same way it does when switching to Sonnet. If the variant cannot be preserved (e.g. the 1M variant of the target model isn't entitled), the picker should say so explicitly rather than silently downgrade.
Error Messages/Logs
-
Steps to Reproduce
- Start a Claude Code session on claude-opus-4-7[1m] (e.g. claude --model 'claude-opus-4-7[1m]')
- Confirm the model: status line / /model shows Opus 4.7 (1M context)
- Run /model and select Sonnet 4.6 from the picker
- Output: Set model to Sonnet 4.6 (1M context) — 1M flag preserved
- Run /model and select Opus 4.7 from the picker
- Output: Set model to Opus 4.7 — 1M flag dropped
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.128
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗