Skip to content

fix(tui): default to configured agent variants - #47076

Closed
opencode-agent[bot] wants to merge 1 commit into
v2from
agent-variant-default
Closed

opencode-agent[bot] wants to merge 1 commit into
v2from
agent-variant-default

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

Use the selected agent's configured model variant as the default for a fresh TUI session, ahead of the saved per-model preference. Previously the new-session model copy discarded the agent's variant.

  • Keep manual variant choices editable, including an explicit default/no-variant choice.
  • Preserve overrides independently for each agent and location, and retain the current variant when reselecting the same model.
  • Continue using saved preferences when no agent variant is configured or when selecting another model.
  • Leave existing sessions' durable selections unchanged.

This change is scoped to the full TUI. Mini and ACP startup behavior is unchanged.

Validation

From packages/tui:

bun test test/context/local-variant.test.tsx test/context/local.test.ts test/model-preference.test.ts test/mini/variant.shared.test.ts test/cli/tui/dialog-session-list.test.tsx
bun typecheck
  • 14 focused tests pass, with 75 assertions; typecheck, formatting, and diff checks pass.
  • The real LocalProvider regression test failed before the fix for both a conflicting saved preference and no saved preference.
  • Tested the real TUI on Linux in a 112×34 terminal with the dark OpenCode theme, isolated HOME/XDG directories, a configured local fixture model, and no inference requests.
  • Before f98a6286da8e496e9287e4dbe36b6f9a7153c7a4: agent configured low, saved preference medium, footer shows medium.
  • After 104b483bb9a347c5407d845bd8bffa16134b1bde: footer starts at low; choosing high through the variant picker works; cycling to default remains unset after changing Plan's variant and returning to Build. Prompt focus remains editable.

Requested by: @rekram1-node (Aiden via Slack)

@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant