Skip to content

feat: per-skill model routing + supervisor/execution model config#4833

Open
iRonin wants to merge 1 commit into
NousResearch:mainfrom
iRonin:feat/per-skill-model-routing
Open

feat: per-skill model routing + supervisor/execution model config#4833
iRonin wants to merge 1 commit into
NousResearch:mainfrom
iRonin:feat/per-skill-model-routing

Conversation

@iRonin

@iRonin iRonin commented Apr 3, 2026

Copy link
Copy Markdown
Contributor

Three interconnected features for multi-agent model routing.

1. delegate_task()model / provider params

Same feature as #3172 (great work @ReqX). Added independently here as the foundation for the skill-level routing below.

# Route cheap tasks to a fast model
delegate_task(goal='summarise these docs', model='google/gemini-flash-1.5')

# Route critical work to a capable model
delegate_task(goal='implement the auth module', model='anthropic/claude-opus-4-6')

# Per-task overrides in batch mode
delegate_task(tasks=[
    {'goal': 'fast research task', 'model': 'google/gemini-flash-1.5'},
    {'goal': 'careful code review', 'model': 'anthropic/claude-opus-4-6'},
])

Priority: per-task > call-level > delegation.model config > parent inherit

2. delegate_task()skill / skills params

Load a skill into the subagent's context. The skill's SKILL.md content is prepended to the subagent's system prompt. If the skill's frontmatter contains a model: field, that model is used automatically.

Skill frontmatter:

---
name: code-review
model: anthropic/claude-opus-4-6
provider: anthropic
---
# Code Review Skill
...instructions...

Usage:

# Load skill — uses skill's frontmatter model automatically
delegate_task(goal='review this PR', skill='code-review')

# Explicit model overrides skill frontmatter
delegate_task(goal='review this PR', skill='code-review', model='anthropic/claude-sonnet-4-6')

3. config.yamlsupervisor_model / execution_model aliases

Semantic config keys that make multi-agent intent explicit:

delegation:
  supervisor_model: anthropic/claude-opus-4-6   # main orchestrating agent
  execution_model: google/gemini-flash-1.5       # default for all subagents

These map to model.default and delegation.model respectively during config loading. Explicit model.default / delegation.model always take precedence if both are set.

Three interconnected features for multi-agent model routing:

1. delegate_task() — model/provider params (like PR NousResearch#3172)
   - model, provider: per-call overrides for all subagents in the call
   - Per-task model/provider in batch tasks array
   - Priority: per-task > call-level > delegation config > parent inherit

2. delegate_task() — skill/skills params (new)
   - skill: load a single named skill into the subagent's context
   - skills: load multiple skills
   - Skill SKILL.md content is prepended to the subagent system prompt
   - If SKILL.md frontmatter contains model: or provider: fields, those
     are used as the model/provider for that subagent call (overridable
     by the explicit model param)

3. config.yaml — supervisor_model / execution_model aliases
   - delegation.supervisor_model → model.default (main agent)
   - delegation.execution_model  → delegation.model (all subagents)
   - Resolved during config load; explicit model.default / delegation.model
     always take precedence if both are set
   - Allows clear intent in config:
       delegation:
         supervisor_model: anthropic/claude-opus-4-6
         execution_model: google/gemini-flash-1.5

   Skill frontmatter example:
       ---
       name: code-review
       model: anthropic/claude-opus-4-6
       provider: anthropic
       ---

   Usage example (agent tool call):
       delegate_task(goal='review this PR', skill='code-review')
       delegate_task(goal='summarise docs', model='google/gemini-flash-1.5')
       delegate_task(tasks=[
         {goal: 'fast research', model: 'google/gemini-flash-1.5'},
         {goal: 'careful code', model: 'anthropic/claude-opus-4-6'},
       ])

Builds on / references PR NousResearch#3172 (ReqX) for the model/provider param idea.
@iRonin iRonin force-pushed the feat/per-skill-model-routing branch from 3363b1d to 81da4a4 Compare April 11, 2026 20:37
@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 tool/skills Skills system (list, view, manage) labels May 1, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Superseded by PR #8485 which implements the same feature set (per-skill model routing, delegate_task model/provider params, supervisor/execution config). See also tracking issue #5508.

@alt-glitch

Copy link
Copy Markdown
Collaborator

Superseded by PR #8485

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 tool/skills Skills system (list, view, manage) type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants