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
- Open OpenCode in a directory with existing auth credentials for multiple providers
- Open the model selector (Ctrl+O or via UI)
- Select a different model than the default
- Submit a prompt
- 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
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
Environment
Troubleshooting Already Done
1. Plugin interference testing
2. Log analysis
Logs show the system auto-selecting models:
3. Configuration files checked
4. Environment
What Should Happen
The model selected in the UI should be respected and used for the session.
Additional Notes