Skip to content

fix(opencode): keep provider labels concise and free models unlabelled - #36

Merged
rune-gh merged 1 commit into
mainfrom
fix/opencode-provider-labels
Dec 2, 2026
Merged

rune-gh merged 1 commit into
mainfrom
fix/opencode-provider-labels

Conversation

@rune-gh

@rune-gh rune-gh commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Verbose OpenCode provider labels such as Mistral $15 (API key, external models) and Mistral $150 (Vibe credit) truncate in the T3 Code model picker, and if upstream models.dev changes or omits the opencode provider name, free models either display an extra badge or fail to load.

Changes

  • Normalize configured client.opencode.providers labels in internal/api/opencode_catalog.go by trimming whitespace, stripping trailing parenthetical notes, and falling back to the route name if blank.
  • Pin the restricted opencode free-model provider name to "OpenCode" in internal/api/opencode_upstream.go so OpenCode loads free models reliably and T3 Code displays them without a sub-provider label.
  • Update config.example.yaml and docs/t3code.md to use Mistral $15 and Mistral $150 labels and note keeping free models unlabelled.
  • Add unit and HTTP catalog tests in internal/api/opencode_catalog_test.go.

Verification

  • make fmt and make lint
  • go test ./internal/api/... ./internal/config/... ./test/...
  • go build -o test-output ./cmd/server && rm test-output

Created with Gemini 4 Neon in Antigravity.

@rune-gh
rune-gh merged commit eb0f064 into main Dec 2, 2026
8 checks 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.

1 participant