This repository was archived by the owner on May 20, 2026. It is now read-only.
api: support requestInitiator as undefined in LanguageModelAccess - #4119
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the extension’s proposed VS Code typings and request handling to support the upstream API change where requestInitiator can be undefined for editor-initiated language model requests (previously communicated as the "core" string).
Changes:
- Updates
ProvideLanguageModelChatResponseOptions.requestInitiatortostring | undefined. - Adjusts
CopilotLanguageModelWrapperto acceptextensionId: string | undefinedand treat editor-initiated requests asundefined(including normalizing legacy"core"). - Guards blocked-extension logic and request metadata/header behavior to handle
undefinedinitiators.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/extension/vscode.proposed.chatProvider.d.ts | Updates proposed API typings for requestInitiator to allow undefined. |
| src/extension/conversation/vscode-node/languageModelAccess.ts | Propagates undefined initiator through LM wrapper logic; replaces "core" checks with undefined-aware logic and guards blocked-extension handling. |
Logan Ramos (lramos15)
previously approved these changes
Mar 2, 2026
Aligns with the vscode.proposed.chatProvider API change where requestInitiator is now 'string | undefined' instead of just 'string'. The change represents that 'core' (editor-initiated requests) are now communicated as undefined rather than the 'core' string. - Updates CopilotLanguageModelWrapper to accept extensionId as 'string | undefined' in both _provideLanguageModelResponse and provideLanguageModelResponse methods - Changes comparisons from 'extensionId === "core"' to '!extensionId' to handle the new undefined case - Updates blocked extension check to guard against undefined extensionId - Updates telemetry to keep extensionId as undefined internally - Brings vscode.proposed.chatProvider.d.ts to version 5 Relates to microsoft/vscode#298767 (Commit message generated by Copilot)
Connor Peet (connor4312)
force-pushed
the
connor4312/290436-prep
branch
from
March 2, 2026 23:33
9d2ef96 to
1303c37
Compare
Michael Lively (Yoyokrazy)
approved these changes
Mar 2, 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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
api: support requestInitiator as undefined in LanguageModelAccess
Aligns with the vscode.proposed.chatProvider API change where requestInitiator
is now 'string | undefined' instead of just 'string'. The change represents that
'core' (editor-initiated requests) are now communicated as undefined rather than
the 'core' string.
in both _provideLanguageModelResponse and provideLanguageModelResponse methods
to handle the new undefined case
Relates to microsoft/vscode#298767
(Commit message generated by Copilot)