Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #296523 where models that were configured to be hidden still appeared in the model picker UI with "Contact Admin" warnings. The fix adds an exists field to the IModelControlEntry interface to track whether a model from the control manifest actually exists in the local model cache, preventing hidden models from being displayed.
Changes:
- Added
existsboolean field toIModelControlEntryinterface to indicate whether a model is available in the model cache - Updated model picker logic to only show unavailable models when
!entry.existsis true, filtering out models that don't exist in the cache - Implemented dynamic refresh of the control manifest when the model cache changes to keep the
existsfield up-to-date - Updated all test cases to explicitly set the
existsfield for consistency
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/common/languageModels.ts | Adds exists field to IModelControlEntry interface, implements _modelExistsInCache() helper method, stores raw control response, adds _refreshModelsControlManifest() to dynamically update exists field, and registers listener to refresh manifest when models change |
| src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts | Updates model picker logic to check !entry.exists before showing unavailable models in promoted and featured sections |
| src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts | Updates all test cases to explicitly set exists: true for available models and exists: false for missing/unavailable models |
lszomoru
approved these changes
Feb 20, 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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #296523