-
Notifications
You must be signed in to change notification settings - Fork 5.5k
feat: add variant support for subagents (#7138) [alt of #7140] #7156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
feat: add variant support for subagents (#7138) [alt of #7140] #7156
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicates FoundPR #7140: Add default variant config per agent Why related: This is the primary implementation that the current PR (#7156) is an alternative version of. According to the PR description, #7156 is an alternative implementation for #7138 that includes additional changes not present in #7140, specifically:
The PR author explicitly states they're "happy to close this if #7140 incorporates these changes," indicating these are addressing the same feature with slightly different approaches. |
|
@CasualDeveloper we can do ur change if u want but I think ti requires updates to both tui AND desktop |
11edba0 to
9cc62c8
Compare
9cc62c8 to
ae2dd3e
Compare
|
Thanks @rekram1-node! I've updated this PR to include both TUI and desktop support: TUI: Both now have:
The Ready for review when you have time! |
07c8bd5 to
065875f
Compare
065875f to
6088a6f
Compare
6088a6f to
b6b1ad5
Compare
- Add variant field to agent config schema - Resolve variant with priority: user selection > agent config > none - Display effective variant in TUI and desktop prompt bar - Show variant in agent selector (TUI dialog + desktop dropdown) - Subagents use their own configured variant (not inherited from parent) - Store resolved variant in message metadata (prompt.ts) - Add variant examples to triage and duplicate-pr agents - Add model and variant override params to Task tool for dynamic control - Orchestrator agents can now pass model/variant per task invocation - Add --variant CLI flag to TUI command for parity with headless run Closes anomalyco#7138
b6b1ad5 to
1ddb904
Compare
What does this PR do?
Adds agent-level default
variantconfiguration, allowing users to set reasoning effort (e.g., "low", "medium", "high") per agent. This is an alternative to #7140 with broader scope: full desktop/web support, dynamic Task tool overrides, and TUI CLI parity.Why this matters: Orchestrator agents can now spawn subagents with different model/variant combinations dynamically — no need to duplicate agent configs for each reasoning level.
Changes
Core backend
variantfield in agent config schemaundefinedwhen using agent default)Task tool dynamic override (addresses @terwey's feedback on #7140)
modelandvariantparams added to Task tool schemaTUI
--variantCLI flag for parity with headlessruncommandDesktop/web app
SDK
types.gen.tsandopenapi.jsonComparison with #7140
undefinedwhen agent default used--variantCLI flagExample usage
Agent config:
Task tool override:
{ "description": "Refactor auth module", "prompt": "Refactor the auth module to use OAuth2", "subagent_type": "implementer", "model": "anthropic/claude-sonnet-4-20250514", "variant": "low" }TUI CLI:
Closes #7138