Skip to content

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

Closed as not planned

Description

@AlexisCubilla

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

Activity

  1. github-actions commented on Aug 16, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of or closely related to existing issues. Please check:

    If this is a distinct issue (V2-specific hard VariantUnavailableError vs. silent failure in V1), feel free to clarify the distinction so maintainers can track them separately.

  2. AlexisCubilla commented on Aug 19, 2026

    @AlexisCubilla
    Author

    Thanks for the triage. I checked the referenced issues and believe this one is a distinct failure mode worth tracking separately, even though it shares the same underlying family (catalog entries with variants: [] + a "medium" default).

    Comparison:

    • #40182: --variant values outside reasoning_options are silently ignored (no error). This issue is the opposite: the TUI persists a medium variant into the session at creation and the resolver hard-fails with VariantUnavailableError at runtime.
    • #36888: MiniMax-M3 with variants: [] simply loses the /variants command; sessions run fine with the default. In our case the model does not run — the session crashes on every prompt until the variant is manually reset. This shows the variants: [] cases are not all equal: providers: MiniMax MiniMax-M3 has no variants and /variants command missing (V2 beta) #36888 degrades gracefully, ours fails hard.
    • #25126: display-only issue where the TUI shows medium in the badge. Ours is behavioral: the medium variant is written into the session model and then crashes resolution.

    Additional severity detail: after the failure, opencode2 silently falls back to another model (opencode/big-pickle) — the user is switched to a different model without any visible notice, which is easy to miss.

    Root cause summary: the TUI auto-pins a medium reasoning variant for models with reasoning: true, even when the catalog entry declares variants: [], and the resolver throws a hard VariantUnavailableError instead of resolving to the default.

    Happy to consolidate this into any canonical issue if the maintainers prefer, but I'd suggest keeping this open as the V2 hard-error case.

  3. github-actions commented on Oct 19, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions