Refs: #298380
Complexity: 3
Create Issue
Create Issue
The runSubagent tool now accepts an optional model parameter that lets the LLM (or a user via system prompt) request a specific model for the subagent invocation. The model is specified as a qualified name like "Model Name (Vendor)".
Setup
- Use VS Code Insiders with Copilot
- Have multiple models available in the model picker (e.g. GPT-4o, Claude Sonnet 4.6)
- Agent mode in chat
1. Subagents use different models
- Open a chat in agent mode
- Ask the agent: "Run two subagents — one with GPT-4o (copilot) and one with Claude Sonnet 4.6 (copilot). Each subagent should report which model it is running on."
- Verify each subagent runs successfully
- Verify the two subagents report different models corresponding to what was requested
2. Explicit model overrides agent-configured model
- Create a custom agent
.md file with a specific model configured (e.g. model: GPT-4o (copilot))
- Ask the LLM to invoke that agent via subagent but explicitly set
model to a different model (e.g. "Claude Sonnet 4.6 (copilot)")
- Verify the explicit
model parameter takes precedence over the agent's configured model
3. Multiplier constraint — model not more expensive than main model
- Select a cheaper model as your main chat model (e.g. GPT-4o Mini)
- Ask the agent to "use a subagent with model GPT-4o (copilot)" or another model with a higher multiplier
- Verify the tool returns an error message explaining the model exceeds the current model's cost tier
4. Unknown model name error
- Ask the agent to use a subagent with a model name that doesn't exist (e.g.
"NonExistent Model (copilot)")
- Verify a clear error message:
Requested model 'NonExistent Model (copilot)' not found.
5. No model specified — falls back to main model
- Run a subagent without specifying any model parameter
- Verify the subagent uses the same model as the parent conversation
Refs: #298380
Complexity: 3
Create Issue
Create Issue
The
runSubagenttool now accepts an optionalmodelparameter that lets the LLM (or a user via system prompt) request a specific model for the subagent invocation. The model is specified as a qualified name like"Model Name (Vendor)".Setup
1. Subagents use different models
2. Explicit model overrides agent-configured model
.mdfile with a specific model configured (e.g.model: GPT-4o (copilot))modelto a different model (e.g."Claude Sonnet 4.6 (copilot)")modelparameter takes precedence over the agent's configured model3. Multiplier constraint — model not more expensive than main model
4. Unknown model name error
"NonExistent Model (copilot)")Requested model 'NonExistent Model (copilot)' not found.5. No model specified — falls back to main model