Problem
Currently delegation.model in config.yaml sets a single global model for ALL subagents spawned via delegate_task. There is no way to assign different models to different tasks based on complexity.
This becomes a real issue when using providers with strict rate limits (e.g. Zhipu GLM Coding Plan, where GLM-5.1 has very low concurrency and triggers 429 frequently). Users want to:
- Use the strongest model (e.g. GLM-5.1) for the main agent / complex reasoning
- Use a mid-tier model (e.g. GLM-5) for moderately complex subagent tasks
- Use a fast/cheap model (e.g. GLM-5-turbo) for simple tasks like search, classification, summarization
Currently the only workaround is to change delegation.model globally before each delegation, which is impractical.
Proposed Solution
Add an optional model field to each task in the delegate_task tasks array:
{
"tasks": [
{
"goal": "Analyze the codebase architecture",
"model": "glm-5.1"
},
{
"goal": "Search for relevant documentation",
"model": "glm-5-turbo"
},
{
"goal": "Write unit tests for the parser module",
"model": "glm-5"
}
]
}
Fallback chain:
- Per-task
model field (highest priority)
delegation.model from config.yaml
- Inherit parent agent model (current default)
Implementation notes
- The
_build_child_agent() function in tools/delegate_tool.py already resolves credentials via _resolve_delegation_credentials() — the per-task model would just override effective_model at that point
- This is a non-breaking change: if no per-task model is specified, behavior stays exactly the same
- Could also support
provider at the per-task level for maximum flexibility, but model alone solves the common case
Use Case
Users on rate-limited Coding Plans (Zhipu, etc.) can conserve their expensive model quota by only using GLM-5.1 for tasks that truly need it, while dispatching simpler work to GLM-5-turbo or GLM-4.5-air. This avoids 429 errors and makes the Coding Plan quota last longer.
Problem
Currently
delegation.modelin config.yaml sets a single global model for ALL subagents spawned viadelegate_task. There is no way to assign different models to different tasks based on complexity.This becomes a real issue when using providers with strict rate limits (e.g. Zhipu GLM Coding Plan, where GLM-5.1 has very low concurrency and triggers 429 frequently). Users want to:
Currently the only workaround is to change
delegation.modelglobally before each delegation, which is impractical.Proposed Solution
Add an optional
modelfield to each task in thedelegate_tasktasks array:{ "tasks": [ { "goal": "Analyze the codebase architecture", "model": "glm-5.1" }, { "goal": "Search for relevant documentation", "model": "glm-5-turbo" }, { "goal": "Write unit tests for the parser module", "model": "glm-5" } ] }Fallback chain:
modelfield (highest priority)delegation.modelfrom config.yamlImplementation notes
_build_child_agent()function intools/delegate_tool.pyalready resolves credentials via_resolve_delegation_credentials()— the per-task model would just overrideeffective_modelat that pointproviderat the per-task level for maximum flexibility, butmodelalone solves the common caseUse Case
Users on rate-limited Coding Plans (Zhipu, etc.) can conserve their expensive model quota by only using GLM-5.1 for tasks that truly need it, while dispatching simpler work to GLM-5-turbo or GLM-4.5-air. This avoids 429 errors and makes the Coding Plan quota last longer.