Skip to content

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

Closed

Description

@ebreen

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

Activity

  1. github-actions commented on Jan 21, 2026

    @github-actions
    Contributor

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

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

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

  2. ebreen commented on Jan 21, 2026

    @ebreen
    Author

    This looks like the same issue as #9716

  3. ebreen commented on Jan 21, 2026

    @ebreen
    Author

    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 up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions