Repository navigation
agentHost: apply managed model defaults without locking choices - #341682
Merged
Ross Wollman (rwoll) merged 18 commits intoOct 16, 2026
Merged
Conversation
Wire existing runtime model, Auto tier, effort, and context policies into session configuration and the model picker. Preserve personal preferences beneath managed values and publish chat-scoped runtime reports. Draft implementation: runtime compatibility bugs and local review findings remain merge blockers. Ensemble managed settings are a separate dependent change. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Keep restored conversation values separate from durable preferences and honor standard read-only defaults without optional provenance metadata. Add cross-chat, late-registration, and lock-removal regressions. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
*🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Use runtime model controls as startup defaults without opting into strict model enforcement. Preserve explicit and restored configuration, protect host reports, and keep ordinary picker edits aligned with request assembly. Cover normalized server payloads and known runtime limitations. Fix review regressions, cross-platform path expectations, formatting, and deterministic AHP report handling. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Replace the text diagram with a Mermaid flowchart and keep the ownership, runtime-mode, and validation rules concise. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Remove the new guide and its skill reference at the maintainer's request. *🤖 Authored with GitHub Copilot on behalf of @rwoll.* Co-authored-by: Copilot <[email protected]>
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Configuration restoration and edit-path regressions remain, and report readback adds blocking work before prompt submission.
4 open findings
What changed in this PR
Exposes Copilot Agent Host model defaults as editable picker choices while separating runtime state from personal preferences.
Changes:
- Adds chat-scoped model reports and default-source tracking.
- Connects picker configuration, requests, restoration, and read-only controls.
- Expands regression coverage and documents runtime limitations.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/languageModels.test.ts | Tests default persistence and read-only choices. |
| src/vs/workbench/contrib/chat/test/browser/widget/input/modelPicker/modelPickerTabs.test.ts | Tests accessible managed-value descriptions. |
| src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelConfigurationStore.test.ts | Covers scoped defaults, restoration, and preferences. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentSessionSettingsFileSystemProvider.test.ts | Tests report-safe settings writes. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostLanguageModelProvider.test.ts | Tests host metadata forwarding. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostChatContribution.test.ts | Tests exact-chat report projection. |
| src/vs/workbench/contrib/chat/test/browser/accessibility/chatAccessibilityHelp.test.ts | Tests read-only option guidance. |
| src/vs/workbench/contrib/chat/common/model/chatModelStore.ts | Adds model-report startup state. |
| src/vs/workbench/contrib/chat/common/model/chatModel.ts | Carries observable model reports. |
| src/vs/workbench/contrib/chat/common/languageModels.ts | Preserves explicit defaults and honors read-only values. |
| src/vs/workbench/contrib/chat/common/chatSessionsService.ts | Exposes session model reports. |
| src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts | Forwards reports into chat models. |
| src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerModelConfig.ts | Describes managed values and excludes locked changes. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.ts | Applies scoped reports and tracks preference sources. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.ts | Adds default tracking and write guards. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Observes active-chat model reports. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentSessionSettingsFileSystemProvider.ts | Excludes runtime reports from settings writes. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostSessionHandler.ts | Maps exact-chat reports to editor model identifiers. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.ts | Forwards default-tracking metadata. |
| src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts | Documents editable defaults and read-only options. |
| src/vs/sessions/contrib/providers/agentHost/test/browser/localAgentHostSessionsProvider.test.ts | Tests report preservation during replacement. |
| src/vs/sessions/contrib/providers/agentHost/browser/baseAgentHostSessionsProvider.ts | Keeps reports out of preferences and writes. |
| src/vs/sessions/contrib/providers/agentHost/AGENT_HOST_SESSIONS_PROVIDER.md | Documents chat-scoped report ownership. |
| src/vs/sessions/contrib/chat/test/browser/sessionModelSelection.test.ts | Tests scoped draft configuration. |
| src/vs/sessions/contrib/chat/browser/sessionModelSelection.ts | Adds fallback configuration access. |
| src/vs/sessions/contrib/chat/browser/newChatInput.ts | Enables scoped picker configuration. |
| src/vs/sessions/contrib/automations/browser/automationModelConfiguration.ts | Separates implicit defaults from captured preferences. |
| src/vs/platform/agentHost/test/node/providerIntegration/copilotAutoTier.integrationTest.ts | Tests runtime defaults, edits, and resume behavior. |
| src/vs/platform/agentHost/test/node/e2e/README.md | Documents integration coverage and runtime caveats. |
| src/vs/platform/agentHost/test/node/e2e/providers/copilotAgentHostE2E.integrationTest.ts | Asserts protected runtime model reports. |
| src/vs/platform/agentHost/test/node/e2e/harness/ahpSnapshot.ts | Omits asynchronous report-only traffic from summaries. |
| src/vs/platform/agentHost/test/node/copilotSessionLauncher.test.ts | Updates launcher assertions and configuration helpers. |
| src/vs/platform/agentHost/test/node/copilotSdkManagedSettings.integrationTest.ts | Tests managed-setting composition contracts. |
| src/vs/platform/agentHost/test/node/copilotManagedSettings.test.ts | Tests policy resolution inputs and failures. |
| src/vs/platform/agentHost/test/node/copilotManagedModelConfiguration.test.ts | Tests default projection and omission. |
| src/vs/platform/agentHost/test/node/copilotApprovalPolicy.test.ts | Moves resolution coverage to its dedicated suite. |
| src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts | Tests owning-chat report publication and removal. |
| src/vs/platform/agentHost/test/node/copilotAgent.test.ts | Updates policy and metadata expectations. |
| src/vs/platform/agentHost/test/node/ahpSnapshot.test.ts | Tests report-only traffic filtering. |
| src/vs/platform/agentHost/test/node/agentService.test.ts | Tests protection against client report writes. |
| src/vs/platform/agentHost/test/common/agentModelConfigurationMeta.test.ts | Tests report and metadata validation. |
| src/vs/platform/agentHost/node/copilot/copilotSessionLauncher.ts | Omits implicit managed options at creation. |
| src/vs/platform/agentHost/node/copilot/copilotManagedSettings.ts | Extracts shared runtime policy resolution. |
| src/vs/platform/agentHost/node/copilot/copilotManagedModelConfiguration.ts | Projects defaults and builds runtime reports. |
| src/vs/platform/agentHost/node/copilot/copilotApprovalPolicy.ts | Removes relocated resolution code. |
| src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts | Refreshes and publishes chat-owned model reports. |
| src/vs/platform/agentHost/node/copilot/copilotAgent.ts | Integrates catalog defaults and model-change policy. |
| src/vs/platform/agentHost/node/agentService.ts | Protects runtime reports from client writes. |
| src/vs/platform/agentHost/common/meta/vscode/agentModelConfigurationDefaults.ts | Reads and writes default-tracking metadata. |
| src/vs/platform/agentHost/common/meta/agentModelConfigurationMeta.ts | Exports metadata helpers. |
| src/vs/platform/agentHost/common/agentModelConfiguration.ts | Defines reports, validation, and source markers. |
| .github/skills/policy-and-managed-settings/github-managed-settings.md | Distinguishes workbench policy from runtime defaults. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Keep saved personal preferences below managed startup defaults while preserving existing chats and explicit current-chat choices. Carry validated default provenance through model catalogs and chat-scoped reports, and cover restoration and unavailable-model fallback. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Integrate main at 82b09e6, preserving managed-model reports alongside per-chat configuration. Correct restoration test identity and diagnose native policy contamination before synthetic managed-model integration tests. Validation: 3007 unit tests passed (27 pending); client type-check, targeted ESLint, and branch hygiene passed. Real-SDK policy tests are blocked by machine-wide device policy; the explicit preflight was verified. No policy files were changed. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved preference-ownership, scoped-default precedence, and stale-catalog issues can produce incorrect picker selections and options.
7 open findings
Build model policy reports from the current catalog · New Preserve inherited preference provenance during input restoration · New Do not inherit root policy for omitted scoped managed defaults · New Validate restored preferences against chat-scoped schema Exclude read-only options from reset-to-default payload Route configuration notifications through scoped model configuration Avoid blocking sends on synchronous model reporting
🧠 Review effort: Balanced
Preserve telemetry revocation handling while coalescing model reports off the send path and reading the live catalog. Route notification edits through scoped preferences, retain scoped restore choices and inherited-default provenance, and exclude read-only options from reset payloads. Fix the concurrent-policy-query ordering assertion. Validation: 2168 unit tests, 25 native SDK tests, and 268 Copilot replay tests passed; client typecheck and branch hygiene passed. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Ross Wollman (rwoll)
enabled auto-merge
October 15, 2026 18:40
Dmitriy Vasyura (dmitrivMS)
previously approved these changes
Oct 15, 2026
Bring in #341849 and latest main after the upstream panel regression fix landed. Client fast build and focused panel/terminal-style validation passed (14 tests). 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
The strict managed-lock runtime reproduction can either reject or successfully reconcile the same saved chat. Specify the desired success contract and narrowly skip this unsupported opt-in scenario under github/copilot-agent-runtime#26739 instead of requiring the defect to occur. Default-only coverage remains active. Validated client build, ESLint and 24 passing / 1 pending focused integration tests across six runs. No manual CI triggered. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
roblourens
previously approved these changes
Oct 15, 2026
Harald Kirschner (digitarald)
previously approved these changes
Oct 15, 2026
Replace timer and root-catalog query-count assumptions with the session configuration publication event. Retain exact workspace-query and no-session-start assertions, and cover a deliberately blocked catalog. Validation: client fast build, targeted ESLint, 95 restart tests (1 existing pending), and 10 repetitions of both catalog timing variants passed. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
Ross Wollman (rwoll)
dismissed stale reviews from Harald Kirschner (digitarald) and roblourens
via
October 15, 2026 23:35
757856a
roblourens
previously approved these changes
Oct 15, 2026
Register a concrete DisposableStore for Event.toPromise instead of passing the suite's add-only disposable helper. Validated client type-check, client build, 95 restart tests (1 existing pending), and targeted hygiene. 🤖 Authored with GitHub Copilot on behalf of @rwoll. Co-authored-by: Copilot <[email protected]>
roblourens
approved these changes
Oct 16, 2026
Ross Wollman (rwoll)
deleted the
agents/managed-model-startup-defaults
branch
October 16, 2026 00:36
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

