feat(delegate): add per-task model override to delegate_task - #6771
feat(delegate): add per-task model override to delegate_task#6771GusBot69 wants to merge 1 commit into
Conversation
Expose the existing per-child model override capability in the
delegate_task tool schema. The internal _build_child_agent already
accepts a model parameter, but the tool schema doesn't expose it.
Changes:
- Add 'model' field to top-level tool schema properties
- Add 'model' field to per-task items in batch mode
- Thread model through to _build_child_agent via task dict
- Task-level model takes precedence over delegation config
Enables routing different tasks to different models:
delegate_task(goal='debug this', model='modelstudio/qwen3-coder-plus')
delegate_task(tasks=[{'goal': 'code', 'model': 'codex'}, {'goal': 'research', 'model': 'professor'}])
Fully backwards compatible — model is optional, defaults to parent behavior.
Related: NousResearch#5997, NousResearch#492, NousResearch#356
a6e4e7e to
682ac0c
Compare
|
Nice addition — exposing per-task One follow-up I’d strongly suggest: please expose Right now the child-agent path already has reasoning support via That creates an asymmetry in the delegation surface. In practice, these two knobs usually want to travel together:
Suggested shape:
That would keep this backward-compatible while making delegation routing much more complete and consistent with the existing child-agent implementation. |
|
We do not want this |
Summary
Expose the existing per-child model override capability in the
delegate_tasktool schema. The internal_build_child_agentalready accepts amodelparameter (line 279:effective_model = model or parent_agent.model), but the tool schema doesn't expose it — making it impossible for the LLM to route different tasks to different models.Problem
Currently, all subagents inherit the parent's model (or the global
delegation.modelconfig). There's no way to say "use a coding model for this task but a generalist for that task" within a single conversation.The infrastructure exists but isn't wired to the tool schema.
Solution
3 changes in
tools/delegate_tool.py:modelfield to top-level tool propertiesmodelfield to per-task itemst.get("model")through to_build_child_agentwith fallback to delegation configTask-level model takes precedence over delegation config, which takes precedence over parent model.
Usage
Backwards Compatible
modelis optional — defaults to parent behavior when omittedRelated Issues