anomalyco / anomalyco/opencode

tui: auto-assigned "medium" variant crashes sessions for models with empty variants (e.g. mimo-v2.5-free)

Open
#42,848 2 comments 0 reactions 1 assignee View on GitHub

@kommander is already working on this.

Since Aug 16, 2026.

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

Description

Summary

opencode2 (V2) auto-assigns the medium variant when creating a session with a reasoning model whose catalog entry has variants: [] (empty). Runtime then fails with SessionRunnerModel.VariantUnavailableError and the session silently falls back to another model.

Environment

  • opencode version: 0.0.0-next-17444 (next channel)
  • OS: Linux 7.0.11-76070011-generic (linux x64)
  • Terminal: xterm-256color / truecolor
  • Shell: /bin/bash
  • Install/channel: next (v2 binary opencode2)
  • Active plugins: @warp-dot-dev/opencode-warp

Reproduction

  1. Open the opencode2 TUI (next channel).
  2. Select opencode/mimo-v2.5-free from the model picker (/models); do not touch any variant setting.
  3. Send any prompt.

Expected Behavior

The session runs mimo-v2.5-free with variant default (the catalog entry defines no variants), and the model responds normally.

Actual Behavior

The created session is pinned to variant: "medium" even though the model catalog entry has variants: []. The model resolver throws:

SessionRunnerModel.VariantUnavailableError: Variant unavailable for opencode/mimo-v2.5-free: medium

and the session falls back to opencode/big-pickle.

Root Cause

The TUI defaults the variant to medium for models with reasoning: true, but mimo-v2.5-free's catalog entry has an empty variants list (variants: []). The resolver does not tolerate a variant that does not exist and hard-fails instead of falling back to the default.

Verified via the HTTP API: creating a session with variant: "default" (or omitting the variant) resolves correctly and the model works. Log source: ~/.local/share/opencode/log/opencode.log (Failed to drain Session ... SessionRunnerModel.VariantUnavailableError).

Workaround

After selecting the model with /models, choose the default option in /variants, or switch via API:

opencode2 api post /api/session/<sessionID>/model --data '{"model":{"id":"mimo-v2.5-free","providerID":"opencode","variant":"default"}}'

Additional Context

  • opencode V1 (1.17.18) works fine with the same model: it does not use the variant mechanism.
  • The models.dev cache entry for mimo-v2.5-free has reasoning: true and reasoning_options: [].
  • Related: #40524 (V2 catalog reconciliation), #41868 (variants not selectable for Merge Gateway).

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.