Skip to content

feat(delegate): per-task model routing for delegate_task#20000

Open
Ninewinger wants to merge 1 commit into
NousResearch:mainfrom
Ninewinger:feat/delegate-per-task-model
Open

feat(delegate): per-task model routing for delegate_task#20000
Ninewinger wants to merge 1 commit into
NousResearch:mainfrom
Ninewinger:feat/delegate-per-task-model

Conversation

@Ninewinger

Copy link
Copy Markdown

Per-task model routing for delegate_task

Summary

Adds the ability to specify a model + provider per individual task in delegate_task's tasks array, enabling different subagents to use different models in the same batch.

Motivation

When orchestrating work via delegate_task, not all subagents need the same model. Simple mechanical tasks (file reads, searches, formatting) can use cheap/fast models, while reasoning-heavy tasks benefit from more capable ones. Currently all subagents inherit the global delegation config model — this PR adds per-task override.

Changes

  • delegate_tool.py: Added model field (provider + model) to task schema in tasks array
  • run_agent.py: Model routing logic — per-task model takes precedence over global delegation config model

64 lines added across 2 files.

Usage

tasks:
  - goal: "Read file X"
    model:
      provider: nvidia
      model: meta/llama-3.3-70b-instruct
  - goal: "Debug complex issue Y"
    model:
      provider: nvidia
      model: deepseek-ai/deepseek-v3.2

Testing

  • Syntax validation passed
  • Functionally verified with multiple model combinations
  • Backward compatible — omitting model field uses global config as before

Added support for per-task model overrides in delegate_task tool.
Allows specifying model+provider per task or globally for all subagents.
Uses the same pattern as acp_command/acp_args for consistency.
@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/agent Core agent loop, run_agent.py, prompt builder tool/delegate Subagent delegation labels May 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Related to existing per-model routing PRs: #4833 (per-skill model routing + supervisor config) and #3172 (per-call model/provider override). Consider consolidating.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent loop, run_agent.py, prompt builder P3 Low — cosmetic, nice to have tool/delegate Subagent delegation type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants