Bug Report
Description
The delegate_task tool accepts a model parameter in its JSON schema and Python function signature, but the parameter is never forwarded to child agents. Subagents always fall back to the parent agent model, making per-delegation model overrides impossible.
This affects both:
- Per-call
model parameter — passed directly in delegate_task(model={"model": "xxx", "provider": "yyy"})
- Delegation config —
delegation.model in config.yaml (via runtime_provider which returns a bundle without a model field)
Root Cause
In tools/delegate_tool.py (v0.12.0):
- The
delegate_task() function signature does not include a model parameter
- The single-task dict is built without forwarding
model to child agent construction
_build_child_agent() has no task_model parameter for per-call model override
- The effective model resolution (
model or parent_agent.model) ignores the task-level model entirely
Impact
- Cannot route specific
delegate_task calls to different models
delegation.model config option is silently ineffective
- Users expecting model-aware delegation get unexpected parent-model fallback
Patch
A complete fix is available (31 lines added, 6 removed across tools/delegate_tool.py, touching 4 locations). Key changes:
- Add
model parameter to delegate_task() signature and tool registry registration
- Forward
model into the task_list dict
- Add
task_model parameter to _build_child_agent()
- In
_build_child_agent(), prioritize task_model over delegation config and parent model
- Clear the fallback chain when an explicit model is set
Environment
- Hermes Agent v0.12.0
- File:
tools/delegate_tool.py
Bug Report
Description
The
delegate_tasktool accepts amodelparameter in its JSON schema and Python function signature, but the parameter is never forwarded to child agents. Subagents always fall back to the parent agent model, making per-delegation model overrides impossible.This affects both:
modelparameter — passed directly indelegate_task(model={"model": "xxx", "provider": "yyy"})delegation.modelinconfig.yaml(viaruntime_providerwhich returns a bundle without amodelfield)Root Cause
In
tools/delegate_tool.py(v0.12.0):delegate_task()function signature does not include amodelparametermodelto child agent construction_build_child_agent()has notask_modelparameter for per-call model overridemodel or parent_agent.model) ignores the task-level model entirelyImpact
delegate_taskcalls to different modelsdelegation.modelconfig option is silently ineffectivePatch
A complete fix is available (31 lines added, 6 removed across
tools/delegate_tool.py, touching 4 locations). Key changes:modelparameter todelegate_task()signature and tool registry registrationmodelinto the task_list dicttask_modelparameter to_build_child_agent()_build_child_agent(), prioritizetask_modelover delegation config and parent modelEnvironment
tools/delegate_tool.py