Model selection not applied after restart - config shows Opus 4.5 but Sonnet 4 is used #4506

Closed
opened 2026-02-16 17:44:23 -05:00 by yindo · 3 comments
Owner

Originally created by @JulianMason on GitHub (Jan 9, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

After changing the model to Claude Opus 4.5 via /models command and restarting OpenCode, the session still uses Claude Sonnet 4 despite:

  1. The config file correctly showing the new model
  2. The TUI footer displaying "Claude Opus 4.5 (latest)"
  3. Multiple full restarts of OpenCode

When asking the model "what model are you", it consistently responds with "Claude Sonnet 4 (claude-sonnet-4-20250514)".

Steps to Reproduce

  1. Run /models and select anthropic/claude-opus-4-5-20251101
  2. OpenCode shows: "The model change to Opus 4.5 was saved to your config..."
  3. Verify opencode.jsonc contains: "model": "anthropic/claude-opus-4-5-20251101"
  4. Fully exit and restart OpenCode
  5. Start a new session
  6. Ask "what model are you"
  7. Model responds it is Claude Sonnet 4, not Opus 4.5

Expected Behavior

After restart, the new session should use Claude Opus 4.5 as configured.

Actual Behavior

  • TUI footer shows "Claude Opus 4.5 (latest) Anthropic" (correct)
  • Actual model responding is Claude Sonnet 4 (incorrect)

Configuration

{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-opus-4-5-20251101",
  // ... rest of config
}

Environment

  • Platform: macOS (darwin)
  • OpenCode caller: vscode
  • No model-related environment variable overrides present

Screenshots

The TUI clearly shows the discrepancy - footer says Opus 4.5 but model self-identifies as Sonnet 4.

Additional Context

This may be a caching issue or the model parameter not being correctly passed to the Anthropic API. The fallback to Sonnet 4 happens silently with no error messages.

Originally created by @JulianMason on GitHub (Jan 9, 2026). Originally assigned to: @rekram1-node on GitHub. ## Description After changing the model to Claude Opus 4.5 via `/models` command and restarting OpenCode, the session still uses Claude Sonnet 4 despite: 1. The config file correctly showing the new model 2. The TUI footer displaying "Claude Opus 4.5 (latest)" 3. Multiple full restarts of OpenCode When asking the model "what model are you", it consistently responds with "Claude Sonnet 4 (claude-sonnet-4-20250514)". ## Steps to Reproduce 1. Run `/models` and select `anthropic/claude-opus-4-5-20251101` 2. OpenCode shows: "The model change to Opus 4.5 was saved to your config..." 3. Verify `opencode.jsonc` contains: `"model": "anthropic/claude-opus-4-5-20251101"` 4. Fully exit and restart OpenCode 5. Start a new session 6. Ask "what model are you" 7. Model responds it is Claude Sonnet 4, not Opus 4.5 ## Expected Behavior After restart, the new session should use Claude Opus 4.5 as configured. ## Actual Behavior - TUI footer shows "Claude Opus 4.5 (latest) Anthropic" (correct) - Actual model responding is Claude Sonnet 4 (incorrect) ## Configuration ```jsonc { "$schema": "https://opencode.ai/config.json", "model": "anthropic/claude-opus-4-5-20251101", // ... rest of config } ``` ## Environment - Platform: macOS (darwin) - OpenCode caller: vscode - No model-related environment variable overrides present ## Screenshots The TUI clearly shows the discrepancy - footer says Opus 4.5 but model self-identifies as Sonnet 4. ## Additional Context This may be a caching issue or the model parameter not being correctly passed to the Anthropic API. The fallback to Sonnet 4 happens silently with no error messages.
yindo closed this issue 2026-02-16 17:44:23 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 9, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7211: The selected model is not taken into account - Similar issue where selected model defaults to another model despite configuration
  • #7430: Models in subagents override TUI session model - Related to model selection not being preserved correctly
  • #6928: Subtask commands do not inherit model - Shows a broader pattern of model configuration not being applied correctly

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 9, 2026): This issue might be a duplicate of existing issues. Please check: - #7211: The selected model is not taken into account - Similar issue where selected model defaults to another model despite configuration - #7430: Models in subagents override TUI session model - Related to model selection not being preserved correctly - #6928: Subtask commands do not inherit model - Shows a broader pattern of model configuration not being applied correctly Feel free to ignore if none of these address your specific case.
Author
Owner

@ArnoAldridge commented on GitHub (Jan 12, 2026):

I have the same problem

Image Image
@ArnoAldridge commented on GitHub (Jan 12, 2026): I have the same problem <img width="1873" height="453" alt="Image" src="https://github.com/user-attachments/assets/4c259f0e-d1ad-44a3-a9eb-2c5d5bab5d7d" /> <img width="1677" height="168" alt="Image" src="https://github.com/user-attachments/assets/17843439-dac9-4941-bc2c-48b653699e59" />
Author
Owner

@rekram1-node commented on GitHub (Jan 12, 2026):

guys the model is LYING dont listen to what it claims to be you can sniff the requests the selected model IS correct, claude code gets arround this issue by adding to the system prompt:

You are

We dont do that but should just to prevent people from thinking this

But know that llms lie and asking them what they are isnt reliable

@rekram1-node commented on GitHub (Jan 12, 2026): guys the model is LYING dont listen to what it claims to be you can sniff the requests the selected model IS correct, claude code gets arround this issue by adding to the system prompt: You are <model> We dont do that but should just to prevent people from thinking this But know that llms lie and asking them what they are isnt reliable
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4506