Description
Related issues from pre-1.0:
Now in 1.0, if I set my model in the config file then the model correctly doesn't change when I switch agents:
- In config
opencode.jsonc, set "model": "anthropic/claude-sonnet-4-5"
- Run
opencode → UI shows "Anthropic Claude Sonnet 4.5"
- Press
tab to switch agents → UI still shows "Anthropic Claude Sonnet 4.5" — correct
- In config
opencode.jsonc, set "model": "openai/gpt-5"
- Run
opencode → UI shows "OpenAI GPT-5"
- Press
tab to switch agents → UI still shows "OpenAI GPT-5" — correct
But if I instead set my model using -m/--model on the command line, then when I switch agents the model incorrectly changes to the last-used model:
- Disable config
"model" setting above
- Run
opencode (with no -m and no config "model")
- UI shows "OpenAI GPT-5" — correct, last-used model (from above)
- Press
tab to switch agents → UI still shows "OpenAI GPT-5" — correct, last-used model (from above)
- Run
opencode -m anthropic/claude-sonnet-4-5
- UI shows "Anthropic Claude Sonnet 4.5" — correct
- Press
tab to switch agents → UI shows "OpenAI GPT-5" — bug, last-used model instead of -m model
- Run
opencode (with no -m and no config "model")
- UI shows "Anthropic Claude Sonnet 4.5" — correct
- Press
tab to switch agents → UI shows "Anthropic Claude Sonnet 4.5" — weird, now it works?
- Run
opencode -m openai/gpt-5
- UI shows "OpenAI GPT-5" — correct
- Press
tab to switch agents → UI shows "Anthropic Claude Sonnet 4.5" — bug, last-used model instead of -m model
- Run
opencode (with no -m and no config "model")
- UI shows "OpenAI GPT-5" — correct
- Press
tab to switch agents → UI shows "OpenAI GPT-5" — weird, now it works?
OpenCode version
1.0.18
Steps to reproduce
(above)
Screenshot and/or share link
No response
Operating System
macOS 15.5
Terminal
VS Code terminal
Description
Related issues from pre-1.0:
Now in 1.0, if I set my model in the config file then the model correctly doesn't change when I switch agents:
opencode.jsonc, set"model": "anthropic/claude-sonnet-4-5"opencode→ UI shows "Anthropic Claude Sonnet 4.5"tabto switch agents → UI still shows "Anthropic Claude Sonnet 4.5" — correctopencode.jsonc, set"model": "openai/gpt-5"opencode→ UI shows "OpenAI GPT-5"tabto switch agents → UI still shows "OpenAI GPT-5" — correctBut if I instead set my model using
-m/--modelon the command line, then when I switch agents the model incorrectly changes to the last-used model:"model"setting aboveopencode(with no-mand no config"model")tabto switch agents → UI still shows "OpenAI GPT-5" — correct, last-used model (from above)opencode -m anthropic/claude-sonnet-4-5tabto switch agents → UI shows "OpenAI GPT-5" — bug, last-used model instead of-mmodelopencode(with no-mand no config"model")tabto switch agents → UI shows "Anthropic Claude Sonnet 4.5" — weird, now it works?opencode -m openai/gpt-5tabto switch agents → UI shows "Anthropic Claude Sonnet 4.5" — bug, last-used model instead of-mmodelopencode(with no-mand no config"model")tabto switch agents → UI shows "OpenAI GPT-5" — weird, now it works?OpenCode version
1.0.18
Steps to reproduce
(above)
Screenshot and/or share link
No response
Operating System
macOS 15.5
Terminal
VS Code terminal