Model selection in UI is ignored - reverts to default model instead #7076

Closed
opened 2026-02-16 18:06:07 -05:00 by yindo · 3 comments
Owner

Originally created by @ebreen on GitHub (Jan 21, 2026).

Originally assigned to: @rekram1-node on GitHub.

Bug Description

When selecting a model in the OpenCode UI model selector, the selection is ignored when submitting a prompt. The system reverts to using a default model instead of the user-selected model.

Expected Behavior

User selects a model in the UI → Submit prompt → System uses the selected model

Actual Behavior

User selects a model in the UI → Submit prompt → System ignores selection and uses default model (e.g., Gemini 3 Pro Preview)

Steps to Reproduce

  1. Open OpenCode in a directory with existing auth credentials for multiple providers
  2. Open the model selector (Ctrl+O or via UI)
  3. Select a different model than the default
  4. Submit a prompt
  5. Observe that the system uses a different model than selected

Environment

  • OS: macOS (darwin)
  • OpenCode version: Latest (as of 2026-01-21)
  • Providers configured: anthropic (oauth), google (oauth), zai-coding-plan (api)

Troubleshooting Already Done

1. Plugin interference testing

  • Disabled oh-my-opencode plugin → Issue persists
  • Disabled opencode-antigravity-auth plugin → Issue persists
  • Result: Issue is in OpenCode core, not plugins

2. Log analysis

Logs show the system auto-selecting models:

3. Configuration files checked

  • ~/.config/opencode/opencode.json - No global model set
  • ~/.local/share/opencode/auth.json - Auth credentials present
  • ~/.config/opencode/oh-my-opencode.json - Has agent configs
  • No config.json in ~/.local/share/opencode/

4. Environment

  • No OPENCODE_MODEL env var set
  • No model-specific env vars that would override

What Should Happen

The model selected in the UI should be respected and used for the session.

Additional Notes

  • The issue occurs consistently across sessions
  • Both primary providers (anthropic, google) show this behavior
  • This appears to be a regression or design flaw in how OpenCode handles model selection persistence
Originally created by @ebreen on GitHub (Jan 21, 2026). Originally assigned to: @rekram1-node on GitHub. ## Bug Description When selecting a model in the OpenCode UI model selector, the selection is ignored when submitting a prompt. The system reverts to using a default model instead of the user-selected model. ## Expected Behavior User selects a model in the UI → Submit prompt → System uses the selected model ## Actual Behavior User selects a model in the UI → Submit prompt → System ignores selection and uses default model (e.g., Gemini 3 Pro Preview) ## Steps to Reproduce 1. Open OpenCode in a directory with existing auth credentials for multiple providers 2. Open the model selector (Ctrl+O or via UI) 3. Select a different model than the default 4. Submit a prompt 5. Observe that the system uses a different model than selected ## Environment - **OS**: macOS (darwin) - **OpenCode version**: Latest (as of 2026-01-21) - **Providers configured**: anthropic (oauth), google (oauth), zai-coding-plan (api) ## Troubleshooting Already Done ### 1. Plugin interference testing - Disabled oh-my-opencode plugin → Issue persists - Disabled opencode-antigravity-auth plugin → Issue persists - **Result**: Issue is in OpenCode core, not plugins ### 2. Log analysis Logs show the system auto-selecting models: ### 3. Configuration files checked - ~/.config/opencode/opencode.json - No global model set - ~/.local/share/opencode/auth.json - Auth credentials present - ~/.config/opencode/oh-my-opencode.json - Has agent configs - No config.json in ~/.local/share/opencode/ ### 4. Environment - No OPENCODE_MODEL env var set - No model-specific env vars that would override ## What Should Happen The model selected in the UI should be respected and used for the session. ## Additional Notes - The issue occurs consistently across sessions - Both primary providers (anthropic, google) show this behavior - This appears to be a regression or design flaw in how OpenCode handles model selection persistence
yindo closed this issue 2026-02-16 18:06:07 -05:00
Author
Owner

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

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

  • #9716: OpenCode switching models unbidden - Reports the system switching to a different model (Gemini 3 Pro) without user action, similar symptoms to this issue
  • #6636: Subagent with specific model results in model change - Related to unintended model changes during session

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

For keybind-related issues, please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Jan 21, 2026): This issue might be a duplicate of existing issues. Please check: - #9716: OpenCode switching models unbidden - Reports the system switching to a different model (Gemini 3 Pro) without user action, similar symptoms to this issue - #6636: Subagent with specific model results in model change - Related to unintended model changes during session Feel free to ignore if none of these address your specific case. For keybind-related issues, please also check our pinned keybinds documentation: #4997
Author
Owner

@ebreen commented on GitHub (Jan 21, 2026):

This looks like the same issue as #9716

@ebreen commented on GitHub (Jan 21, 2026): This looks like the same issue as #9716
Author
Owner

@ebreen commented on GitHub (Jan 21, 2026):

User @huangy-coder confirmed it was the skill called "Superpowers" that caused this issue in issue #9800

I can confirm after uninstall Superpowers it works again.

@ebreen commented on GitHub (Jan 21, 2026): User @huangy-coder confirmed it was the skill called "Superpowers" that caused this issue in issue #9800 I can confirm after uninstall Superpowers it works again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7076