Skip to content

[REQUEST] model field on CustomAgentConfig for per-agent model selection #865

@brolnickij

Description

@brolnickij

Summary

CustomAgentConfig currently has no model field. Sub-agents spawned via task() always inherit the session-level model. There's no way to run a sub-agent on a different (e.g. cheaper/faster) model.

Use case

We run an orchestrator where the main agent uses claude-opus-4.6 for complex reasoning, but delegates research tasks to a sub-agent that only calls MCP tools (code search, docs lookup). This sub-agent doesn't need a frontier model — claude-haiku-4.5 would be sufficient and 5-10x cheaper.

Currently, the sub-agent always runs on the session model, so every task() delegation costs the same as a main-agent turn.

Proposal

Add an optional model field to CustomAgentConfig:

interface CustomAgentConfig {
  name: string
  description?: string
  prompt?: string
  tools?: string[]
  mcpServers?: Record<string, McpServerConfig>
  infer?: boolean
  model?: string // ← new
}

When set, the sub-agent's LLM calls should use this model instead of the session-level one.

Environment

  • @github/copilot-sdk 0.1.33-preview.0
  • Copilot CLI 1.0.5
  • Node.js / TypeScript

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions