give the OpenCode reviewer a model dropdown and hide reviewers this machine can't run - #6078
Merged
Merged
Conversation
…achine can't run The reviewer picker's Model cell was a bare text input for OpenCode, and its Add row offered every reviewer in the roster regardless of whether the machine could run one. - OpenCode's options now come from the seeded OpenCode Zen CLI/TUI records, whose namespaced `opencode/*` ids the Harnesses page refreshes from `opencode models`. The local-runtime wrappers stay excluded: their ids resolve only under the config a PortOS-spawned provider injects, and the reviewer runs a bare `opencode` against the user's own config. - Each reviewer's options now UNION every provider record fronting its binary instead of reading one. Sourcing from a single record is what hid `claude-sonnet-5` behind the CLI record's retired `claude-sonnet-4-6` while `claude-code-tui` already listed the current tier. - The Add row folds a reviewer whose CLI is missing, or whose provider records are all switched off, behind a `+N unavailable` toggle. Hidden rather than dropped: both checks are local-machine-only and the reviewer list is federation-wide config, so the toggle reveals them badged with which signal fired, and an already-selected reviewer always renders its row. Migration 337 repairs the underlying data: `claude` has no `models` subcommand, so nothing in the app can refresh a stale Claude record. It inserts `claude-sonnet-5` after a retired `claude-sonnet-4-6` even on a curated list, which migration 153's exact-match policy skipped. Additive on purpose — the retired id and every tier pointer survive, since 4-6 still resolves and the defect is the new tier being absent, not the old one being present.
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.
Summary
opencode/*ids the Harnesses page refreshes fromopencode models. Theopencode-<local-backend>wrappers stay excluded — their ids resolve only under theOPENCODE_CONFIG_CONTENTa PortOS-spawned provider injects, and the reviewer runs a bareopencodeagainst the user's own config. Still free-text underneath, so a config-declared namespace can be typed.claude-sonnet-4-6fromclaude-codewhileclaude-code-tuialready listedclaude-sonnet-5. The CLI record still owns the shown default, since the reviewer is spawned non-interactively. Bedrock records are excluded (theirus.anthropic.*ids resolve only in that environment).+N unavailabletoggle. Hidden, not dropped: both checks are local-machine-only and the reviewer list is federation-wide config, so the toggle reveals them badged with which signal fired, and an already-selected reviewer always renders its row.claudehas nomodelssubcommand, so nothing in the app can refresh a stale Claude record. It insertsclaude-sonnet-5after a retiredclaude-sonnet-4-6even on a curated list, which migration 153's exact-match policy skipped.Why the migration is additive
153/206 rewrote
modelsonly on a list matching the prior seed exactly, leaving a user who had appended one id stuck on the retired tier. 337 targets exactly those records, so it takes the opposite policy:claude-sonnet-4-6and every tier pointer survive untouched. That id still resolves for the CLI, and the defect is the new tier being absent, not the old one being present. A record already listingclaude-sonnet-5is untouched, so it is a no-op on a seeded install and on a second run.Test plan
client: 1952 tests pass acrosscomponents/cos,hooks,components/settings.providerDisabledseparating "all switched off" from "no records" and "fetch failed".scripts/migrations+reviewerConfig+codeReviewsuites pass (2072 tests).Follow-up filed as #6072:
makeSeededProviderTierMigrationexists to generalize this shape but no migration calls it, so 337 is the third hand-rolled copy of the same scaffolding.