Skip to content

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

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

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

Conversation

@iRonin

@iRonin iRonin commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Three mechanisms for routing different tasks to different LLM models:

1. delegate_task(model=..., provider=...)

Route individual subagent calls to any model.

2. Skill frontmatter model: field

Skills can declare their own model in SKILL.md frontmatter. When loaded via delegate_task(skill='...'), the skill's model is used automatically.

3. Config aliases

delegation:
  supervisor_model: anthropic/claude-opus-4-6
  execution_model: google/gemini-flash-1.5

Closes #5508

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.
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.

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

2 participants