feat: /variants slash command — switch model reasoning variant #300

Closed
opened 2026-07-12 01:32:48 +02:00 by dries · 0 comments
Owner

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has /variants (title "Switch model variant", DialogVariant) to switch the current model's variant (e.g. reasoning / thinking-budget levels). The command is hidden when the model exposes no variants.

Scope

  • Add variants to BUILTIN_COMMANDS (frontend/src/lib/commands/builtinCommands.ts).
  • Fetch the current model's available variants from the live instance and show a picker (style like /model).
  • Apply the selected variant to the session via the platform HTTP API.
  • Gate: if the model has no variants, show an info toast ("The current model does not support any variants") and/or omit from the menu — mirror OpenCode's hidden behaviour.

Relation

Distinct from /model (#... existing /model picker chooses the model itself). /variants tunes the reasoning variant of the already-selected model. Note ocman's existing model handling (SessionDetail.tsx model split logic, Composer model badge) and whether variant is already tracked.

Notes

Confirm the OpenCode HTTP API exposes variant list + set for a session's model before building. Variant support is model-dependent.

Part of OpenCode command parity (transparent-layer goal). OpenCode's TUI has `/variants` (title "Switch model variant", DialogVariant) to switch the current model's variant (e.g. reasoning / thinking-budget levels). The command is hidden when the model exposes no variants. ## Scope - Add `variants` to `BUILTIN_COMMANDS` (frontend/src/lib/commands/builtinCommands.ts). - Fetch the current model's available variants from the live instance and show a picker (style like /model). - Apply the selected variant to the session via the platform HTTP API. - Gate: if the model has no variants, show an info toast ("The current model does not support any variants") and/or omit from the menu — mirror OpenCode's `hidden` behaviour. ## Relation Distinct from /model (#... existing /model picker chooses the model itself). /variants tunes the reasoning variant of the already-selected model. Note ocman's existing model handling (SessionDetail.tsx model split logic, Composer model badge) and whether variant is already tracked. ## Notes Confirm the OpenCode HTTP API exposes variant list + set for a session's model before building. Variant support is model-dependent.
dries closed this issue 2026-07-12 10:10:43 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dries/ocman#300
No description provided.