From f13f49d325198b9f51abaf14058376436de3667b Mon Sep 17 00:00:00 2001 From: Z User Date: Mon, 15 Jun 2026 23:48:59 +0000 Subject: [PATCH] fix: always show variant selector when model supports reasoning effort (fixes #742) When a model with reasoning effort variants (e.g. mimo-v2.5-pro) is selected from the 'Recent' group in /model, the variant selector was skipped because the current variant was already valid. This made it impossible to change reasoning effort without manually editing the config file. The previous logic checked if the current variant was 'default' or already in the variant list, and if so, skipped the selector. This was intended to avoid the selector when switching to a model that doesn't need variant selection, but it also prevented users from changing their variant when re-selecting the same model. Fix: always show the variant selector when the model has available variants, regardless of the current selection. The 'Default' option in the variant selector allows users to keep their current setting. --- .../opencode/src/cli/cmd/tui/component/dialog-model.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx index a7d1a248..df850273 100644 --- a/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx +++ b/packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx @@ -164,11 +164,9 @@ export function DialogModel(props: { providerID?: string }) { function onSelect(providerID: string, modelID: string) { local.model.set({ providerID, modelID }, { recent: true }) const list = local.model.variant.list() - const cur = local.model.variant.selected() - if (cur === "default" || (cur && list.includes(cur))) { - dialog.clear() - return - } + // Always show the variant selector when the model supports variants, + // so users can change their reasoning effort even when re-selecting + // the same model from the Recent group. if (list.length > 0) { dialog.replace(() => ) return