Implement subagent default setting to Auto without overriding models - #333663
Conversation
There was a problem hiding this comment.
Copilot review overview
Review tier: Balanced
Findings: 1
New issues introduced by this change (2)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts — When agentName is omitted, subagent is always undefined, even though this tool inherits the… |
|
src/vs/workbench/contrib/chat/test/common/tools/builtinTools/runSubagentTool.test.ts — This and the following direct-invocation Auto test are inside the nested subagent depth tracking… |
What changed in this PR
Adds an experimental setting to default eligible local subagents to Copilot Auto while preserving explicit, agent-configured, and BYOK model selections.
Changes:
- Registers
chat.subagents.defaultToAuto. - Adds cache-first Auto model resolution and eligibility checks.
- Expands model precedence, fallback, and routing tests.
| File | Description |
|---|---|
chat.shared.contribution.ts |
Registers the setting. |
constants.ts |
Adds its configuration key. |
runSubagentTool.ts |
Implements Auto model resolution. |
runSubagentTool.test.ts |
Adds routing and fallback coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
This PR has now been rebased onto the latest In addition to preserving explicit, agent-configured, inherited, and BYOK model behavior while allowing eligible subagents to default to Auto, the PR now adds product telemetry for the model-selection source. The
Selection precedence:
The event records the source of the model assigned to the subagent, not the concrete backend to which Auto later routes. Validation completed: 48/48 targeted tests passed, full client and Copilot extension compilation passed, ESLint and pre-commit hygiene passed, and live Code OSS validation confirmed that the parent remained on Claude Opus 5 while the Auto-routed subagent ran on MAI Code 1.1 Flash. |
0586fa1 to
f000994
Compare
Screenshot ChangesBase: 2 insignificant change(s) omitted (≤20 px, Δ≤2). See CI logs for details. Errored (8)Fixtures that failed to render — no screenshot was produced.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new picker guard mishandles defined empty-string subagent invocation IDs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
extensions/copilot/src/extension/conversation/vscode-node/chatParticipants.ts — Use a presence check here rather than truthiness. An empty-string subAgentInvocationId is still… |
Issues resolved since last review (2)
| Severity | Finding |
|---|---|
src/vs/workbench/contrib/chat/test/common/tools/builtinTools/runSubagentTool.test.ts — This and the following direct-invocation Auto test are inside the nested subagent depth tracking… View resolved comment |
|
src/vs/workbench/contrib/chat/common/tools/builtinTools/runSubagentTool.ts — When agentName is omitted, subagent is always undefined, even though this tool inherits the… View resolved comment |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Automatic rate-limit switching can still change the global model picker from a subagent request.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
extensions/copilot/src/extension/conversation/vscode-node/chatParticipants.ts — The picker guard is incomplete: switchToAutoModel still unconditionally executes… |
Issues resolved since last review (1)
| Severity | Finding |
|---|---|
extensions/copilot/src/extension/conversation/vscode-node/chatParticipants.ts — Use a presence check here rather than truthiness. An empty-string subAgentInvocationId is still… View resolved comment |


This pull request introduces a new setting,
chat.subagents.defaultToAuto, which allows local subagents to default to the Auto model when no specific model is specified. Key changes include:This change enhances the flexibility of subagent behavior while maintaining existing configurations and ensuring backward compatibility.