Feature Request: Per-task model selection in delegate_task
Problem
Currently delegate_task does not expose a model parameter. Subagents always inherit the parent model or fall back to delegation.model from config. There is no way to select a different model per task at call time.
This is limiting for users who want tiered model routing — e.g. using a fast/cheap model (gemma4, 31B) for simple lookups and a powerful reasoning model (GLM-5.1, 128K context) for complex coding tasks.
Proposed Solution
Add an optional model parameter to delegate_task at three levels:
- Per-task level (in the
tasks array items):
{
"goal": "simple lookup",
"model": "gemma4:31b-cloud"
}
- Top-level
goal call (single task shorthand):
{
"goal": "check Champions League scores",
"model": "gemma4:31b-cloud"
}
- Config default (existing
delegation.model in config.yaml):
Remains as the fallback when no per-task model is specified.
Behavior
model is optional. If omitted, falls back to delegation.model from config, or the parent agent model.
- The internal
_build_child_agent function already supports model:
effective_model = model or parent_agent.model
This just needs to be wired through from the public delegate_task API.
- The
DELEGATE_TASK_SCHEMA also needs model added to the parameters.
Suggested Implementation Hints
- Add
model: Optional[str] = None to delegate_task() signature
- Add
model to DELEGATE_TASK_SCHEMA.properties
- In the task loop, resolve
effective_model = task.get("model") or model or delegation_default
- Pass
model=effective_model through to _build_child_agent()
Use Case Example
# Fast cheap subagent for a lookup
delegate_task(goal="Check tonight's Champions League scores", model="gemma4:31b-cloud")
# Powerful reasoning subagent for complex refactor
delegate_task(goal="Refactor the auth module across 12 files", model="glm-5.1:cloud")
# Default model (from delegation.config or parent)
delegate_task(goal="Something moderate")
Priority
Medium — enables better cost/performance tradeoffs for users with multi-model setups.
Feature Request: Per-task model selection in delegate_task
Problem
Currently
delegate_taskdoes not expose amodelparameter. Subagents always inherit the parent model or fall back todelegation.modelfrom config. There is no way to select a different model per task at call time.This is limiting for users who want tiered model routing — e.g. using a fast/cheap model (gemma4, 31B) for simple lookups and a powerful reasoning model (GLM-5.1, 128K context) for complex coding tasks.
Proposed Solution
Add an optional
modelparameter todelegate_taskat three levels:tasksarray items):{ "goal": "simple lookup", "model": "gemma4:31b-cloud" }goalcall (single task shorthand):{ "goal": "check Champions League scores", "model": "gemma4:31b-cloud" }delegation.modelin config.yaml):Remains as the fallback when no per-task model is specified.
Behavior
modelis optional. If omitted, falls back todelegation.modelfrom config, or the parent agent model._build_child_agentfunction already supportsmodel:This just needs to be wired through from the public
delegate_taskAPI.DELEGATE_TASK_SCHEMAalso needsmodeladded to the parameters.Suggested Implementation Hints
model: Optional[str] = Nonetodelegate_task()signaturemodeltoDELEGATE_TASK_SCHEMA.propertieseffective_model = task.get("model") or model or delegation_defaultmodel=effective_modelthrough to_build_child_agent()Use Case Example
Priority
Medium — enables better cost/performance tradeoffs for users with multi-model setups.