Skip to content

If long context = default context. Show a single long context option in picker - #323116

Merged
Logan Ramos (lramos15) merged 1 commit into
mainfrom
lramos15/informal-swordtail
Jun 26, 2026
Merged

If long context = default context. Show a single long context option in picker#323116
Logan Ramos (lramos15) merged 1 commit into
mainfrom
lramos15/informal-swordtail

Conversation

@lramos15

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings June 26, 2026 12:03
@lramos15
Logan Ramos (lramos15) enabled auto-merge (squash) June 26, 2026 12:03

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

Updates model-configuration UI/schema generation so that when “long context” is effectively the default (no surcharge), the UI can still display a single long-context option as an indicator rather than hiding the setting entirely.

Changes:

  • Allow single-item enum configuration properties to surface in model configuration action menus and the chat model picker.
  • Emit a single-option contextSize schema/option when long-context has no surcharge (agent host + Copilot extension + Copilot CLI).
  • Adjust/extend unit tests to validate the new single-option behavior.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/test/common/languageModels.test.ts Updates tests to expect single-item enums to produce actions (and fixes coverage for the new behavior).
src/vs/workbench/contrib/chat/common/languageModels.ts Includes single-item enum properties when generating per-model configuration submenu actions.
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Allows single-item enums to appear in the combined (UBB) model configuration UI.
src/vs/platform/agentHost/test/node/copilotAgent.test.ts Updates agent host test to expect a single long-context contextSize option instead of omitting the property.
src/vs/platform/agentHost/node/copilot/copilotAgent.ts Synthesizes a single-option contextSize schema when long-context has no surcharge.
extensions/copilot/src/extension/conversation/vscode-node/languageModelAccess.ts Returns a single long-context option when there is no surcharge, enabling the picker indicator.
extensions/copilot/src/extension/chatSessions/copilotcli/node/copilotCli.ts Emits a single long-context option (instead of two) when there is no surcharge in Copilot CLI schema.

Review details

  • Files reviewed: 7/7 changed files
  • Comments generated: 3
  • Review effort level: Low

Comment on lines +839 to +849
return {
type: 'number',
title: localize('copilot.modelContextSize.title', "Context Size"),
description: localize('copilot.modelContextSize.description', "Selects the context window size for this model."),
default: longContextMax,
enum: [longContextMax],
enumLabels: [formatTokenCount(longContextMax)],
enumDescriptions: [
localize('copilot.modelContextSize.longerSessions', "Longer sessions"),
],
};
Comment on lines 296 to 301
for (const [key, propSchema] of Object.entries(schema.properties)) {
if (propSchema.group !== group) {
continue;
}
if (!propSchema.enum || propSchema.enum.length < 2) {
if (!propSchema.enum || propSchema.enum.length < 1) {
continue;
});

test('builds one submenu per enum property with >= 2 values', () => {
test('builds one submenu per enum property with >= 1 values', () => {
@lramos15
Logan Ramos (lramos15) merged commit 6ae1b8e into main Jun 26, 2026
30 checks passed
@lramos15
Logan Ramos (lramos15) deleted the lramos15/informal-swordtail branch June 26, 2026 12:44
@vs-code-engineering vs-code-engineering Bot added this to the 1.127.0 milestone Jun 26, 2026
@vs-code-engineering vs-code-engineering Bot locked and limited conversation to collaborators Aug 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants