-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
Summary
Allow users to configure a default variant for each agent, so models with thinking/reasoning variants automatically use the configured level without requiring --variant flag or ctrl+t cycling.
Motivation
Currently, users can only select variants via:
--variant highCLI flagctrl+tkeybind to cycle variants in TUI
This means:
- Users must manually select variants every time
- Subagents cannot use variants at all (Task tool doesn't pass variant)
- Users cannot set different thinking levels for different agents (e.g., oracle with high thinking, explore with low)
Related: NoeFabris/opencode-antigravity-auth#125
Proposed Solution
Add a variant field to the agent configuration:
{
"agent": {
"build": {
"model": "google/antigravity-claude-sonnet-4-5-thinking",
"variant": "high"
},
"explore": {
"model": "google/antigravity-gemini-3-flash",
"variant": "low"
}
}
}Variant Priority Order
- Explicit user selection (
--variantflag orctrl+t) - Agent's configured default variant
- None (model's base behavior)
Subagent Behavior
Subagents use their own configured agent.variant rather than inheriting the parent's --variant override. This respects explicit per-agent configuration.
Implementation
- Add
variantfield toConfig.Agentschema - Add
varianttoAgent.Infotype - Parse variant from config in agent state initialization
- Use
agent.variantas fallback inprompt.ts - Pass
agent.variantto subagent sessions intask.ts - Use fallback logic in
llm.tsvariant resolution
Testing
- Configure agent with
variant: "high" - Verify model uses high variant without
--variantflag - Verify
--variant lowoverrides agent config - Verify subagents use their own variant config
rwese and mjakl
Metadata
Metadata
Assignees
Labels
No labels