Enable persistent CoT for hidden models#320333
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an experiment-gated configuration to enable persistent reasoning context (“persistent CoT”) for the Responses API, and wires it so that eligible hidden model family M requests send reasoning.context: 'all_turns' (including for continued-response requests).
Changes:
- Introduces an experiment-based setting
github.copilot.chat.responsesApi.persistentCoT.enabled. - Extends the Responses API request body creation to include
reasoning.context: 'all_turns'when the experiment is enabled and the endpoint is a hidden model M family. - Adds unit tests covering enabled/disabled/unsupported and continued-response behavior.
Show a summary per file
| File | Description |
|---|---|
| extensions/copilot/src/platform/networking/common/networking.ts | Extends IEndpointBody.reasoning typing to include context for Responses API requests. |
| extensions/copilot/src/platform/endpoint/node/test/responsesApi.spec.ts | Adds tests validating reasoning.context behavior for initial and continued Responses API requests. |
| extensions/copilot/src/platform/endpoint/node/responsesApi.ts | Adds experiment-gated logic to send reasoning.context: 'all_turns' for hidden model M endpoints. |
| extensions/copilot/src/platform/configuration/common/configurationService.ts | Registers the new experiment-based config key chat.responsesApi.persistentCoT.enabled. |
| extensions/copilot/package.nls.json | Adds localized description string for the new setting. |
| extensions/copilot/package.json | Exposes the new configuration property github.copilot.chat.responsesApi.persistentCoT.enabled in the extension manifest. |
Copilot's findings
- Files reviewed: 6/6 changed files
- Comments generated: 0
roblourens
approved these changes
Jun 8, 2026
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.
Summary
reasoning.context: "all_turns"for hidden model M when enabledTesting
node node_modules/vitest/vitest.mjs --run --pool=forks src/extension/test/node/configurations.spec.ts src/platform/endpoint/node/test/responsesApi.spec.ts