You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE]: tui: allow selecting a model with --model when launching the TUI #57259
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Description
In OpenCode V2, the opencode command does not accept --model / -m when launching the full-screen TUI. It only appears to be supported by opencode run.
In V1, I could start the TUI with a specific model:
opencode -m "provider/model"
In V2, this fails:
opencode --model "provider/model"
ERROR
Unrecognized flag: --model in command opencode
Problem
This breaks a common terminal workflow: launching OpenCode directly with a chosen model, especially for shell aliases, scripts, project shortcuts, and users who switch models frequently.
Selecting the model with /models after opening the TUI works, but it requires an extra manual step every time.
Proposed solution
Support the documented --model / -m flag on the top-level opencode command, accepting a provider/model identifier and applying it to the newly created TUI session.
Example:
opencode -m "provider/model"
It should also work together with an optional project directory:
Thanks for the clear write-up! I think this is a duplicate of #56218, which reports the same thing: in v2 the root opencode command no longer accepts -m/--model (it fails with Unrecognized flag), though v1 did, and it asks for the flag back so the TUI can start with a chosen model.
These are the possible duplicates and related issues, most likely first:
We haven't heard back, so I'm closing this as a duplicate of #56218. That issue asks for the same thing: having opencode -m/--model start the v2 TUI with a chosen model, as it did in v1. Please follow #56218 for updates, and add a 👍 or a comment there if you have more details. If your request turns out to be different, reply here and we can reopen it. Thanks for the report!
Activity
opencode-agent commentedon Oct 20, 2026
Thanks for the clear write-up! I think this is a duplicate of #56218, which reports the same thing: in v2 the root
opencodecommand no longer accepts-m/--model(it fails withUnrecognized flag), though v1 did, and it asks for the flag back so the TUI can start with a chosen model.These are the possible duplicates and related issues, most likely first:
opencode -m provider/modelno longer accepted on root command (worked in v1) #56218: same request.opencode -m provider/modelis rejected on the root command in v2 but worked in v1.--agenton the root TUI command.--modelto the root command and passes it to the TUI.--varianton the plainopencodecommand.Please follow #56218 for updates. The bot will close this issue as a duplicate in 1 day unless you reply explaining how your request is different.
opencode-agent commentedon Oct 21, 2026
We haven't heard back, so I'm closing this as a duplicate of #56218. That issue asks for the same thing: having
opencode -m/--modelstart the v2 TUI with a chosen model, as it did in v1. Please follow #56218 for updates, and add a 👍 or a comment there if you have more details. If your request turns out to be different, reply here and we can reopen it. Thanks for the report!