[FEATURE] Per-agent model selection in Teams
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When spawning teammates via Agent tool, allow specifying a model per agent (e.g., Haiku for simple tasks, Opus for complex ones). Currently all agents inherit the session model. This would significantly reduce costs for mixed-complexity team workflows.
Proposed Solution
Add an optional model parameter to the Agent tool when spawning teammates with a team_name:
L5 engineer on Opus for complex refactoring
Agent(name="dev-1", subagent_type="general-purpose",
team_name="my-team", model="claude-opus-4-6")
Junior engineer on Sonnet for simple cleanup tasks
Agent(name="junior-dev", subagent_type="general-purpose",
team_name="my-team", model="claude-sonnet-4-6")
This enables cost-efficient team compositions like:
- 2x Opus agents for complex architectural work
- 1x Sonnet agent for straightforward tasks (removing dead code, fixing imports, running linters)
- 1x Haiku agent for QA/test running
If not specified, agents would inherit the session model (current behavior). The model choice would be visible in the team config file for transparency.
Alternative Solutions
_No response_
Priority
Medium - Would be very helpful
Feature Category
API and model interactions
Use Case Example
Real-world scenario: refactoring a Django chat module with a team of mixed-skill agents.
Tech lead creates the team and assigns work by complexity:
Opus — L5 engineer: Complex refactoring requiring deep understanding of race conditions, state machines, and cross-file dependencies
Agent(name="dev-1", model="claude-opus-4-6", ...)
Tasks: Wire WorkflowStateMachine into views, add AI streaming, create typed WorkflowResult dataclass with backward compat.
Opus — L5 engineer: Architectural changes requiring judgment calls
Agent(name="dev-2", model="claude-opus-4-6", ...)
Tasks: Schema validation for JSONField, per-language token estimation config
Sonnet — Junior engineer: Straightforward mechanical tasks
Agent(name="junior-dev", model="claude-sonnet-4-6", ...)
Tasks: Remove unused imports, separate WebSocket event types from DB choices, replace f-strings in logger calls with %s formatting
Haiku — QA: Run tests, grep for leftover references
Agent(name="qa", model="claude-haiku-4-5", ...)
Tasks: Run test suite, verify no broken imports, check for dead code
In our actual session, all 4 agents ran on Opus. The junior dev and QA tasks (removing imports, running tests) didn't need Opus-level reasoning — Sonnet or Haiku would have produced identical results at a fraction of the cost. Over a 6-round refactoring session with ~15 agent spawns, per-agent model selection could have reduced costs by 40-60% without affecting output quality.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