Skip to content

Enable persistent CoT for hidden models#320333

Merged
dileepyavan merged 1 commit into
mainfrom
DileepY/COT
Jun 8, 2026
Merged

Enable persistent CoT for hidden models#320333
dileepyavan merged 1 commit into
mainfrom
DileepY/COT

Conversation

@dileepyavan
Copy link
Copy Markdown
Member

Summary

  • add an experiment flag for persistent chain of thought in the Responses API
  • send reasoning.context: "all_turns" for hidden model M when enabled
  • cover initial, unsupported, disabled, and continued-response requests

Testing

  • node node_modules/vitest/vitest.mjs --run --pool=forks src/extension/test/node/configurations.spec.ts src/platform/endpoint/node/test/responsesApi.spec.ts

Copilot AI review requested due to automatic review settings June 7, 2026 22:24
@dileepyavan dileepyavan enabled auto-merge (squash) June 7, 2026 22:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@dileepyavan dileepyavan merged commit ffe4677 into main Jun 8, 2026
40 of 41 checks passed
@dileepyavan dileepyavan deleted the DileepY/COT branch June 8, 2026 15:45
@vs-code-engineering vs-code-engineering Bot added this to the 1.125.0 milestone Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants