Skip to content

Send abexp context#2452

Merged
lramos15 merged 2 commits intomainfrom
lramos15/decisive-wallaby
Dec 5, 2025
Merged

Send abexp context#2452
lramos15 merged 2 commits intomainfrom
lramos15/decisive-wallaby

Conversation

@lramos15
Copy link
Member

@lramos15 lramos15 commented Dec 5, 2025

No description provided.

Copilot AI review requested due to automatic review settings December 5, 2025 19:20
@lramos15 lramos15 enabled auto-merge December 5, 2025 19:20
@lramos15 lramos15 self-assigned this Dec 5, 2025
@vs-code-engineering vs-code-engineering bot added this to the November 2025 milestone Dec 5, 2025
Copy link
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 AB experiment context propagation to CAPI (Copilot API) requests by injecting the experiment assignment context as a custom HTTP header. When telemetry updates experiment assignments, the context is now stored in the CAPI client service and automatically included in all CAPI requests via the VScode-ABExpContext header.

  • Modified BaseTelemetryService to accept and store a reference to ICAPIClientService
  • Extended ICAPIClientService interface and implementation to store and inject AB experiment context
  • Updated experiment assignment logic to propagate context to CAPI client for header injection

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/platform/telemetry/common/baseTelemetryService.ts Added ICAPIClientService parameter to constructor and updated experiment assignment method to set abExpContext on the CAPI client service
src/platform/telemetry/vscode-node/telemetryServiceImpl.ts Updated super() call to pass capiClientService to base class constructor
src/platform/endpoint/common/capiClient.ts Extended interface and implementation to include abExpContext property and override makeRequest to inject the context as a custom header

private _disposables: IDisposable[] = [];
constructor(
protected readonly _tokenStore: ICopilotTokenStore,
private readonly _capiClientServiece: ICAPIClientService,
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

Spelling error in parameter name: _capiClientServiece should be _capiClientService (missing 'r' in "Service").

Suggested change
private readonly _capiClientServiece: ICAPIClientService,
private readonly _capiClientService: ICAPIClientService,

Copilot uses AI. Check for mistakes.
value += `;${assignment}`;
}
}
this._capiClientServiece.abExpContext = value;
Copy link

Copilot AI Dec 5, 2025

Choose a reason for hiding this comment

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

The same spelling error appears here. The variable name _capiClientServiece should be _capiClientService (missing 'r' in "Service").

Copilot uses AI. Check for mistakes.
@lramos15 lramos15 added this pull request to the merge queue Dec 5, 2025
Merged via the queue into main with commit 1a0f182 Dec 5, 2025
16 checks passed
@lramos15 lramos15 deleted the lramos15/decisive-wallaby branch December 5, 2025 21:14
lramos15 added a commit that referenced this pull request Dec 5, 2025
* Send abexp context

* Spelling
lramos15 added a commit that referenced this pull request Dec 5, 2025
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