* Add Responses API cache control markers
* Refactoring code
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Gate Responses API cache breakpoints by model support
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Update @github/copilot and @github/copilot-sdk to version 1.0.67 and 1.0.5-preview.1 respectively
- Updated package.json and package-lock.json in both root and remote directories to reflect the new versions of @github/copilot and @github/copilot-sdk.
- Modified copilotSessionLauncher.ts to include new hooks in the Copilot session configuration.
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* utils: document binarySearch
* nes-datagen: generate training data from continuous recordings
Continuous enhanced telemetry now ships sliding-window recordings that, unlike per-request alternative-action recordings, carry no requestTime. The datagen pipeline needs a point to split each recording into edit history before/after, so this adds a pluggable pivot strategy (starting with Random, selectable via --pivot-strategy) and a new continuous/ pipeline module that replays a recording at the chosen pivot to produce a processed row.
Along the way this consolidates the pipeline's error and index handling: a shared WithRowIndex<T> replaces the ad-hoc { originalRowIndex, ... } pairs, per-record processing returns Result<IProcessedRow, Error> instead of field-presence unions, and failures surface as original Error objects (no string round-tripping). The telemetry sender's continuous payload is now the documented IContinuousRecording type.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* nes-datagen: label alt-action replay errors by originalRowIndex
Address PR review: the alternative-action path mislabeled diagnostics when
earlier records failed to parse.
- processAllRows: push replay errors with the row's true `originalRowIndex`
instead of its position in the filtered `rows` array (parse failures make
`rows` sparse, so the two diverge).
- loadAndProduceProcessedRows: resolve `languageForRow` via an
`originalRowIndex`-keyed Map rather than positional `rows[i]`, matching how
callers pass `e.originalRowIndex`.
- Clarify the `recordCount` doc: it counts successfully-parsed records (parse
failures are counted separately in `parseErrors`).
- Add a regression spec asserting replay errors carry the row index, not the
array position.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
* Update @github/copilot and related dependencies to version 1.0.66-2
- Bumped @github/copilot to version 1.0.66-2 in package.json and package-lock.json.
- Updated optional dependencies for various platforms to match the new version.
- Adjusted @github/copilot-sdk to version 1.0.5-preview.0.
- Enhanced filtering logic in copilotCLITools.ts to include additional attachment types.
* Enhance attachment rendering in CopilotCLISession with additional GitHub attachment types
* Remove optional suppressResumeEvent property from ICopilotResumeSessionLaunchPlan interface
---------
Co-authored-by: Anthony Kim <62267334+anthonykim1@users.noreply.github.com>
* Make Copilot sanity tests mint their own token instead of using static copilot-token
The Copilot sanity tests resolve their Copilot token via
getOrCreateTestingCopilotTokenManager, which prefers VSCODE_COPILOT_CHAT_TOKEN
(set here from the `copilot-token` Key Vault secret) over GITHUB_OAUTH_TOKEN.
`copilot-token` holds a pre-minted Copilot token that is refreshed out-of-band
by a separate scheduled pipeline. When that refresher broke (the GitHub OAuth
secret it reads was rotated/removed during a security incident), `copilot-token`
silently went stale and expired. The static token manager hands the expired
token to CAPI `/models`, which returns 401, leaving no resolved model and
surfacing the misleading "server did not mark a chat fallback model" error.
Drop the static `copilot-token` so the tests fall through to GITHUB_OAUTH_TOKEN
(`capi-oauth-pipeline-token`) and exchange it for a fresh Copilot token on
demand. This path self-refreshes and removes the dependency on the external
refresher.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Re-enable sanity tests and surface model-fetch error
- Re-enable the three Copilot sanity tests that were temporarily skipped in
#323684 now that token resolution is fixed.
- Surface the underlying model-fetch error (e.g. an expired-token 401) from
ModelMetadataFetcher resolve methods instead of the misleading
"server did not mark a chat fallback model" message.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Omit reasoning summary instead of sending invalid 'off' value
#323639 disabled Responses API reasoning summaries by hard-coding
`reasoning.summary = 'off'`, but the Responses API only accepts
'concise', 'detailed', or 'auto' (or omitting the field to disable).
Models such as gpt-5.3-codex reject 'off' with HTTP 400
invalid_request_body, which surfaced as failing Copilot sanity tests
once they could reach the model.
Set summary to undefined so the field is omitted (summaries stay
disabled, as intended) and update the unit test accordingly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Decouple reasoning-preserve test from disabled summary
The "should preserve reasoning object when thinking is supported" test
relied on the reasoning summary always being present to keep
body.reasoning defined. Now that the summary is omitted, give the test
model reasoning_effort support so body.reasoning is populated via effort,
which is what the test actually means to verify.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* signing commit
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Rename capi-oauth secret to capi-oauth-pipeline-token
The capi-oauth Key Vault secret value leaked. Rename the secret
reference to capi-oauth-pipeline-token so that revoking the old
capi-oauth secret cuts off access for any other harness still
pointing at the old name. The new name is also more descriptive of
its purpose (CAPI OAuth token used in the automation pipeline).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Add Responses API cache control markers
* Refactoring code
* Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
* Gate Responses API cache breakpoints by model support
* Disable Responses API reasoning summaries
* reverting cache commits
* Remove Responses API cache breakpoint handling
---------
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
chat: disable semantic_search on BYOK/custom endpoints
The semantic_search (codebase) tool relies on embeddings that require a
Copilot token source. On BYOK / custom (non-CAPI) endpoints those embeddings
are unavailable, and when the GitHub authentication provider is disabled the
embeddings lookup times out waiting for the provider and aborts the entire
chat turn instead of degrading gracefully.
Gate semantic_search off for non-CAPI endpoints alongside the specialized
subagents so it is never offered (even if manually enabled via the tool
picker) when it cannot work. Add tests covering the CAPI and BYOK cases.
Fixes#322525
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Prevents regressions where model-configured sampling values are lost before endpoint request construction.
- Verifies omission and precedence behavior because providers may reject generated defaults even when they accept explicit request values.
- Covers Chat Completions, Responses, and Messages so every supported custom endpoint API remains compatible.
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Allows custom endpoint models to replace Copilot sampling defaults so providers with fixed parameter requirements can accept requests.
- Supports explicit parameter omission, which lets model servers apply required defaults instead of receiving incompatible generated values.
- Preserves explicit per-request options and applies the same behavior across Chat Completions, Responses, and Messages APIs.
Fixes#321514
(Commit message generated by Copilot)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: bump electron@42.4.0
* chore: apply temp dir workaround for short paths
* chore: use 24.15.x for CI node
* chore: update nodejs build
* chore: bump electron@42.5.0
* fix: unblock playwright install on node 24.17
Node 24.16+ made Readable pause()/resume() a no-op on destroyed streams
which makes yauzl 2.x / extract-zip 2.x and older playwright extraction
hang forever.
- extensions/copilot: add "yauzl": "^3.3.1" override (was missed by #318682)
so electron and @vscode/vsce no longer resolve the broken yauzl 2.10, fixing the
hung `npm ci` in the Copilot and Extract chat-lib pipelines.
- extensions/copilot: bump electron ^39.8.5 -> ^42.5.0 so its install
script uses the native @electron-internal/extract-zip instead of extract-zip.
- bump @playwright/test ^1.56.1 -> ^1.61.1 so `playwright install`
uses the fixed extractor, unblocking the "Download Electron and
Playwright" step in all electron test pipelines.
* chore: update build
* agentHost: fix macOS sandbox smoke sentinel parsing
On macOS CI, the AgentHost sandbox smoke test resolves the shell to
/bin/sh, which uses the sentinel-based completion path. In that path, the
parser could consume the echoed sentinel command text
(`<<<COPILOT_SENTINEL_..._EXIT_$?>>>`) before the real numeric marker
arrived, causing a false `Exit code: -1` failure even though the command
later completed successfully.
Harden the sentinel parser to ignore echoed/non-numeric sentinel text
and use the latest complete numeric marker instead. Also force the
macOS AgentHost sandbox smoke test to use /bin/sh and assert that in the
suite log so local runs exercise the same path as CI.
Adds a regression test for echoed sentinel command text.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: update screenshot baseline after playwright bump
* chore: bump distro
* chore: fix typecheck
* chore: bump distro
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* NES: cache cross-file suggestions under the active document
When the model returns a Next Edit Suggestion for a document other than
the one being edited (cross-file NES), it was only cached under the target
document, so it could not be re-served until the user navigated there.
Also cache an `activeDoc (content + edit window) -> edit-in-target`
association so the suggestion can be re-served from cache while the cursor
is still in the active document.
A cross-file entry is served only while its target document is open and
byte-identical to the snapshot the edit's offsets index into; otherwise the
read path treats it as a cache miss and refetches, rather than serving a
misplaced edit or getting stuck re-serving a dead entry until the active
document changes. At stream end the active document is no longer cached as
"no edit" when a cross-file entry was just stored under the same key, which
would otherwise clobber it.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Dispose provider and documents in runCrossFileScenario
Tear down the NextEditProvider (which registers autoruns/watchers on
openDocuments) and both documents at the end of each cross-file scenario
run so the tests are self-contained and do not accumulate observers.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Records the runtime spike: the headless agent host resolves OTel from env only and
doesn't self-fetch managed telemetry, but build_resource reads OTEL_SERVICE_NAME /
OTEL_RESOURCE_ATTRIBUTES env. Revised plan delivers serviceName + resourceAttributes
to both surfaces (env for the host, programmatic for the extension) and headers to the
extension only; agent-host headers stay deferred (env would leak the token to tool
subprocesses).