Repository navigation
fix(opencode-go): add MiMo V2.6 Flash and Pro model configurations - #2246
Conversation
What: add mimo-v2.6-flash and mimo-v2.6-pro to the curated OpenCode Go registry in packages/types, with their own context/output limits, input modalities, reasoning preservation, and Go pricing. Why: both IDs are served by the live Go catalog but were uncurated, so the fetcher fell back to 200,000 context / 32,768 output, no image support, no pricing, and no reasoning preservation. Issue Zoo-Code-Org#1997 asks for independently confirmed V2.6 metadata rather than a copy of the V2.5 limits. Impact: the two models now report 1,048,576 context / 131,072 output, accept image input, preserve reasoning across tool-call continuations, and price at 0.14/0.28/0.0028 (Flash) and 0.435/0.87/0.003625 (Pro) per 1M tokens. Routing is unchanged: both stay on Chat Completions. No other model is affected. Fixes Zoo-Code-Org#1997
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Model metadata and catalog resolution packages/types/src/providers/opencode-go.ts, packages/types/src/__tests__/opencode-go.test.ts, src/api/providers/fetchers/__tests__/opencode-go.spec.ts |
The registry adds both models with a 1,048,576-token context window, 131,072 output-token limit, image support, reasoning preservation, and model-specific input, output, and cache-read prices. Tests cover registry metadata and ID-only catalog responses. |
Reasoning in tool-call continuations src/api/providers/__tests__/opencode-go.spec.ts |
A provider test checks that a request for MiMo V2.6 Flash retains assistant reasoning and tool-call history, including the tool result and trailing environment details. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Possibly related issues
- Issue 1891: The registry enables reasoning preservation for both models, and the provider test checks reasoning retention through a tool-call continuation.
Merge Risk: 
Minimal · up to 9f0b3
-
The changes add both MiMo V2.6 models with targeted regression coverage. No actionable merge-blocking issue is identified; merge after normal checks pass.
Pre-merge checks: 
7 · 
1
-
Failed checks: 1 warning Passed checks: 7 passed-
Full details: Description check
-
Explanation
The description links issue
#1997, explains the implementation and scope, documents metadata sources, and provides detailed validation results. It does not use every template heading, such as the pre-submission checklist and contact section, but it contains the required core information.
Full details: Linked Issues check
-
Explanation
The PR satisfies the coding requirements in
#1997. The registry adds both IDs with 1,048,576 context, 131,072 output, image support, reasoning preservation, no prompt-cache support, and the reported Go input/output/cache-read prices. The diff does not add long-context or cache-write pricing. The provider uses the default OpenAI Chat Completions path for these IDs, and the new provider test verifies reasoning, tool-call, and tool-result history on the wire. Registry and fetcher tests cover both IDs and ID-only catalog resolution. The reported focused suites and type checks pass.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR diff contains only the two
#1997registry entries and related registry, fetcher, and provider tests. It does not change the direct MiMo provider, the Go default model, ultraspeed support, or routing configuration. No unrelated production change is present.
Full details: Security Boundaries
-
Explanation
No changed path meets the security failure conditions. The only production change adds static metadata entries for
mimo-v2.6-flashandmimo-v2.6-proinpackages/types/src/providers/opencode-go.ts; it adds no secret, PII, input execution, or approval/allowlist bypass. The other three changed files contain tests only. Existing fetcher validation still requires a string model ID, and existing handler logic uses the metadata to select message conversion without executing model-supplied input.
Full details: Persistence Integrity
-
Explanation
No changed persistence path exists. The PR adds two in-memory entries to
opencodeGoModelsand test coverage in three test files. The diff contains no persistence writes, storage operations, rollback logic, or persisted defaults. The fetcher only reads the registry throughgetOpencodeGoModelInfo, so the stated persistence failure conditions are not introduced.
Full details: Lifecycle Resource Cleanup
-
Explanation
No changed lifecycle path exists. The pull request adds two static
ModelInforegistry entries and test cases only; it does not add or alter listeners, watchers, providers, timers, tasks, cancellation handling, disposal, restart logic, or resource ownership. Therefore it introduces no concrete cleanup leak or post-cancellation duplicate work.
-
Full details: Regression Evidence
-
Explanation
The positive metadata and tool-call coverage is focused, but it does not cover two deliberate unset behaviors. The new registry entries at
packages/types/src/providers/opencode-go.ts:279-302omit bothlongContextPricingandcacheWritesPrice. The added registry and fetcher tests only assert the populated fields atpackages/types/src/__tests__/opencode-go.test.ts:367-390andsrc/api/providers/fetchers/__tests__/opencode-go.spec.ts:366-385; they do not assert either property is absent. This omission is behaviorally relevant:src/shared/cost.ts:9-12skips long-context multipliers when unset, and its cache-write calculation treats an unset write price as zero. Copying the V2.5 pricing fields would therefore pass the current new tests while changing billing behavior.Resolution
Add focused negative assertions for both
mimo-v2.6-flashandmimo-v2.6-proin the registry invariant cases: assertcacheWritesPriceandlongContextPricingare undefined (or usenot.toHaveProperty). Keep the existing ID-only fetcher assertions, and optionally repeat the absence checks there to protect the parsed metadata contract.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 @coderabbitai help to get the list of available commands.
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: The required review sequence passed. Remaining merge requirements apply. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
Adds
mimo-v2.6-flashandmimo-v2.6-proto the curated OpenCode Go registry inpackages/types. Both IDs are served by the live Go catalog but were uncurated, so the fetcher fell back to the generic 200,000-token context / 32,768-token output, no image support, no pricing, and no reasoning preservation.Fixes #1997
What changes
packages/types/src/providers/opencode-go.ts: two registry entries, 24 lines, no other production change.packages/types/src/__tests__/opencode-go.test.ts: both IDs added to the OpenAI-format list and to the table-drivengetOpencodeGoModelInfoassertions.src/api/providers/fetchers/__tests__/opencode-go.spec.ts: both IDs added to the catalog-completeness array, plus a new ID-only resolution test proving the native registry wins over the generic fallback.src/api/providers/__tests__/opencode-go.spec.ts: one provider regression test proving the reasoning -> tool_call -> tool_result history survives on the wire formimo-v2.6-flash.Routing is unchanged. Both models stay on Chat Completions, which is the default
"openai"format, so neither routing set is touched.Metadata and where each number comes from
Both sources below were fetched on 2026-10-30 and agree on every value.
contextWindowlimit.contextmaxTokenslimit.outputsupportsImagestruetruemodalities.inputlists text, image (jpeg/png/gif/webp/bmp), audio, videoinputPricecost.text.input.price; Go pricing tableoutputPricecost.text.output.price; Go pricing tablecacheReadsPricecost.text.input.cache.read; Go pricing tablesupportsPromptCachefalsefalsemimoprovider: no client-sidecache_controlon the Chat Completions path, while the server-side cache read is still pricedpreserveReasoningtruetrueSources:
https://opencode.ai/zen/go/v1/models(HTTP 200, 28 models), retrieved 2026-10-30. This is the same endpointsrc/api/providers/fetchers/opencode-go.tscalls.https://opencode.ai/docs/go/, retrieved 2026-10-30. The usage-limits table listsMiMo-V2.6-Flash $0.14 / $0.28 / $0.0028andMiMo-V2.6-Pro $0.435 / $0.87 / $0.003625; the endpoints table assigns both to/openai/v1/chat/completions.Two things were deliberately not copied from the V2.5 entries:
longContextPricing. The live catalog emits nocost.*.overridesfor either V2.6 ID, so there is no long-context tier to model.mimo-v2.5andmimo-v2.5-proboth carry one; these entries do not.supportsImages: falsefrommimo-v2.5-pro. The live catalog advertises image input for V2.6 Pro, so the V2.5 Pro value would be wrong here. This is the trap issue OpenCode Go: add MiMo V2.6 Flash and Pro model configurations #1997 warns about.No cache-write rate is declared, and no direct Xiaomi pay-as-you-go price is used.
Precedent
This follows the merged shape of #1659 (
fix(opencode-go): add DeepSeek V4.1 Flash metadata, merged 2026-10-02, +45/-0 across the same three files): registry entry plus registry-suite assertions plus fetcher-suite resolution coverage. The provider regression test is the additional coverage issue #1997 asks for.Validation
packages/typesOpenCode Go suite: 53 passed.pnpm --dir src run check-types: passed.--max-warnings=0: passed, andsrc/eslint-suppressions.jsonis unchanged (verified semantically: 338 keys, 0 value differences).scripts/stryker-diff.mjs's ownbuildManifest: 24 changed executable lines inpackages/typesagainst a 500-line limit, 0 insrc(test paths are excluded from mutation testing).No changeset and no
CHANGELOG.mdedit, perAGENTS.md.Scope
Only the two MiMo V2.6 IDs named by #1997. The separate direct MiMo provider (#1761 / #1748) is untouched, the Go default model is unchanged, and no ultraspeed support is added.