agentHost: apply managed model defaults without locking choices
Expose the runtime's
model,autoTier,effortLevel, andcontextTierstartup defaults in the Copilot Agent Host picker. Managed defaults take precedence over inherited personal preferences in new chats, while explicit current-chat choices and existing conversations retain their configuration.Use
enableManagedSettingswithout the separateenforceManagedModelDefaultsopt-in. A server-normalized scalar is not evidence of a user lock. Permission/sandbox enforcement and genuinely read-only options advertised by other hosts are unchanged. Ensemble managed-settings integration is out of scope.Scenarios and Precedence
chat.defaultModelbehavior remains the model-selection fallback. A scoped report without managed defaults does not inherit root managed keys.Reports are exact-chat-scoped, coalesced, and asynchronous: readback does not block a completed model change. Catalog refreshes update live reports rather than retaining launch-time choices.
Manual Validation
The maintainer reports that manual testing works in the freshly built Code OSS preview at head
bd6fe32086d1f5b44298c7e32fa9d2a63dc44e42. Individual cases were not enumerated, so this is a successful user-reported smoke test, not a claim that every scenario below was independently verified.Use plain, server-shaped payloads with the native test rig. Restart Agent Host after changing policy. Test both a fresh profile and an existing profile with a conflicting saved preference.
{ "model": "auto", "autoTier": "intelligence" }Start a new chat with saved Efficiency: expect editable Auto / Intelligence. Choose Balance or Efficiency, send a short prompt, and verify the choice does not snap back. Another model remains selectable.
{ "model": "gpt-5", "effortLevel": "high", "contextTier": "long_context" }Replace
gpt-5with an available model offering both options. Expect editable High effort and long context. After draft initialization, change both and send: the edited values must remain selected. Switch between two chats and reload: each retains its configuration. Remove policy with{}and restart: new chats use personal preferences rather than retaining an untouched managed default.Runtime Caveats
intelligenceUsesHydraFusionis false. This predates this PR and is separate from managed-default precedence. A general GPT/Claude-to-Ensemble reset has not been reproduced.🤖 Authored with GitHub Copilot on behalf of Ross Wollman (@rwoll).