Skip to content

agentHost: switch Auto routing preferences with the SDK - #335103

Merged
Logan Ramos (lramos15) merged 3 commits into
mainfrom
lramos15/agents/auto-tier-sdk-switching
Sep 8, 2026
Merged

Logan Ramos (lramos15) merged 3 commits into
mainfrom
lramos15/agents/auto-tier-sdk-switching

Conversation

@lramos15

@lramos15 Logan Ramos (lramos15) commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

Fixes #333809.

Summary

  • Remove launch-time Auto routing profile pinning, the frozen launch-plan tier, and local SDK CAPI type widening.
  • Forward the selected Auto preference through SDK setModel, alongside reasoning effort and context size. Send explicit null to reset Auto routing preferences; omit the option for concrete models.
  • Resolve create-time preferences from the model selection and shared settings, including empty-history resume fallbacks. Ordinary resume preserves runtime-owned routing state; subsequent model changes apply through setModel.
  • Persist the requested preference rather than rewriting it to the launch profile, and preserve prior metadata when the SDK rejects a change.
  • Unify Auto-tier enablement and override settings across Copilot Chat and agent-host sessions, using the shared workbench-owned experiment default.
  • Align model-picker labels, hover text, and accessibility help with the Auto "Optimize for" preferences.

Auto preference changes are staged by the runtime and commit on a later successful Auto turn; an accepted setModel request is not treated as immediate activation.

Dependency and history

#334606 has merged into main, supplying SDK 1.0.13 and runtime 1.0.84-2. This PR contains only the Auto-tier feature changes and focused CI fixes on main; the already-merged dependency commits are no longer part of the PR commit list, and dependency upgrades are not included in the diff.

Implementing PRs

Validation

  • npm run transpile-client passed.
  • 843 Electron unit tests passed, with 1 pending, across the CopilotAgent, CopilotAgentSession, and CopilotSessionLauncher suites.
  • Copilot extension npm run typecheck passed across all four TypeScript projects.
  • All 48 focused extension unit tests passed, covering configuration registration and Auto-mode behavior. Focused ESLint passed for the changed files.
  • The strict configuration-manifest test remains unchanged: workbench-owned Auto settings now use the existing shared-settings category.
  • Commit hooks passed.
  • All 33 CI checks passed for 5c8c130ffcf. Code OSS run 34272648088 completed successfully, including both Copilot jobs and Linux Remote.
  • A separate macOS Electron cancellation/replacement-turn test failed transiently, passed in focused local replay, and passed on a failed-job-only CI retry. No smoke or E2E tests were changed for transient failures.

(Written by Copilot)

Base automatically changed from roblou/agents/upgrade-vscode-github-copilot-1083 to main September 8, 2026 18:50
Forward Auto preferences and explicit resets through the SDK instead of pinning the launch profile. Unify Auto-tier settings across Copilot Chat and agent-host sessions, and align the picker and accessibility wording.

Fixes #333809.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 61130d6b-7319-480e-92d1-b6b08949e03a
Copilot AI balanced review requested due to automatic review settings September 8, 2026 19:24
@lramos15
Logan Ramos (lramos15) force-pushed the lramos15/agents/auto-tier-sdk-switching branch from 99bae5c to 95bb9a8 Compare September 8, 2026 19:24

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The cross-component routing and persistence changes warrant final human review.

Review tier: Balanced
Findings: None

What changed in this PR

Updates Agent Host Auto routing to use SDK runtime-switchable preferences while aligning configuration and terminology across Copilot Chat.

Changes:

  • Forwards Auto preferences through creation, resume, and setModel.
  • Unifies Auto settings and experiment defaults.
  • Updates UI terminology, accessibility guidance, and tests.
File Description
src/​vs/​workbench/​contrib/​chat/​test/​browser/​widget/​input/​modelPicker/​modelPickerHover.test.ts Tests updated hover labels.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​agentSessions/​agentHostCopilotCliSettingsContribution.test.ts Tests shared setting forwarding.
src/​vs/​workbench/​contrib/​chat/​test/​browser/​accessibility/​chatAccessibilityHelp.test.ts Tests revised accessibility guidance.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerHover.ts Renames the Auto configuration label.
src/​vs/​workbench/​contrib/​chat/​browser/​widget/​input/​modelPicker/​modelPickerCard.ts Aligns Auto card terminology.
src/​vs/​workbench/​contrib/​chat/​browser/​chat.shared.contribution.ts Registers shared Auto settings.
src/​vs/​workbench/​contrib/​chat/​browser/​agentSessions/​agentHost/​agentHostCopilotCliSettingsContribution.ts Forwards shared settings to Agent Host.
src/​vs/​workbench/​contrib/​chat/​browser/​actions/​chatAccessibilityHelp.ts Documents Auto preference interaction.
src/​vs/​platform/​agentHost/​test/​node/​copilotSessionLauncher.test.ts Covers creation, resume, overrides, and fallbacks.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgentSession.test.ts Covers SDK setModel options and resets.
src/​vs/​platform/​agentHost/​test/​node/​copilotAgent.test.ts Covers switching, persistence, rejection, and isolation.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotSessionLauncher.ts Resolves launch and resume preferences.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgentSession.ts Passes Auto preferences through setModel.
src/​vs/​platform/​agentHost/​node/​copilot/​copilotAgent.ts Removes launch pinning and persists requested choices.
src/​vs/​platform/​agentHost/​common/​copilotCliConfig.ts Defines shared root configuration.
src/​vs/​platform/​agentHost/​common/​autoModeTiers.ts Normalizes retired preference values.
extensions/​copilot/​src/​platform/​endpoint/​node/​test/​automodeService.spec.ts Tests effective shared-setting behavior.
extensions/​copilot/​src/​platform/​endpoint/​node/​automodeService.ts Reads the workbench-owned setting.
extensions/​copilot/​src/​platform/​configuration/​common/​configurationService.ts Reclassifies shared Auto settings.
extensions/​copilot/​package.nls.json Removes superseded localization.
extensions/​copilot/​package.json Removes duplicate setting registrations.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Auto-tier support now reads the shared effective configuration, so remove the obsolete experimentation-service injection and assert that the regression test performs no separate experiment lookup. Fixes the extension typecheck failure on #335103.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 61130d6b-7319-480e-92d1-b6b08949e03a
Keep the centralized Auto-tier settings in the existing shared configuration category rather than the extension-owned advanced category. Preserve their IDs and defaults, update consumers, and keep the strict package.json registration test unchanged. Fixes the remaining Copilot unit-test failure on #335103.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 61130d6b-7319-480e-92d1-b6b08949e03a
@lramos15
Logan Ramos (lramos15) marked this pull request as ready for review September 8, 2026 21:12
@lramos15
Logan Ramos (lramos15) merged commit 2b18fc5 into main Sep 8, 2026
54 of 55 checks passed
@lramos15
Logan Ramos (lramos15) deleted the lramos15/agents/auto-tier-sdk-switching branch September 8, 2026 21:58
@vs-code-engineering vs-code-engineering Bot added this to the 1.138.0 milestone Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the Auto routing profile pinning workaround once the SDK supports switching tiers

3 participants