Skip to content

core is not a valid extension identifier #290436

Closed as not planned
Closed as not planned

Description

Somehow/someone ended up with an antipattern of using new ExtensionIdentifier('core') which is bad because

  • core is NOT an extension
  • the ExtensionIdentifier types is NOT mean to be instantiated directly (capture below)

IMO the correct fix here is to allow sendChatRequest to be called without an extension identifier

src/vs/workbench/contrib/chat/browser/chatEditing/chatEditingExplanationModelManager.ts
  295, 55: _languageModelsService.sendChatRequest(

src/vs/workbench/contrib/chat/browser/widget/chatContentParts/chatThinkingContentPart.ts
  661, 54: languageModelsService.sendChatRequest(

src/vs/workbench/contrib/chat/test/common/languageModels.ts
  68, 2: 	sendChatRequest(identifier: string, from: ExtensionIdentifier, messages: IChatMessage[], options: { [name: string]: any }, token: CancellationToken): Promise<ILanguageModelChatResponse> {

src/vs/workbench/contrib/mcp/common/mcpSamplingService.ts
  84, 54: _languageModelsService.sendChatRequest(model, new ExtensionIdentifier('core'), messages, {}, token);

src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/monitoring/outputMonitor.ts
  404, 54: _languageModelsService.sendChatRequest(
  476, 54: _languageModelsService.sendChatRequest(model, new ExtensionIdentifier('core'), [{ role: ChatMessageRole.User, content: [{ type: 'text', value: promptText }] }], {}, token);

Image

Activity

  1. connor4312 commented on Jan 26, 2026

    @connor4312
    Member

    This is #250018, but if I recall there was not a ton of enthusiasm around the idea. I can revive it (/have opus redo the PR 😛)

  2. jrieken commented on Jan 26, 2026

    @jrieken
    ContributorAuthor

    I stick to #250018 (comment) - let's start with allowing undefined adjust the extension accordingly and then see what to about MCP

  3. connor4312 commented on Jan 26, 2026

    @connor4312
    Member

    Putting that PR on next milestone to revisit

  4. mjbvz commented on Mar 17, 2026

    @mjbvz
    Contributor

    Moving to 1.113 since this doesn't seem like a candidate from a quick review. Please move it back if this is not correct

  5. modified the milestones: 1.112.0, on Mar 17, 2026
  6. modified the milestones: , 1.114.0 on Mar 23, 2026
  7. removed this from the 1.114.0 milestone on Mar 30, 2026
  8. vs-code-engineering commented on Nov 12, 2026

    @vs-code-engineering
    Contributor

    Thanks for the context. This was addressed in 5b46a79: sendChatRequest now accepts undefined for the extension identifier, and the internal callers listed here no longer construct ExtensionIdentifier('core'). The fix shipped in 1.111.0.

    This issue was closed automatically: the fix shipped in 1.111.0, proposed by the VS Code sweeper and confirmed by an independent second review. It is closed as "not planned" rather than "completed" only because a "completed" close would put this already-shipped fix back into the current milestone's verification queue. If it still reproduces on 1.111.0 or later, reply here or reopen the issue and a maintainer will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debt

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions