Skip to content

Fix language model event issues#319097

Merged
dmitrivMS merged 3 commits into
mainfrom
dev/dmitriv/selectChatModels-remote-fix
May 30, 2026
Merged

Fix language model event issues#319097
dmitrivMS merged 3 commits into
mainfrom
dev/dmitriv/selectChatModels-remote-fix

Conversation

@dmitrivMS

@dmitrivMS dmitrivMS commented May 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #318753
Fixes #318749 (recursion, not unsupported scenario)
Fixes https://github.com/microsoft/vscode-copilot-evaluation/issues/4075

Copilot AI review requested due to automatic review settings May 30, 2026 03:42
@dmitrivMS dmitrivMS self-assigned this May 30, 2026

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

This PR updates ExtHostLanguageModels to avoid recursive model resolution when resolving language models whose identifiers are known but whose metadata is not present in the current extension host cache.

Changes:

  • Replaces the retry path in getLanguageModelByIdentifier with a direct main-thread $selectChatModels call.
  • Extracts LanguageModelChat API object creation into _createLanguageModelChatApi.
  • Updates selectLanguageModels to create API objects directly and filter missing local entries.
Show a summary per file
File Description
src/vs/workbench/api/common/extHostLanguageModels.ts Refactors language model lookup/API object creation and changes selection behavior for models missing from the local ext-host cache.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 2

Comment thread src/vs/workbench/api/common/extHostLanguageModels.ts
Comment thread src/vs/workbench/api/common/extHostLanguageModels.ts
Co-authored-by: Copilot <copilot@github.com>
@dmitrivMS dmitrivMS changed the title Fix language models issues Fix language model event issues May 30, 2026
@dmitrivMS dmitrivMS requested a review from Copilot May 30, 2026 04:10

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.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new

@dmitrivMS dmitrivMS marked this pull request as ready for review May 30, 2026 04:36
@dmitrivMS dmitrivMS merged commit ca62bf6 into main May 30, 2026
42 checks passed
@dmitrivMS dmitrivMS deleted the dev/dmitriv/selectChatModels-remote-fix branch May 30, 2026 08:00
@vs-code-engineering vs-code-engineering Bot added this to the 1.123.0 milestone May 30, 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

3 participants