Skip to content

agentHost: correlate model message telemetry by client request - #327681

Merged
zhichli merged 1 commit into
mainfrom
fix/agent-host-message-text-client-request-id
Jul 27, 2026
Merged

agentHost: correlate model message telemetry by client request#327681
zhichli merged 1 commit into
mainfrom
fix/agent-host-message-text-client-request-id

Conversation

@zhichli

@zhichli zhichli commented Jul 27, 2026

Copy link
Copy Markdown
Member

Use the SDK clientRequestId for model-source conversation.messageText.headerRequestId, matching the legacy extension's client-minted x-request-id. User-source rows remain turn-correlated by conversationId + turnIndex; consumers support that shape.

Related to microsoft/vscode-internalbacklog#8247.

Testing

  • npm run gulp compile
  • node test/unit/node/index.js --run src/vs/platform/agentHost/test/node/copilotAgentSession.test.ts (244 passing)

Copilot AI review requested due to automatic review settings July 27, 2026 18:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Correlates model-message telemetry using the SDK’s client request ID.

Changes:

  • Replaces service request IDs with client request IDs.
  • Updates telemetry documentation and unit expectations.
Show a summary per file
File Description
copilotAgentSession.ts Forwards clientRequestId to model telemetry.
agentHostTelemetryReporter.ts Renames and documents the correlation parameter.
agentHostTelemetryReporter.test.ts Updates expected request ID values.

Review details

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread src/vs/platform/agentHost/node/copilot/copilotAgentSession.ts Outdated
@zhichli
zhichli force-pushed the fix/agent-host-message-text-client-request-id branch from 8fc7d29 to f65509b Compare July 27, 2026 18:46
@zhichli
zhichli enabled auto-merge July 27, 2026 18:48
roblourens
roblourens previously approved these changes Jul 27, 2026
@zhichli
zhichli force-pushed the fix/agent-host-message-text-client-request-id branch from f65509b to 947f30a Compare July 27, 2026 20:07
@zhichli
zhichli merged commit 2a645a7 into main Jul 27, 2026
29 checks passed
@zhichli
zhichli deleted the fix/agent-host-message-text-client-request-id branch July 27, 2026 20:35
@vs-code-engineering vs-code-engineering Bot added this to the 1.132.0 milestone Jul 27, 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.

4 participants