Preserve model attribution for cached inline edits#325704
Merged
Merged
Conversation
Preserve model attribution on cached inline edit results without copying request-specific telemetry. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 79a2259b-1b96-461c-969d-95ddb965f75d
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves model attribution when inline edits are served from cache while leaving request-specific telemetry unset.
Changes:
- Stores model name/configuration on cached edits and no-edit entries.
- Restores attribution for regular, rebased, speculative, and cross-file cache hits.
- Adds focused regression coverage.
Show a summary per file
| File | Description |
|---|---|
statelessNextEditProvider.ts |
Extracts the reusable model telemetry interface. |
nextEditProvider.ts |
Captures and restores cached model attribution. |
nextEditCache.ts |
Stores attribution on cache entries. |
nextEditProviderTelemetry.ts |
Emits cached model fields. |
nextEditProviderCaching.spec.ts |
Tests regular, no-edit, and cross-file hits. |
nextEditProviderSpeculative.spec.ts |
Tests speculative cache attribution. |
nextEditCacheRebase.spec.ts |
Tests attribution through rebasing. |
nextEditCacheCursorDistance.spec.ts |
Updates cache fixtures for required attribution. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Medium
Contributor
|
This PR will be automatically cherry-picked to |
kycutler
approved these changes
Jul 13, 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.
Patch-based inline edit cache hits currently report
isFromCache = truewithoutmodelNameormodelConfig. This makes telemetry filtered by prompting strategy appear to have zero patch-model cache hits even though the cache is working.This change stores only model attribution on cache entries and restores it when emitting cache-hit telemetry. Request-specific prompt, response, latency, usage, and other stateless provider metrics remain unset. The coverage includes regular, subsequent/rebased, speculative, cross-file, and cached no-edit results.
Testing: