Skip to content

[Feature Request] Allow subagents to override model (parity with Claude Agent SDK) #2939

@nicbstme

Description

@nicbstme

Summary

Allow custom subagents to specify their own model, independent of the orchestrator session's model. The Claude Agent SDK already supports this via a model field on AgentDefinition. Copilot's CustomAgentConfig and custom agent YAML frontmatter do not, which forces every subagent dispatch onto the orchestrator's model tier and blocks cost and latency optimization for multi agent workflows.

Motivation

Real multi agent systems benefit from heterogeneous model tiers:

  • Orchestrator runs a strong planning model (Opus, GPT 5) to decompose work and delegate
  • Narrow subagents (validation, extraction, format conversion, classification) run on a faster and cheaper model (Haiku, GPT 5 nano)
  • Occasionally the reverse: a critical reviewer subagent wants a stronger model than the orchestrator

Today all subagents inherit the orchestrator's session model, so a session pays the tallest model's price per token across every subagent invocation. For fan out patterns (e.g., spawning N parallel validators over N slides, chunks, or rows) this is a material cost multiplier.

Current state

  • CustomAgentConfig (copilot-sdk types.d.ts) exposes name, displayName, description, tools, prompt, mcpServers, infer — no model field
  • Custom agent YAML frontmatter discovered via AGENTS_DIR has no way to declare a model
  • Session model is picked once at createSession and inherited by every subagent dispatch in that session
  • BYOK routing applies at session level only; subagents cannot target a different provider

Proposed

  1. Add optional model field to CustomAgentConfig (copilot-sdk)
  2. Accept model aliases and full IDs
  3. Fall back to orchestrator model when omitted
  4. Mirror in custom agent YAML frontmatter (copilot-cli loader)
  5. For BYOK / BYOM setups, allow a provider override so a subagent can route to a different provider than the orchestrator (e.g., orchestrator on Anthropic, subagent on OpenAI)

Precedent

Claude Agent SDK's AgentDefinition.model:
https://code.claude.com/docs/en/agent-sdk/subagents

Accepts 'sonnet' | 'opus' | 'haiku' | 'inherit' or a full model ID, defaults to inherit, honored at dispatch time.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentsSub-agents, fleet, autopilot, plan mode, background agents, and custom agentsarea:modelsModel selection, availability, switching, rate limits, and model-specific behavior
    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions