Skip to content

Allow sub-agents to be invoked with a different model #310138

Description

@riessfa

Copilot Chat Extension Version: 0.43.0
VS Code Version: Version: 1.115.0 (Universal)
OS Version: macOS 26.4.1
Feature (e.g. agent/edit/ask mode): Agent mode launching a subagent
Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude Sonnet 4.6 (probably is affected for all MS CoPilot models)
Logs: na

Steps to Reproduce:

  1. Ask to do something with a sub agent. Tell the orchestrator to use a specific model from Microstoft CoPilot (no third party involved here)
  2. Verify that the sub agent did not run with that model, it has only run with the same model launching the sub agent

___________ AI writeup and suggestion ____________
AI WriteUp for better understanding:

Summary

When the agent invokes a sub-agent via runSubagent, there is no way to specify which model that sub-agent should use. The sub-agent always inherits the model selected in the VS Code UI by the user. This prevents the agent from delegating tasks to a more suitable model (e.g. a cheaper/faster model for simple lookups, or a more capable model for complex reasoning steps).

Current Behaviour

Sub-agents are spawned using the same model that was selected by the user for the top-level conversation. There is no model parameter on the runSubagent tool. Prompting the agent to "use Claude Opus for this sub-agent" has no effect — the model is fixed at the session level.

Expected Behaviour

The runSubagent tool should accept an optional model parameter:

{
  "prompt": "Analyse this codebase for security vulnerabilities...",
  "agentName": "Explore",
  "model": "claude-opus-4-5"
}

When omitted, the sub-agent inherits the session model (preserving current behaviour). When specified, the sub-agent runs with the requested model.

Constraints / Scope

  • This should only be supported for official GitHub Copilot models (i.e. models available in the Copilot model picker). Third-party or custom model endpoints should not be injectable through this path.
  • The available model identifiers should be validated against the user's current Copilot subscription/model access, and the call should fail gracefully (with a clear error) if the requested model is not available.
  • This is an opt-in capability — existing agent definitions that don't specify a model are unaffected.

Use Cases

  • Use a fast/cheap model (e.g. GPT-4o mini) for high-volume read-only exploration sub-agents.
  • Use a high-capability model (e.g. Claude Opus) for complex reasoning or security analysis sub-agents, independent of what the user has selected for the main conversation.
  • Agent definitions (.agent.md) could declare a preferred model for their specific task domain.

Impact

Without this capability, the agent cannot optimise cost/quality trade-offs across sub-tasks, and power users cannot build multi-model agentic workflows within VS Code Copilot.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions