Skip to content

feat: delegate_task should support per-task model selection #10995

@wpsl5168

Description

@wpsl5168

Problem

delegate_task children always inherit the parent agent's model or the global delegation.model config. There is no way for the orchestrating agent to select a lighter/cheaper model for mechanical subtasks (file generation, formatting, search aggregation) or a heavier model for complex reasoning tasks — on a per-delegation or per-task basis.

Real-world impact

When the parent runs on an expensive model (e.g. claude-opus), all subagents inherit that model even for trivial tasks like writing template files or running searches. This wastes tokens/cost and causes timeouts on tasks that a smaller model could handle faster.

The acp_args workaround (['--acp', '--stdio', '--model', 'claude-sonnet-4']) only works for ACP subprocess children and does not affect native Hermes subagents.

Proposed Solution

Add an optional model parameter to delegate_task at both the top-level and per-task level:

# Top-level: all children use sonnet
delegate_task(goal="...", model="claude-sonnet-4-20250514")

# Per-task: mixed models in batch
delegate_task(tasks=[
    {"goal": "Complex architecture review", "model": "claude-opus-4"},
    {"goal": "Generate boilerplate files", "model": "claude-sonnet-4-20250514"},
])

Priority chain

per-task model > top-level model arg > delegation.model config > parent model

Environment

  • Hermes Agent: latest main (9b5395a)
  • OS: Ubuntu 24.04
  • Python: 3.11.15

Implementation

PR forthcoming with the fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/toolsTool registry, model_tools, toolsetstool/delegateSubagent delegationtype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions