Feature hasn't been suggested before.
Describe the enhancement you want to request
The --variant flag was added to opencode run in #6805 but is missing from the root opencode command.
Current Behavior
# Works
opencode run --model anthropic/claude-sonnet-4-20250514 --variant max "hello"
# Doesn't work - variant flag not recognized
opencode --model anthropic/claude-sonnet-4-20250514 --variant max --prompt "hello"
Expected Behavior
Both commands should support --variant.
This matters most when --prompt is provided since the model responds immediately - users can't control reasoning effort for that initial response.
Relevant Files
| File |
Current State |
src/cli/cmd/run.ts:90-93 |
Has --variant option |
src/cli/cmd/tui/thread.ts |
Missing --variant option |
src/cli/cmd/tui/context/args.tsx |
Args interface lacks variant |
Implementation Notes
The variant infrastructure already exists in the TUI. Changes needed:
thread.ts: Add --variant option to yargs builder
args.tsx: Add variant?: string to Args interface
thread.ts: Pass variant through to tui() args
local.tsx: Initialize variant from CLI arg (similar to how args.model is handled at line 142)
The variant management (model.variant.set(), model.variant.current(), etc.) is already implemented in local.tsx:310-347, so this is just a CLI argument threading task.
Feature hasn't been suggested before.
Describe the enhancement you want to request
The
--variantflag was added toopencode runin #6805 but is missing from the rootopencodecommand.Current Behavior
Expected Behavior
Both commands should support
--variant.This matters most when
--promptis provided since the model responds immediately - users can't control reasoning effort for that initial response.Relevant Files
src/cli/cmd/run.ts:90-93--variantoptionsrc/cli/cmd/tui/thread.ts--variantoptionsrc/cli/cmd/tui/context/args.tsxArgsinterface lacksvariantImplementation Notes
The variant infrastructure already exists in the TUI. Changes needed:
thread.ts: Add--variantoption to yargs builderargs.tsx: Addvariant?: stringtoArgsinterfacethread.ts: Passvariantthrough totui()argslocal.tsx: Initialize variant from CLI arg (similar to howargs.modelis handled at line 142)The variant management (
model.variant.set(),model.variant.current(), etc.) is already implemented inlocal.tsx:310-347, so this is just a CLI argument threading task.