anomalyco / anomalyco/opencode

opencode-go: spurious low/medium/high reasoning variants for MiMo V2.5 / Hy3; inconsistent with Kimi/Grok

Open
#43,543 1 comment 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Aug 20, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
Avg merge
7h 2m
Merged PRs (30d)
384

Description

Summary

OpenCode Go (opencode-go) models show an inconsistent and often inaccurate variant/thinking selector in /models. Several models offer effort levels their catalog says they don't support, several show sets that don't match their declared reasoning_options, and a couple show no selector at all. Which set appears depends on whether a model's catalog entry carries reasoning_options (and which generator resolves it), so the same model behaves differently across installs/snapshots.

Reproduced against the OpenCode TUI (/models → provider OpenCode Go):

Model Declared reasoning_options (models.opencode.ai) Variant selector shown
mimo-v2.5 [] (no effort control) low / medium / high
mimo-v2.5-pro [] (no effort control) low / medium / high
hy3 effort: [none, low, high] low / medium / high
deepseek-v4-pro effort: [high, max] default + low / medium / high / max
deepseek-v4-flash effort: [low, high, max] low / medium / high / max
gpt-5.6-luna effort: [none, low, medium, high, xhigh, max] none / low / medium / high / xhigh
minimax-m3 toggle none / thinking (toggle)
kimi-k3 effort: [max] (no selector)
grok-4.5 effort: [low, medium, high] (no selector)

Steps to reproduce:

  1. Open the OpenCode TUI.
  2. Run /models, start a session, and select OpenCode Go.
  3. Pick e.g. deepseek-v4-pro or mimo-v2.5 → the model selector asks for a variant (low/medium/high/…).
  4. Pick grok-4.5 or kimi-k3 → no variant selector at all.

Root cause

A model's variants come from two independent generators, and which one is used depends on the catalog's reasoning_options for that model:

packages/opencode/src/provider/provider.ts (fromModelsDevModel):

const variants = ProviderTransform.reasoningVariants(model, base) ?? ProviderTransform.variants(base)
  • reasoningVariants(...) is catalog-driven. It returns undefined when model.reasoning_options is absent, {} when it is [], and effort/toggle/budget variants when declared.
  • The ?? falls through to the generic transport heuristic variants(...) only when reasoning_options is absent/undefined. That heuristic emits its own effort sets by transport + model id (e.g. @ai-sdk/openai-compatibleWIDELY_SUPPORTED_EFFORTS + max for deepseek-v4, @ai-sdk/openaiopenaiReasoningEfforts(...)), and hard-excludes some families (deepseek-chat/reasoner/r1/v3, minimax, GLM≠5.2, kimi, qwen, …) → {}. mimo-* and hy3 are not on that list.

packages/opencode/src/provider/provider.ts (registry loop):

if (model.variants === undefined) {
  model.variants = mapValues(ProviderTransform.variants(model), (v) => v)
}

Effect: whether a selector appears (and which options it has) depends on whether the catalog omits reasoning_options (undefined, → heuristic, → spurious/wrong sets) vs. explicitly sets [] (→ suppressed). Both mean "no declared effort control", but they resolve differently.

Why this is wrong

  • Sets don't match declarations — e.g. deepseek-v4-pro declares [high, max] but the TUI offers low/medium/high/max; gpt-5.6-luna declares a max it never shows. These are the heuristic's sets, not the model's.
  • mimo-v2.5 / mimo-v2.5-pro are always-on reasoning (interleaved: { field: "reasoning_content" }) with reasoning_options: []; offering low/medium/high sends a reasoningEffort the model doesn't honor — inert/misleading.
  • Inconsistency: minimax-m3 (declared toggle) correctly gets a none/thinking toggle, while hy3 (declared [none,low,high]) shows low/medium/high, and kimi-k3 / grok-4.5 (declared effort sets) show nothing.
  • Data-version dependent: the observed sets imply the running build resolved many models through the heuristic fallback (their reasoning_options was absent), while the current models.opencode.ai catalog would suppress some of them. The same model behaves differently across installs/snapshots.

Expected behavior

  • A model should expose effort/toggle/budget variants only from what it declares in reasoning_options (the reasoningVariants path).
  • The generic heuristic variants() should not inject low/medium/high for models that declare no effort control — absent reasoning_options should behave like [] (no selector) rather than triggering the fallback, or the fallback should consult declared capabilities so returned sets always match the model.

Environment

  • OpenCode (opencode-go provider), model catalog sourced from https://models.opencode.ai/api.json
  • TUI /models model + variant selection flow

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.