Skip to content

Comments

Fix #296523#296530

Merged
sandy081 merged 1 commit intomainfrom
sandy081/scrawny-partridge
Feb 20, 2026
Merged

Fix #296523#296530
sandy081 merged 1 commit intomainfrom
sandy081/scrawny-partridge

Conversation

@sandy081
Copy link
Member

Fix #296523

Copilot AI review requested due to automatic review settings February 20, 2026 15:09
@sandy081 sandy081 enabled auto-merge (squash) February 20, 2026 15:09
@sandy081 sandy081 self-assigned this Feb 20, 2026
@vs-code-engineering vs-code-engineering bot added this to the February 2026 milestone Feb 20, 2026
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

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 exists boolean field to IModelControlEntry interface to indicate whether a model is available in the model cache
  • Updated model picker logic to only show unavailable models when !entry.exists is 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 exists field up-to-date
  • Updated all test cases to explicitly set the exists field 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

@sandy081 sandy081 merged commit da77744 into main Feb 20, 2026
22 checks passed
@sandy081 sandy081 deleted the sandy081/scrawny-partridge branch February 20, 2026 15:57
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.

Models appear with "Contact Admin" even though hidden

2 participants