Attribute chat edits to resolved Auto tiers - #336757
Shivi Purwaha (spurwaha) wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Quota fallback can leave stale Auto-tier metadata and misattribute utility-model edits.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds invisible Auto-tier metadata so chat edits are attributed to the resolved routing tier across queues, reroutes, caching, and persistence.
Changes:
- Adds and transports the proposed Auto-tier progress part.
- Snapshots tier metadata per edit batch.
- Subdivides edit telemetry by validated tier while preserving source caps.
| File | Description |
|---|---|
src/vscode-dts/vscode.proposed.chatParticipantAdditions.d.ts |
Declares the proposed tier progress part. |
src/vs/workbench/contrib/editTelemetry/test/browser/editSourceTrackingImpl.test.ts |
Tests tier aggregation and caps. |
src/vs/workbench/contrib/editTelemetry/browser/telemetry/editSourceTrackingImpl.ts |
Groups and reports tier telemetry. |
src/vs/workbench/contrib/editTelemetry/browser/telemetry/arcTelemetrySender.ts |
Excludes tiers from cleaned ARC keys. |
src/vs/workbench/contrib/chat/test/common/model/chatModel.test.ts |
Tests tier snapshots and persistence. |
src/vs/workbench/contrib/chat/test/browser/chatEditing/chatEditingService.test.ts |
Tests queued edit attribution. |
src/vs/workbench/contrib/chat/common/model/chatSessionOperationLog.ts |
Persists tier and notebook metadata changes. |
src/vs/workbench/contrib/chat/common/model/chatModel.ts |
Stores tiers and per-batch snapshots. |
src/vs/workbench/contrib/chat/common/editing/chatEditingService.ts |
Extends streaming edit contracts. |
src/vs/workbench/contrib/chat/common/chatService/chatService.ts |
Defines the internal tier progress type. |
src/vs/workbench/contrib/chat/browser/chatEditing/notebook/chatEditingNotebookCellEntry.ts |
Forwards cell edit metadata. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingTextModelChangeService.ts |
Creates tier-aware edit sources. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingSession.ts |
Preserves metadata through edit queues. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingServiceImpl.ts |
Matches snapshots to edit batches. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedNotebookEntry.ts |
Propagates notebook metadata. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedFileEntry.ts |
Extends the edit-entry API. |
src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingModifiedDocumentEntry.ts |
Propagates document metadata. |
src/vs/workbench/api/test/common/extHostTypeConverters.test.ts |
Tests tier conversion. |
src/vs/workbench/api/test/common/extHostChatAgents2.test.ts |
Tests progress stream ordering. |
src/vs/workbench/api/common/extHostTypes.ts |
Implements the extension-host part. |
src/vs/workbench/api/common/extHostTypeConverters.ts |
Converts tier progress DTOs. |
src/vs/workbench/api/common/extHostChatAgents2.ts |
Accepts and reports tier parts. |
src/vs/workbench/api/common/extHost.api.impl.ts |
Exposes the proposed API class. |
src/vs/platform/telemetry/common/editTelemetry.ts |
Adds classified tier telemetry. |
src/vs/editor/test/common/model/textModelEditSource.test.ts |
Tests tier validation and keys. |
src/vs/editor/common/textModelEditSource.ts |
Adds validated tier source metadata. |
extensions/copilot/src/vscodeTypes.ts |
Re-exports the proposed part. |
extensions/copilot/src/util/common/test/shims/vscodeTypesShim.ts |
Registers the test shim. |
extensions/copilot/src/util/common/test/shims/chatTypes.ts |
Implements the shimmed part. |
extensions/copilot/src/platform/endpoint/node/test/automodeService.spec.ts |
Tests tier resolution scenarios. |
extensions/copilot/src/platform/endpoint/node/automodeService.ts |
Emits request-scoped resolved tiers. |
extensions/copilot/src/extension/test/node/services.ts |
Updates the test service stub. |
extensions/copilot/src/extension/conversation/vscode-node/chatParticipants.ts |
Connects routing events to response streams. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| ? reportAutoModeRouting(request, stream, this.automodeService) | ||
| : Disposable.None; | ||
| // Tier attribution is needed even when the routing row is hidden. | ||
| const autoRouting = reportAutoModeRouting(request, stream, this.automodeService, request.location2 === undefined && !isAutoExplainabilityHidden(this.experimentationService)); |
|
Shivi Purwaha (@spurwaha) please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|

Adds typed, non-rendering progress and per-edit-batch snapshots so chat edit attribution uses the client-resolved Auto tier, including defaults, overrides, cache hits, and reroutes. Attribution remains tied to the originating request through async queues and restored history. Unknown, failed, older-producer, and non-Auto cases remain unset. No visible UI changes.
Adds optional
autoTierdetail metadata to prevent mixed-tier aggregation while preserving existing model IDs, source predicates, and pre-tier top-10/30 source coverage. Each selected source expands to at most five known or unknown tier rows.Validation: 261 focused core tests and 76 extension routing tests passed, plus core and extension typechecks, API declaration checks, and changed-file ESLint. The full-diff comment pass found no changes, and upstream main matches the base.