{{ message }}
Repository navigation
Conversation
The root command accepted --model but dropped it before the TUI started, so `opencode --model <id> --prompt ...` silently ran on the configured default model. Pass the flag through to the TUI args, where the existing args.model handling parses it and selects the model — matching the run path's behavior.
Contributor
Contributor
Author
|
Fixes #47172 — the linked-issue check doesn't resolve the keyword from a fork PR, so referencing it here directly. |
Contributor
Author
|
Gentle nudge — this adds a --model/-m flag to the TUI entry path (root spec + handler arg passthrough), checks green and cli tests passing. Happy to rework or rebase if anything needs adjusting. |
3 of 6 tasks
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Issue for this PR
Fixes #47172
Type of change
What does this PR do?
opencode --model <id> --prompt ...accepted the flag on the root command but dropped it before the TUI started, so the session silently ran on the configured default model — the requested id was never mentioned or validated. Therunpath already resolves and validates the same flag.--model(with-malias) on the root command paramsargs.modelhandling parses it and selects the model, warning on malformed values — matching therunpathHow did you verify your code works?
--helpon the root entry now lists--model, -mbun typecheckinpackages/cliandpackages/tuibun testinpackages/cli(259 passing) andpackages/tui(2 pre-existing timeouts in dialog-shell-output tests reproduce on a clean baseline, unrelated)Checklist