Skip to content

avoid infinite recursion from missing model#302557

Open
amunger wants to merge 1 commit intomainfrom
aamunger/remoteModelResolution
Open

avoid infinite recursion from missing model#302557
amunger wants to merge 1 commit intomainfrom
aamunger/remoteModelResolution

Conversation

@amunger
Copy link
Collaborator

@amunger amunger commented Mar 17, 2026

Copilot AI review requested due to automatic review settings March 17, 2026 21:02
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

Fixes a hang/infinite recursion scenario in the extension host language model selection flow when the main thread returns model identifiers that are missing from the extension host’s local model cache (notably in Remote-SSH scenarios, per #302532).

Changes:

  • Add a resolveIfMissing parameter to getLanguageModelByIdentifier to control whether it should trigger a re-resolve via selectLanguageModels.
  • Prevent re-entrant resolution loops by disabling “resolve-if-missing” when selectLanguageModels is already in progress.
  • Improve logging for the “model missing from local cache” case without re-triggering model selection.

You can also share your feedback on Copilot code review. Take the survey.

@amunger amunger requested a review from sandy081 March 18, 2026 01:32
@amunger amunger marked this pull request as ready for review March 18, 2026 01:32
@vs-code-engineering vs-code-engineering bot added this to the 1.113.0 milestone Mar 18, 2026
@amunger amunger enabled auto-merge (squash) March 18, 2026 02:38
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.

BYOK models registered via lm.addLanguageModelsProviderGroup are not usable from Remote-SSH extension host

2 participants