Skip to content

fix(cli): honor explicit startup model selection - #59663

Closed
hoyyeva wants to merge 1 commit into
anomalyco:v2from
hoyyeva:startup-model-selection
Closed

hoyyeva wants to merge 1 commit into
anomalyco:v2from
hoyyeva:startup-model-selection

Conversation

@hoyyeva

@hoyyeva hoyyeva commented Oct 27, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #56218

Related: #48163, ollama/ollama#19310.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restore root --model / -m and pass it to the TUI. For new sessions, a valid explicit model wins over the agent default. For example, opencode --standalone --model ollama/selected starts with that model even when Build specifies ollama/default.

Later manual selections and resumed-session models retain their precedence. Agent configuration and activation are preserved. Malformed model references warn without interrupting session navigation or redirecting a startup prompt into a new session.

How did you verify your code works?

  • 62 focused TUI tests and 5 CLI parser tests passed; CLI and TUI typechecks passed.
  • Four isolated source CLI/TUI startup cases verified built-in/custom agent overrides, disabled-agent preservation and unchanged saved configuration, using synthetic providers with no real inference.
  • The latest review rerun passed 30 focused tests and both package typechecks. Its lifecycle fixtures were blocked at sandbox listener binding. Full repository lint passed; the broader typecheck stopped on missing unrelated console/web dependencies.

Screenshots / recordings

No layout changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@hoyyeva
hoyyeva marked this pull request as ready for review October 27, 2026 16:56
@opencode-agent opencode-agent Bot closed this Oct 27, 2026
@opencode-agent

Copy link
Copy Markdown
Contributor

Thanks for putting this together, @hoyyeva!

The v2 branch was promoted to dev on 2026-10-10, and dev is now where v2 work happens. This pull request targets a branch that is no longer used, so it's being closed automatically.

Please open it again against dev. You can reuse the same branch: just open a new pull request with dev as the base.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant