Skip to content

Chat window model picker enhancements for multiple providers#314865

Draft
vritant24 wants to merge 3 commits intomainfrom
agents/chat-window-model-picker-enhancements
Draft

Chat window model picker enhancements for multiple providers#314865
vritant24 wants to merge 3 commits intomainfrom
agents/chat-window-model-picker-enhancements

Conversation

@vritant24
Copy link
Copy Markdown
Member

Groups models in the "Other Models" section by providers using titled separator headers.

Changes

  • Provider separator headers in "Other Models" (hidden when all models share one vendor)
  • Inline provider label next to model name in the promoted/recently-used section (only when multiple vendors exist)
  • Provider removed from right-side detail column to avoid duplication
  • Search/filter preserves vendor separator headers above matching results
  • Display names sourced from the language model provider API (e.g. "Anthropic", "Google") rather than raw metadata

Copilot AI review requested due to automatic review settings May 6, 2026 22:21
@vritant24 vritant24 self-assigned this May 6, 2026
Copy link
Copy Markdown
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

Enhances the chat model picker UX to better support multiple language model providers by grouping “Other Models” by vendor, optionally showing vendor labels inline for promoted items, and preserving provider grouping context during search/filtering.

Changes:

  • Add vendor display-name resolution and use it to group “Other Models” with titled vendor separators.
  • Show an inline vendor label for promoted items when multiple vendors exist, and suppress duplicate vendor info in the detail/description.
  • Update the generic ActionListWidget filtering behavior to keep labeled separators visible above matching results; add CSS + tests.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/input/chatModelPicker.ts Adds vendor display-name lookup, vendor-grouped “Other Models” separators, and inline vendor labels for promoted items.
src/vs/platform/actionWidget/browser/actionList.ts Adjusts filtering to preserve labeled separators above matching results; updates separator row height handling.
src/vs/platform/actionWidget/browser/actionWidget.css Styles titled separators (separators with non-empty labels).
src/vs/workbench/contrib/chat/browser/widget/media/chat.css Tweaks flex behavior so inline vendor labels fit beside promoted model titles.
src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts Updates/extends tests for vendor grouping, header omission for single vendor, and inline vendor label behavior.

Copilot's findings

Comments suppressed due to low confidence (1)

src/vs/workbench/contrib/chat/test/browser/widget/input/chatModelPicker.test.ts:468

  • The comment says vendors are "sorted alphabetically", but the implementation sorts copilot first and then alphabetically by display name for the rest. Updating the comment to match the actual ordering will prevent confusion (and makes it clearer why 'Copilot' is expected first here).
		// Vendors sorted alphabetically by display name
		assert.strictEqual(vendorSeparators[0].label, 'Copilot');
		assert.strictEqual(vendorSeparators[1].label, 'Other-vendor');
		// Models within each vendor group are sorted alphabetically
  • Files reviewed: 5/5 changed files
  • Comments generated: 5

Comment on lines 822 to 827
if (item.kind === ActionListItemKind.Separator) {
if (isFiltering) {
if (labeledSeparatorsToShow.has(item)) {
visible.push(item);
}
continue;
Comment on lines +783 to +801
for (let i = 0; i < this._allMenuItems.length; i++) {
const item = this._allMenuItems[i];
if (item.kind !== ActionListItemKind.Separator || !item.label) {
continue;
}
for (let j = i + 1; j < this._allMenuItems.length; j++) {
const next = this._allMenuItems[j];
if (next.kind === ActionListItemKind.Separator) {
break;
}
if (next.kind === ActionListItemKind.Action && !next.isSectionToggle && !next.showAlways) {
const label = (next.label ?? '').toLowerCase();
const descValue = typeof next.description === 'string' ? next.description : next.description?.value ?? '';
if (label.includes(filterLower) || descValue.toLowerCase().includes(filterLower)) {
labeledSeparatorsToShow.add(item);
break;
}
}
}
Comment on lines +142 to 147
description,
group: { title: '', icon: action.icon ?? ThemeIcon.fromId(action.checked ? Codicon.check.id : Codicon.blank.id) },
hideIcon: false,
section: action.section,
className: vendorLabel ? 'chat-model-recently-used' : undefined,
hover: hoverContent ? { content: hoverContent } : undefined,
Comment on lines +2077 to +2082
/* Recently used model items: show vendor label inline next to the model name. */
.action-widget .monaco-list-row.chat-model-recently-used .title {
flex: 0 1 auto;
}

.action-widget .monaco-list-row.chat-model-recently-used .description {
};

const stubLanguageModelsService = { getModelConfigurationActions: () => [], getModelConfiguration: () => undefined } as unknown as ILanguageModelsService;
const stubLanguageModelsService = { getModelConfigurationActions: () => [], getModelConfiguration: () => undefined, getVendors: () => [] } as unknown as ILanguageModelsService;
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.

2 participants