Repository navigation
Fix model picker search speed - #343005
Merged
Logan Ramos (lramos15) merged 2 commits intoOct 20, 2026
Merged
Logan Ramos (lramos15) merged 2 commits into
Logan Ramos (lramos15) merged 2 commits into
Conversation
Contributor
|
Base:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
Static review found no actionable defects, and focused regression tests cover resolution sharing and duplicate notifications; tests were not executed.
No open issues 🎉
What changed in this PR
Improves model picker search responsiveness by reducing repeated computation and redundant model updates.
Changes:
- Caches merged models, parsed visibility conditions, and picker-derived data.
- Shares queued provider resolutions and suppresses unchanged model notifications.
- Adds regression tests for resolution sharing and notification deduplication.
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/languageModels.test.ts | Tests queued resolution sharing. |
| src/vs/workbench/contrib/chat/test/browser/agentSessions/agentHostLanguageModelProvider.test.ts | Tests model notification deduplication. |
| src/vs/workbench/contrib/chat/common/languageModels.ts | Caches visibility expressions and shares queued resolutions. |
| src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerWidget.ts | Reuses model reads and skips hidden-picker refreshes. |
| src/vs/workbench/contrib/chat/browser/widget/input/modelPicker/modelPickerTabbedWidget.ts | Caches context-derived row data. |
| src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts | Caches merged models with input invalidation. |
| src/vs/workbench/contrib/chat/browser/agentSessions/agentHost/agentHostLanguageModelProvider.ts | Suppresses unchanged model updates. |
| src/vs/platform/agentHost/test/node/agentHostClientByokLmChannel.test.ts | Tests snapshot deduplication, including initial empty snapshots. |
| src/vs/platform/agentHost/common/agentHostClientByokLmChannel.ts | Suppresses duplicate model snapshots. |
Review effort: Balanced
ChatInputPart listened to onDidChangeLanguageModelVendors to invalidate its merged model list, which test and fixture mocks of ILanguageModelsService do not provide, so constructing the input threw "event is not a function". The listener is redundant: getAllMergedModels already re-merges when the set of contributed vendors differs from the one it merged for, and vendor removal fires onDidChangeLanguageModels. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Alexandru Dima (alexdima)
approved these changes
Oct 20, 2026
Logan Ramos (lramos15)
deleted the
lramos15/agents/model-picker-performance-investigation
branch
October 20, 2026 21:00
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.
Part of #342157