Add explicit Responses API prompt caching - #336967
Merged
Dileep Yavanmandha (dileepyavan) merged 6 commits intoSep 21, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Dileep Yavanmandha (dileepyavan)
September 21, 2026 04:36
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Continuation renders can misclassify and eventually discard the global-context prefix anchor.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds explicit prompt-cache breakpoint placement for supported Responses API models.
Changes:
- Retains two stable prefix anchors and the latest 20 conversation boundaries.
- Prevents cache markers from mutating opaque content.
- Expands unit and integration coverage.
| File | Description |
|---|---|
extensions/copilot/src/platform/endpoint/node/test/responsesApi.spec.ts |
Tests opaque-content isolation. |
extensions/copilot/src/platform/endpoint/node/responsesApi.ts |
Clones opaque content before annotation. |
extensions/copilot/src/platform/configuration/common/configurationService.ts |
Clarifies the experimental setting. |
extensions/copilot/src/extension/prompts/node/agent/test/agentPrompt.spec.tsx |
Tests rendered-history boundaries. |
extensions/copilot/src/extension/intents/node/test/cacheBreakpoints.spec.ts |
Covers breakpoint placement and serialization. |
extensions/copilot/src/extension/intents/node/cacheBreakpoints.ts |
Implements bounded Responses cache anchors. |
extensions/copilot/package.nls.json |
Updates the user-facing setting description. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+116
to
+120
| while (messages[leadingEnd]?.role === Raw.ChatRole.System || messages[leadingEnd]?.role === Raw.ChatRole.User) { | ||
| if (messages[leadingEnd].role === Raw.ChatRole.User) { | ||
| firstConversationIndex = leadingEnd; | ||
| } | ||
| leadingEnd++; |
Contributor
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Dileep Yavanmandha (dileepyavan)
marked this pull request as ready for review
September 21, 2026 05:09
Dileep Yavanmandha (dileepyavan)
enabled auto-merge (squash)
September 21, 2026 05:10
Giuseppe Cianci (Giuspepe)
approved these changes
Sep 21, 2026
Dileep Yavanmandha (dileepyavan)
deleted the
DileepY/promptCaching_updated
branch
September 21, 2026 07:07
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
Testing