Skip to content

Fix model context resolution#322256

Merged
pwang347 merged 4 commits into
mainfrom
pawang/fix-context-default
Jun 21, 2026
Merged

Fix model context resolution#322256
pwang347 merged 4 commits into
mainfrom
pawang/fix-context-default

Conversation

@pwang347

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 21, 2026 03: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.

Pull request overview

This PR addresses incorrect “resolved model configuration” behavior in chat UI surfaces by ensuring schema defaults are consistently present (and used as fallbacks) and by improving how per-editor configuration is stored and propagated.

Changes:

  • Update model-configuration resolution to always merge schema defaults, even when no stored/global config exists.
  • Adjust per-editor configuration store behavior to mirror user changes to the profile-global configuration and to handle late model/provider registration.
  • Align UI fallback behavior (context-usage widget + session-type resolution) with the corrected configuration semantics and add/adjust tests.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelConfigurationStore.test.ts Updates test stubs for new ILanguageModelsService members used by the store.
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelConfigurationLogic.test.ts Updates/extends tests to assert schema defaults are preserved during resolution.
src/vs/workbench/contrib/chat/browser/widgetHosts/viewPane/chatContextUsageWidget.ts Adds schema-default fallback for displayed context window size to match picker semantics.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationStore.ts Adds cache invalidation + mirrors per-editor changes to profile-global config; refactors local write path.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelConfigurationLogic.ts Ensures resolveModelConfiguration always merges schema defaults.
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Prefers the actual session resource for determining session type once a session exists.

Copilot's findings

  • Files reviewed: 6/6 changed files
  • Comments generated: 2

@pwang347 pwang347 marked this pull request as ready for review June 21, 2026 05:04
@pwang347 pwang347 enabled auto-merge (squash) June 21, 2026 05:05
@pwang347 pwang347 merged commit cfb41fb into main Jun 21, 2026
28 checks passed
@pwang347 pwang347 deleted the pawang/fix-context-default branch June 21, 2026 05:53
@vs-code-engineering vs-code-engineering Bot added this to the 1.126.0 milestone Jun 21, 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.

3 participants