Enable tool search and prefer-long-context by default - #328628
Merged
Bhavya U (bhavyaus) merged 2 commits intoAug 2, 2026
Merged
Enable tool search and prefer-long-context by default#328628Bhavya U (bhavyaus) merged 2 commits into
Bhavya U (bhavyaus) merged 2 commits into
Conversation
Flip the defaults for two settings that have been validated behind an opt-in flag: - `chat.agentHost.copilot.toolSearch.enabled` - `github.copilot.chat.preferLongContext.enabled` Both settings are defined in more than one place, so each pair is updated together: - Tool search: the workbench setting registration in `chat.shared.contribution.ts` and the agent-host schema default in `copilotCliConfig.ts` that the renderer forwards into. - Prefer long context: the contributed default in the Copilot extension's `package.json` and `ConfigKey.PreferLongContext`, which throws a `BugIndicatingError` at load if the two drift, plus the forwarded `preferLongContextEnabled` root-config default in `agentHostSchema.ts`. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enables tool search and long-context preference by default across VS Code, Copilot, and agent-host schemas.
Changes:
- Enables tool search by default.
- Enables free long-context windows by default.
- Aligns forwarded schema metadata and descriptions.
Show a summary per file
| File | Description |
|---|---|
chat.shared.contribution.ts |
Enables the workbench tool-search setting. |
copilotCliConfig.ts |
Updates agent-host tool-search schema metadata. |
agentHostSchema.ts |
Updates long-context schema default and description. |
configurationService.ts |
Changes the Copilot code default. |
languageModelAccess.ts |
Removes outdated default documentation. |
package.json |
Changes the contributed long-context default. |
Review details
- Files reviewed: 6/6 changed files
- Comments generated: 1
- Review effort level: Balanced
Bhavya U (bhavyaus)
enabled auto-merge (squash)
August 2, 2026 19:31
The enum comment still said tool search was off by default, which contradicted the schema default flipped in the previous commit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
roblourens
approved these changes
Aug 2, 2026
Bhavya U (bhavyaus)
deleted the
dev/bhavyau/default-tool-search-and-prefer-long-context
branch
August 2, 2026 19:52
Bhavya U (bhavyaus)
added a commit
that referenced
this pull request
Aug 14, 2026
Removes the `github.copilot.chat.preferLongContext.enabled` setting and reverts to always showing both the default and long-context options in the model picker. Also removes the now-dead `freeLongContext` plumbing that the setting gated. Reverts: - #322950 - #323116 - #324650 - #328628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Bhavya U (bhavyaus)
added a commit
that referenced
this pull request
Aug 14, 2026
* Revert to showing all context size options Removes the `github.copilot.chat.preferLongContext.enabled` setting and reverts to always showing both the default and long-context options in the model picker. Also removes the now-dead `freeLongContext` plumbing that the setting gated. Reverts: - #322950 - #323116 - #324650 - #328628 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Add context-size picker coverage for both surfaces Addresses PR review: cover the reverted "always show both context options" behavior for each independently implemented picker surface. - languageModelAccess.test.ts: a free/no-surcharge endpoint publishes both the default and full windows, with the smaller window as the default. - copilotCliModels.spec.ts: a CLI model with defaultContextMax < maxInputTokens and no long-context surcharge exposes both sizes, smaller as default. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Default to the longer window for free long-context models Keeps both context-size options in every picker, but when the long-context tier has no surcharge (free long context) the default selection — and the no-selection behavioral fallback — is the full window rather than the smaller default tier. Models with a long-context surcharge still default to the smaller tier so users opt into the extra cost. Applied consistently across all four surfaces: - Main chat picker: getContextSizeOptions default + applyContextSizeOverride fallback - Copilot CLI picker: buildConfigurationSchema default + resolveContextTier fallback - Agent host: _createContextSizeConfigSchemaProperty default + getCopilotContextTier via the restored freeLongContext flag (and hasLongContextSurcharge helper) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Shorten context-size comments Condense the free-long-context comments added across the picker surfaces to concise one-liners; no behavior change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Flips the defaults for two settings that have been baking behind an opt-in flag:
chat.agentHost.copilot.toolSearch.enabled→truegithub.copilot.chat.preferLongContext.enabled→trueWhy the diff touches more than two lines
Each setting's default lives in more than one place, and the pairs have to stay in sync:
Tool search
chat.shared.contribution.ts— the user-facing workbench setting registration.copilotCliConfig.ts— the agent-host schema default the renderer forwards the value into.Prefer long context
extensions/copilot/package.json— the contributed setting default.configurationService.ts—ConfigKey.PreferLongContext. The extension throws aBugIndicatingErrorat load time if the code default drifts frompackage.json, so these two must change together.agentHostSchema.ts— the forwardedpreferLongContextEnabledroot-config default, plus its description, which statedfalsewas the default.Note on schema defaults
getRootValuereturnsundefinedfor unset keys rather than falling back to the schemadefault, so the effective defaults come from the VS Code / extension setting registrations that the renderer forwards on startup. Thedefaultfields in the agent-host schemas are advertised metadata and were updated to match so the two don't disagree.Validation
vitestoncontextSizeOverride.spec.tsandchatSessionInitializer.spec.ts— 38 passed. This also exercises thepackage.json↔ code default-consistency assertion.tsc --noEmit -p src/tsconfig.json— no new errors (two pre-existing failures incopilotAgentSession.ts/copilotSystemNotification.tsfrom local SDK type drift are untouched by this change).