Skip to content

Conversation

@lambertjosh
Copy link
Contributor

This PR splits out the model list into two sections, a recommended section and the rest. We already sorted this so that recommended models appeared at the top, but other than the ordering there was no hint. This makes it more clear what we recommend folks to use and what should work well.

@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

🦋 Changeset detected

Latest commit: 5e8812a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
kilo-code Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 7, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR adds section headers ("Recommended models" and "All models") to model selection dropdowns. The implementation is clean and well-tested.

Key Changes:

  • Added new DropdownOptionType.LABEL for section headers in select-dropdown.tsx
  • Refactored usePreferredModels.ts to useGroupedModelIds returning { preferredModelIds, restModelIds }
  • Updated ModelSelector.tsx and ModelPicker.tsx to use sectioned options
  • Added translations for all 21 locales

Code Quality:

  • ✅ Proper handling of edge cases (missing selected model, empty sections)
  • ✅ Labels excluded from search but included in filtered results
  • ✅ Empty labels (with no items after them) are properly removed
  • ✅ Good test coverage for the new functionality
Files Reviewed (26 files)
  • .changeset/model-picker-sections.md - changeset
  • webview-ui/src/components/kilocode/chat/ModelSelector.tsx - main implementation
  • webview-ui/src/components/kilocode/chat/__tests__/ModelSelector.spec.tsx - tests
  • webview-ui/src/components/settings/ModelPicker.tsx - settings implementation
  • webview-ui/src/components/ui/select-dropdown.tsx - LABEL type support
  • webview-ui/src/components/ui/__tests__/select-dropdown.spec.tsx - tests
  • webview-ui/src/components/ui/hooks/kilocode/usePreferredModels.ts - hook refactor
  • webview-ui/src/components/ui/hooks/kilocode/__tests__/usePreferredModels.spec.ts - tests
  • 21 locale files with new translation keys

@lambertjosh
Copy link
Contributor Author

Session view:

image

Settings view:

image

@lambertjosh
Copy link
Contributor Author

Note I am not seeing any models in the CLI, please hold.

@lambertjosh lambertjosh force-pushed the jl-recommended-models-section branch from 34499a3 to 9619a57 Compare January 7, 2026 21:18
@lambertjosh
Copy link
Contributor Author

Note I am not seeing any models in the CLI, please hold.

Nevermind, rebasing fixed the issue I was seeing with the CLI. It's working fine and these changes are anyway localized to the webview.

Copy link
Contributor

@hassoncs hassoncs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! It's kind of annoying that we have two extremely similar yet different implementations of this dropdown that you had to update 😅

maybe remove those component tests, but otherwise approved!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably just leave these tests out– they aren't checking anything useful

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think I removed the section you were referring to.

if (option.type === DropdownOptionType.LABEL) {
return (
<div
key={`section-${index}`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#nit

Suggested change
key={`section-${index}`}
key={`label-${index}`}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed!

export interface GroupedModelIds {
preferredModelIds: string[]
restModelIds: string[]
hasPreferred: boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need hasPreferred here? Could we just check to see if the preferredModelIds array is empty or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, I dithered on removing it and sure enough it is cleaner, thanks for the suggestion!

@lambertjosh
Copy link
Contributor Author

@hassoncs - I think I addressed your feedback, can you do another pass?

Copy link
Contributor

@hassoncs hassoncs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for updating it! :D

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.

3 participants