Feature request: search/filter in the /model picker
Problem
/model in the Codex CLI TUI opens a picker listing every available model,
but there's no way to filter it. As the model catalog grows, finding a
specific model means scrolling through the full list manually.
Proposed solution
Add a search input to the /model picker: typing filters the list in real
time by partial, case-insensitive model name match. Existing keyboard
navigation (arrows, Enter, Esc) stays the same.
This wouldn't require new infrastructure — the TUI's ListSelectionView
component already supports searchable pickers (used today by the branch
picker, commit picker, theme picker, and plugin catalog), so this would be
wiring existing behavior into the model popups rather than building
something new.
Why
Faster model discovery as the catalog grows, and brings /model in line
with the search UX already present in other pickers in the app.
1 Comment
I've already put together an implementation for this — it wires the existing
ListSelectionViewsearch infrastructure (the same used by the branch/commit/theme/plugin pickers) into both
/modelpopups (open_model_popup_with_presetsand
open_all_models_popup). No changes toListSelectionViewitself or anyconfig/schema surface — just search_value/is_searchable wiring plus explicit
initial-selection handling so the current model stays highlighted.
Covered by 7 new unit tests (empty query, partial match, case-insensitivity,
no-matches, backspace-restore, enter-select, and a regression test ensuring
the "All models" row survives a model-shaped search query) plus a new
snapshot test, all passing locally alongside the existing suite.
One UX trade-off: enabling search means the existing "press 2 to jump-select
the 2nd item" number-key shortcut goes away on these two popups, since digit
keys now feed the search box instead — same trade-off every other searchable
picker in the app already makes.
Happy to open a PR if this approach looks right to you.
Screenshots / Demo
https://github.com/user-attachments/assets/98ef4eb3-21c4-4c1f-bda8-68ca82660d38