Skip to content

fix(opencode): list OpenCode Go models with reasoning variants - #1265

Merged
blackmammoth merged 1 commit into
siteboon:mainfrom
larizzo:fix/opencode-go-models
Sep 7, 2026
Merged

fix(opencode): list OpenCode Go models with reasoning variants#1265
blackmammoth merged 1 commit into
siteboon:mainfrom
larizzo:fix/opencode-go-models

Conversation

@larizzo

@larizzo larizzo commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

How to reproduce

  1. Connect OpenCode Go (e.g. opencode auth login, or /connectOpenCode Go in the TUI). ~/.local/share/opencode/auth.json gains an opencode-go entry, and CloudCLI reports the opencode provider as authenticated.
  2. Open the OpenCode model picker: every Go model is missing. On a Go-only install the connected-provider filter finds no opencode-go options 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).
  3. Equivalently, GET /api/providers/opencode/models returns authenticated: true with zero opencode-go/* OPTIONS.

What this fixes

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 shipped zero opencode-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

  • Add the 27 opencode-go/<model-id> entries opencode models --verbose reports (per the OpenCode Go docs).
  • Wire each model's reasoning variants from the same CLI output as effort metadata, so the existing effort picker resolves them through --variant (the runtime already validates and passes it).
  • Labels follow the catalog's existing style; the CLI's marketing suffixes ("(2x usage)", "(New)") are dropped.
  • DEFAULT stays opencode/gpt-5.6-terra; the filter already relocates the default to opencode-go/grok-4.6 on 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.

What about screenshots

No UI markup changed — the picker renders whatever OPTIONS the models API returns; the fixtures and the API response are the verification surface.

Tests

  • The curated-catalog provider-set assertion gains opencode-go, with spot checks: 27 Go entries, effort values exactly as the CLI reports, and the models without variants carrying no effort field.
  • New fixture: an auth store with only opencode-go resolves the whole catalog to Go models, with the default on the first one and getCurrentActiveModel agreeing.
  • npm test (397 server tests pass), npm run typecheck, npm run lint:server, and npm run build all pass.

Notes

  • No file overlap with Per-model sampling settings for OpenCode #1230 (per-model sampling settings); reviewed for conflicts.
  • Users who manually added Go models through the model library may see duplicates once these entries are predefined; deduping custom vs. predefined rows is deliberately out of scope for this PR.

Summary by CodeRabbit

  • New Features

    • Added OpenCode Go subscription models to the predefined model catalog.
    • Added configurable effort levels for supported OpenCode Go models.
    • OpenCode Go authentication now resolves the available Go model catalog, with grok-4.6 as the default.
  • Tests

    • Added coverage validating OpenCode Go model availability, descriptions, effort settings, and default selection.

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.
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: 7beec03b-e6b8-4d28-a0eb-683a1699c477

📥 Commits

Reviewing files that changed from the base of the PR and between c1be241 and 8a7a588.

📒 Files selected for processing (2)
  • server/modules/providers/list/opencode/opencode-models.provider.ts
  • server/modules/providers/tests/opencode-models.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The 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.

Changes

OpenCode Go catalog

Layer / File(s) Summary
OpenCode Go model definitions
server/modules/providers/list/opencode/opencode-models.provider.ts
The catalog documents the OpenCode Go gateway and adds 35 opencode-go/ models with descriptions and optional effort values.
Catalog and selection validation
server/modules/providers/tests/opencode-models.test.ts
Tests verify the provider prefix, 27 curated Go options, effort values, and opencode-go/grok-4.6 as the default for Go-only authentication.

Suggested reviewers: blackmammoth

Poem

A rabbit reviews the Go model trail
With effort flags tucked under each detail
Twenty-seven choices hop in line
Grok leads the way, precise and fine
The catalog grows beneath moonlight
Tests keep every carrot right

Merge Risk: ⚪ Minimal · up to 8a7a5

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)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main changes: adding OpenCode Go models and reasoning variants.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@blackmammoth blackmammoth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

@blackmammoth
blackmammoth merged commit b7320c9 into siteboon:main Sep 7, 2026
1 check passed
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.

2 participants