Repository navigation
fix(server): label OpenCode 2 models with their provider in the model picker - #14971
MaxAnderson95 wants to merge 1 commit into
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped OpenCode 2 model-picker fix that enriches existing models with provider labels while preserving provider-ID fallbacks and existing model-list error handling. The changes affect display metadata only and introduce no new workflow, schema, deployment, or static-analysis configuration behavior. Notes:
No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughOpenCode 2 model loading now fetches provider metadata with models and attaches matching provider names. Model picker entries use the provider name as the sub-provider label, or the provider ID when the name is missing or blank. ChangesOpenCode 2 provider labels
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change labels OpenCode 2 models in the model picker with their provider name, falling back to the provider ID. Failures when loading provider names do not block the model list. No merge-blocking risk was identified. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to Provider names affect display labels, not which model runs, connection destinations, or permissions. A slow label lookup can temporarily delay available choices, but the reviewed change introduces no material security risk. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Dismissing prior approval to re-evaluate 6583063
6583063 to
2675798
Compare
… picker OpenCode 2's model list carries only a provider id, so every OpenCode 2 model showed as plain "OpenCode" and models served by several providers looked identical. Read provider.list alongside model.list and set subProvider from the provider's name, falling back to the provider id.
2675798 to
165ddc4
Compare
|
Making T3 Unusable for me right now, please merge ASAP! |
|
Note Grok responding on behalf of Julius. Thanks for working on this! #17424 just landed on main (7b09ac7) and fixes #14962 the same way: it reads OpenCode 2's provider list alongside the model list and sets each model's |
Problem
With OpenCode 2, every model in the picker is labeled only
OpenCode. A model served by several connected providers shows up as identical rows: on my machine, Claude Opus 5.5 appears three times with nothing to tell the rows apart. OpenCode 1.x labeled each rowOpenCode · <provider>.Closes #14962
Change
The OpenCode 2 status check built models without
subProvider, and OpenCode 2'smodel.listcarries only aproviderID. The driver now readsprovider.listalongsidemodel.listand attaches each model's provider name, andcheckOpenCode2setssubProviderfrom that name, falling back toproviderIDwhen a provider has none. A failedprovider.listalso falls back to provider ids instead of failing the model list. The picker already renderssubProvideron web and mobile, so no client change is needed.Scope and approval
Triaged in #14962: #14962 (comment). The triage comment proposes this fix: join
provider.list'snameonto each model assubProvider, fall back toproviderID, and add a test with one model name shared across two provider ids.Verification
OpenCodeProvider.test.tswith twoClaude Opus 5.5models from different providers, one with a provider name and one without. It asserts distinct slugs labeledAnthropicandgithub-copilot. It fails without the fix and passes with it:vp test run apps/server/src/provider/Layers/OpenCodeProvider.test.ts apps/server/src/provider/Drivers/OpenCodeDriver.test.ts(2 files, 33 tests).vp lintandvp fmton the changed files, andtsc --noEmitforapps/server, report nothing in the changed files./api/modellists Claude Opus 5.5 underanthropic,openrouter,github-copilot, andopencode, and/api/providernames all four providers.Model: Claude Opus 5.5. Harness: OpenCode.