hermes - 💡(How to fix) Fix feat: add model/provider/base_url/api_format parameters to delegate_task (consolidating #5012, #10995, #17685, #23467, #32711)

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

Problem

delegate_task() has no way to specify which model/provider a subagent should use — neither at the top level (single task mode) nor per-task (batch mode). Subagents always inherit the parent agent model or fall back to delegation config, making it impossible to:

  • Route cheap mechanical subtasks to a fast/cheap model
  • Use a vision-capable model for a specific subagent
  • Point a subagent at a completely different provider/endpoint

Five open issues track this gap from various angles: #5012, #10995, #17685, #23467, #32711.

Desired API

Add optional parameters to both the top-level delegate_task() and individual tasks[] items.

Top-level (applies to all subagents unless overridden per-task)

  • provider (str, optional) — provider name (e.g. "openrouter", "anthropic", or "custom:<name>")
  • model (str, optional) — model name (e.g. "qwen/qwen-turbo", "claude-sonnet-4")
  • base_url (str, optional) — override the API endpoint base URL
  • api_format (str, optional) — "openai" | "anthropic" | "codex" etc. (maps to internal api_mode)
  • api_key (str, optional) — API key for the target provider

Per-task (overrides top-level for that specific child)

Each item in tasks[] should also accept the same fields: provider, model, base_url, api_format, api_key.

Why this is feasible

The internal _build_child_agent() (line 870 in tools/delegate_tool.py) already supports override_provider, override_base_url, override_api_key, override_api_mode — but these are only populated from delegation config in config.yaml. The gap is purely in the tool schema and the handler wiring: the parameters exist in the builder, they just aren't exposed to the model via delegate_task().

Implementation sketch

  1. Add provider/model/base_url/api_format/api_key to DELEGATE_TASK_SCHEMA (both top-level properties and tasks.items.properties)
  2. Add corresponding parameters to delegate_task() function signature
  3. Thread them through the handler into _build_child_agent() override params
  4. For api_format, map to the internal api_mode string (the builder already takes override_api_mode)

Related issues (all should be closed by this unified implementation)

  • #5012 — Allow delegate_task to accept provider/model parameters (original feature request)
  • #10995 — Per-task model selection (feature)
  • #17685 — Per-task model override silently ignored (bug)
  • #23467 — delegate_task model parameter silently discarded (bug)
  • #32711 — delegate_task lacks model and provider parameters (feature gap)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix feat: add model/provider/base_url/api_format parameters to delegate_task (consolidating #5012, #10995, #17685, #23467, #32711)