-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When using opencode run without --model (or any other way we specify the model), the CLI falls back to Provider.defaultModel() which picks a model based on sort priority. The TUI persists recently used models to model.json and checks them before falling back, but the CLI run path skips this. This means the CLI can select a different default model than what the user last used in the TUI.
Plugins
None
OpenCode version
1.1.53
Steps to reproduce
- Launch opencode (TUI) and switch to a model of your choice and then exit.
- Run opencode run 'Hello' without --model
And then if you see the session or see the model was used some other way, you will see that it did not respect our choice from the TUI
Screenshot and/or share link
No response
Operating System
macOS26.2
Terminal
Ghostty
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working