fix(opencode): list OpenCode Go models with reasoning variants - #1265
Conversation
The OpenCode provider authenticated any credentials file entry, so a subscriber who connected OpenCode Go (`opencode-go` in auth.json) counted as logged in - but the curated catalog had no `opencode-go/*` entries at all. The connected-provider filter then found no Go options, fell back to the full catalog, and left Go users staring at a list of models their CLI rejects while every model they pay for was missing. See siteboon#840, which was closed without a fix while the bug persists on main. Add the 27 `opencode-go/<model-id>` entries `opencode models --verbose` reports, with the reasoning-variant values from the same output wired as effort metadata so the existing effort picker resolves them through `--variant`. Labels follow the catalog's existing style; the CLI's marketing suffixes ("(2x usage)", "(New)") are dropped. `DEFAULT` stays on the Zen default - the filter already relocates it for Go-only installs. The docs also list `minimax-m2.5`, but the CLI does not report it, so it is deliberately left out; the catalog mirrors CLI output.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe OpenCode predefined catalog now includes OpenCode Go models, optional effort settings, and updated documentation. Tests verify the provider prefix, curated model options, effort values, and default selection when only OpenCode Go authentication exists. ChangesOpenCode Go catalog
Suggested reviewers: Poem
Merge Risk: ⚪ Minimal · up to OpenCode Go models and supported reasoning variants are added to the catalog, with Go-only authentication selecting a valid Go default. The change is ready to merge with no active current-head risk identified. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
blackmammoth
left a comment
There was a problem hiding this comment.
Hey @larizzo, thanks for the PR. It's been merged. Also, if you’d like to join project discussion or community chat, we have a Discord here: [link](https://discord.gg/buxwujPNRE). Totally optional!
How to reproduce
opencode auth login, or/connect→OpenCode Goin the TUI).~/.local/share/opencode/auth.jsongains anopencode-goentry, and CloudCLI reports the opencode provider as authenticated.opencode-gooptions and falls back to the full catalog, so the picker lists Zen/Anthropic/OpenAI models the CLI refuses outright (Model opencode/claude-sonnet-4-6 is not valid).GET /api/providers/opencode/modelsreturnsauthenticated: truewith zeroopencode-go/*OPTIONS.What this fixes
The OpenCode provider authenticated any credentials-file entry, so a subscriber who connected OpenCode Go (
opencode-goinauth.json) counted as logged in — but the curated catalog shipped zeroopencode-go/*entries. The connected-provider filter then found no Go options, fell back to the full catalog, and left Go users staring at a list of models their CLI rejects while every model they pay for was missing. #840 reported exactly this and was closed without a fix; the bug persists on main.What changed
opencode-go/<model-id>entriesopencode models --verbosereports (per the OpenCode Go docs).--variant(the runtime already validates and passes it).DEFAULTstaysopencode/gpt-5.6-terra; the filter already relocates the default toopencode-go/grok-4.6on Go-only installs.minimax-m2.5, but the CLI does not report it, so it is deliberately left out; the catalog mirrors CLI output.What about screenshots
No UI markup changed — the picker renders whatever
OPTIONSthe models API returns; the fixtures and the API response are the verification surface.Tests
opencode-go, with spot checks: 27 Go entries, effort values exactly as the CLI reports, and the models without variants carrying no effort field.opencode-goresolves the whole catalog to Go models, with the default on the first one andgetCurrentActiveModelagreeing.npm test(397 server tests pass),npm run typecheck,npm run lint:server, andnpm run buildall pass.Notes
Summary by CodeRabbit
New Features
grok-4.6as the default.Tests