[FEATURE]: tui: allow selecting a model with --model when launching the TUI · Issue #57259 · anomalyco/opencode · GitHub
Skip to content

[FEATURE]: tui: allow selecting a model with --model when launching the TUI #57259

Closed as duplicate

Description

@telsoncc

Feature hasn't been suggested before.

  • 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:

opencode /path/to/project -m "provider/model"

Environment

  • OS: Windows 11
  • OpenCode: V2
  • Terminal: PowerShell

Activity

  1. opencode-agent commented on Oct 20, 2026

    @opencode-agent
    Contributor

    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:

    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.

  2. opencode-agent commented on Oct 21, 2026

    @opencode-agent
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions