claude-code - 💡(How to fix) Fix [BUG]Model selection not persisting in VSCode extension - silently falls back to Sonnet [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#53311Fetched 2026-04-26 05:18:59
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied. Try /model claude-opus-4-7 → error Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied. Try /model claude-opus-4-7 → error

Error Messages/Logs

Try /model claude-opus-4-7 → error

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Body:

Version: 2.1.120 (darwin-arm64)

Environment: VSCode extension (not CLI)

Bug:

/model claude-opus-4-7 command returns "isn't available in this environment" Adding "model": "claude-opus-4-7" to ~/.claude/settings.json gets silently reverted by the extension on every write No visible indicator that the model selection failed — UI shows nothing wrong Result: Spent 50% of weekly usage on Sonnet while believing Opus was active Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied.

Steps to reproduce:

Open Claude Code in VSCode extension Try /model claude-opus-4-7 → error Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json Extension reverts the field silently All subsequent sessions run on Sonnet with no warning

What Should Happen?

Body:

Version: 2.1.120 (darwin-arm64)

Environment: VSCode extension (not CLI)

Bug:

/model claude-opus-4-7 command returns "isn't available in this environment" Adding "model": "claude-opus-4-7" to ~/.claude/settings.json gets silently reverted by the extension on every write No visible indicator that the model selection failed — UI shows nothing wrong Result: Spent 50% of weekly usage on Sonnet while believing Opus was active Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied.

Steps to reproduce:

Open Claude Code in VSCode extension Try /model claude-opus-4-7 → error Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json Extension reverts the field silently All subsequent sessions run on Sonnet with no warning

Error Messages/Logs

Steps to Reproduce

Open Claude Code in VSCode extension Try /model claude-opus-4-7 → error Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json Extension reverts the field silently All subsequent sessions run on Sonnet with no warning

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.120

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

No response

extent analysis

TL;DR

The issue can be mitigated by manually setting the model to "claude-opus-4-7" and verifying that the extension does not revert the change.

Guidance

  • Verify that the "claude-opus-4-7" model is available in the current environment by checking the list of supported models.
  • Check the extension's documentation to see if there are any specific requirements or limitations for using the "claude-opus-4-7" model.
  • Try setting the model to "claude-opus-4-7" using a different method, such as through the VSCode extension's settings UI, to see if the issue is specific to the /model command or the ~/.claude/settings.json file.
  • If the issue persists, try resetting the VSCode extension's settings to their default values to see if the problem is related to a specific configuration.

Notes

The issue seems to be related to the VSCode extension's behavior when setting the model to "claude-opus-4-7". The fact that the extension reverts the change silently suggests that there may be a bug or limitation in the extension's implementation.

Recommendation

Apply workaround: Manually set the model to "claude-opus-4-7" and verify that the extension does not revert the change, as this may help to mitigate the issue until a fix is available.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG]Model selection not persisting in VSCode extension - silently falls back to Sonnet [1 comments, 2 participants]