* 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:
- https://github.com/microsoft/vscode/pull/322950
- https://github.com/microsoft/vscode/pull/323116
- https://github.com/microsoft/vscode/pull/324650
- https://github.com/microsoft/vscode/pull/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>
Forward adaptive and budget-based thinking capabilities from custom model
configuration into endpoint metadata. Preserve the per-request thinking flag
across the extension-contributed language model boundary so Messages requests
can activate the configured mode.
Refs #330712
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Revert "Revert new TAS endpoint changes (#330175)"
This reverts commit f30e3f3600.
* Re-land new TAS assignments endpoint with proxy-aware transport + tas-call telemetry
* bump remote + remote/web to tas-client 0.4.3
* Add tests and feedback update
* Revert "New TAS assignments endpoint updates (lifecycle, readiness, disposal) (#329736)"
This reverts commit c780ea9613.
* Revert "Add new exp TAS assignments endpoint (/api/v1/assignments) alongside legacy TAS (#329653)"
This reverts commit 58dc612992.
* Fix lockfile: add MIT license fields to reverted tas-client entries
* Agent Host changes for osortega/agents/remove-all-the-code-for-backend-v1-of
* Preserve pending cloud tasks until workspace opens
Only consume cross-window task deep links after Git reports the matching repository, preventing the source window from clearing shared pending state.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Migrate cloud session state from pull request URIs
PR-backed cloud tasks are listed under a stable /task/<id> resource and report the /<prNumber> URI they were previously listed under, so archived, pinned and read state migrates forward instead of being orphaned.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove extension-host Claude implementation
Make Agent Host the sole Claude sessions implementation and remove the obsolete provider preference settings, extension runtime, SDK dependency, commands, tests, and integration glue.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Remove extension-host Claude smoke tests
Delete smoke cases and commands that target the removed extension-host Claude implementation.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix Agent Host Claude permissions link
Keep the Claude-specific permission documentation link for Agent Host Claude after removing the extension-host implementation.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the SDK at the first version that supports thinking levels and avoid the unapproved install script introduced by newer releases.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
* Agent Host changes for osortega/agents/checkout-contribution-check-v2-backend
* Address review feedback and fix chat input fixtures
Require non-empty owner/name before building a pull request URI, so
metadata with empty strings no longer yields `https://github.com///pull/42`
and is no longer reported as an available pull request. Cover the case in
the unit test.
Implement `getSession` on the fixture `IAgentSessionsService` stub. The
chat input session toolbar reads it when a session has file changes, which
broke the chatInput FileChanges fixtures.
Condense the context key and chat input comments, and correct the cloud
sessions comment: the guard is reachable whenever `chatSessionPullRequest`
is unknown, not just on older clients.
* chat: enable agent host defaults
Flip the Agent Host migration settings to their rolled-out defaults and enable remote Agent Host support for web clients attached to a remote extension host. Serverless web retains extension-host fallbacks. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: cover web agent host disablement
Add web-remote coverage for configuration and AI disablement, and clarify the serverless web requirement in the setting description. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* test: pin smoke session providers
Pre-seed extension-host smoke profiles before startup and update Agent Host picker labels so the suites exercise their intended providers after the default flip. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chat: restore agent host setting description
Keep the existing concise setting and policy description while retaining the runtime availability behavior. (Written by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reverts the effects of #316114, which routed conversation-history compaction
to a dedicated `trajectory-compaction` CAPI model behind
`chat.conversationCompaction.usePrismCompaction`. A plain `git revert`
conflicted and would have clobbered fixes that landed on top (#322255,
#321980, #325905), so the prism branches are removed surgically and the
production paths are left as they were.
`backgroundSummarizer.ts` and the `endpointProviderImpl` family resolution
are intentionally kept: both were extracted by #316114 but are now used by
the production path and by later commits.
Also fixes three compaction bugs:
- Foreground `/compact` stored the model's raw response, including the
`<analysis>` scratchpad the summarization prompt asks for, as the summary.
It now unwraps via `extractSummary` like the background path, falling back
to the raw text when the model omits the tags. Fixes#321200.
- Compaction requests left `ignoreStatefulMarker` unset, which resolves to
true on `ChatEndpoint` but false on `OpenAIEndpoint`, so BYOK Responses
endpoints sent `previous_response_id` and had history sliced against a
continuation the compaction prompt is not part of. Now set explicitly.
Fixes#323554.
- "Compact Conversation" discarded the user's unsent draft and attachments.
Adds an opt-in `preserveInput` submit option meaning "the input box is not
the source of this request": the draft is kept and its attachments are
omitted from the request. Applied to both the agent-host action and the
non-agent-host `github.copilot.chat.compact` path, which went through
`chat.open` and overwrote the draft via `setInput` before submitting.
Fixes#314664.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add experimental setting to disable semantic_search tool
Adds github.copilot.chat.semanticSearchTool.disabled (experiment-based,
default false) to gate the semantic_search (codebase) agent tool out of
getEnabledTools, so we can experiment with whether the tool is worth keeping.
* Also hide #codebase chat variable when semantic search is disabled
Adds a when clause to the copilot_searchCodebase tool so the #codebase
chat variable is hidden when github.copilot.chat.semanticSearchTool.disabled
is set, and updates the setting description to match. Addresses PR review
feedback about the description/behavior mismatch.
* Add Claude Opus 5 system prompt
Adds a minimal Opus 5 prompt behind `chat.claudeOpus5Prompt.enabled`,
following Anthropic's guidance for the Claude 5 generation: describe the
environment as facts rather than rules, put the behavioral weight into
scope and correction guidance, and drop the rule lists the model now
handles with its own judgement. Off by default, falling back to the
Claude 4.6 Opus prompt.
Also:
- Remove the Opus 4.8 and Sonnet 5 prompts and their settings. Both
models now use the Claude 4.6 prompts.
- Add comment-etiquette guidance to the shared optimized reminder, so it
reaches every Claude 4.6+ family rather than a single prompt.
- Enable tool search for claude-opus-5.
* Reword Opus 5 prompt to remove borrowed phrasing
The prompt had picked up wording from a reference system prompt during
drafting. Rewrites every affected passage in original wording, keeping
the guidance intact. Verified no shared word sequence of five or more
remains between the branch's added lines and that reference.
* Forward CAPI assignment context to VS Code core telemetry
Add a proposed API scode.env.setTelemetryExperimentProperty that
allows trusted built-in extensions to set experiment properties on
VS Code's core telemetry pipeline.
The Copilot extension uses this to forward capi.assignmentcontext
(received via X-Copilot-Experiment and x-copilot-api-exp-assignment-context
response headers from CAPI) so that it appears on all VS Code telemetry
events, not just the Copilot extension's own events.
Flow:
1. CAPI responds with experiment headers
2. Copilot extension extracts them into serverExperiments
3. TelemetryService.setSharedProperty('capi.assignmentcontext', value)
4. Override forwards to vscode.env.setTelemetryExperimentProperty()
5. MainThreadTelemetry calls ITelemetryService.setExperimentProperty()
6. Property appears on all subsequent VS Code telemetry events
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: resolve CI failures - eslint and Copilot typecheck
- Remove 'VS Code' from proposed API JSDoc (eslint vscode-dts-vscode-in-comments rule)
- Use type assertion for proposed API call in Copilot extension to avoid
TS2339 since the extension's tsconfig doesn't include proposed .d.ts files
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* fix: replace 'as any' with typed Record cast for eslint compliance
- Use Record<string, unknown> instead of 'as any' to satisfy no-explicit-any
- Narrow API JSDoc to per-window scope (matching existing TAS pattern)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Few updates
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Vijay Upadya <41652029+vijayupadya@users.noreply.github.com>
The useMessagesApi branch of OpenAIEndpoint.createRequestBody never called
_applyReasoningEffort, so a custom endpoint declaring supportsReasoningEffort
never received the selected effort. Forward it like the Responses and Chat
Completions branches, and add a 'messages' reasoningEffortFormat that writes
the Anthropic Messages shape output_config.effort (the default on /messages,
overridable via reasoningEffortFormat). The scrub merges into output_config
instead of replacing it so sibling fields (e.g. structured output format)
survive.
Fixes#325121
Gates the collapse-to-long-context-only behavior behind the new
github.copilot.chat.preferLongContext.enabled setting (default off), so
models with a free long context window (e.g. Claude) show both the default
and long context options again. Covers the main chat picker, CLI picker, and
the Agents window.
Fixes#323936
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add ClaudeSonnet5Prompt (Sonnet 4.6 base + scope/interface/effort append) via new renderAppendedInstructions hook, gated behind chat.claudeSonnet5Prompt.enabled
- Rename Claude 4.7 Opus prompt/config to 4.8, add completionDiscipline, plan/explain restraint, tool triggering and terminal run-once guidance; gated behind chat.claude48OpusPrompt.enabled
- Opus 4.7 now falls through to the generic optimized Opus prompt
- Clamp maxOutputTokens to the context window and maxInputTokens to the
remaining budget in resolveModelTokenLimits so limits stay consistent
- Require either maxInputTokens or contextWindow via anyOf in the custom
model schemas (customoai, customendpoint, azure)
- Update OpenRouter spec header to describe the fixed behavior
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
chore: update @github/copilot and @github/copilot-sdk to latest versions
- Bump @github/copilot from ^1.0.67 to ^1.0.69-0 in package.json and package-lock.json.
- Update @github/copilot-sdk from ^1.0.5 to ^1.0.6-preview.1 in package.json and package-lock.json.
- Refactor copilotcliSessionService.ts to use the new AutoModeSessionManager directly, removing compatibility fallback.
- Remove compatibility tests for AutoModeSessionManager in copilotCliSessionService.spec.ts.
- Adjust npm configuration in remote/.npmrc.