-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
- 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 Closes anomalyco#7138
065875f to
6088a6f
Compare
Summary
Complete implementation for #7138 (agent-level default variant support) with TUI and desktop support.
Adds
variantfield to agent config, allowing users to set a default variant per agent:Priority order: user
--variantselection > agent config > noneComparison with PR #7140
Both PRs implement the same core feature. This PR adds:
undefinedwhen agent default usedKey differences
1. Desktop support (this PR only)
packages/app/src/context/local.tsx: Addedeffective()methodpackages/app/src/components/prompt-input.tsx: Useseffective()for display and API calls, shows variant in agent selector2. prompt.ts change (this PR only)
Stores the resolved variant in message metadata:
Without this, inspecting message history shows
variant: undefinedwhen the agent's default variant was actually used.Changes
Backend
variantfield to agent config schema (config.ts,agent.ts)llm.ts:input.user.variant ?? input.agent.variantprompt.ts)task.ts)TUI
effective()method tolocal.tsxprompt/index.tsx)dialog-agent.tsx)Desktop
effective()method tolocal.tsxprompt-input.tsx)prompt-input.tsx)SDK
types.gen.tsandopenapi.jsonExamples
variant: "high"totriage.mdandduplicate-pr.mdCloses #7138