Feature Description
Add fuzzy search/filtering to the model picker in both the WebUI dashboard (ModelPickerDialog) and the TUI (modelPicker.tsx).
Currently:
- WebUI (
web/src/components/ModelPickerDialog.tsx): Has a search bar but uses exact substring matching (String.includes()). Typing g4o will NOT match gpt-4o.
- TUI (
ui-tui/src/components/modelPicker.tsx): Has no search at all — only arrow-key up/down navigation through provider and model lists.
Motivation
With 100+ models across 15+ providers, finding a specific model is painful:
- WebUI: Users must type exact substrings. Searching
sonnet works, but son4 or clad snnt do not.
- TUI: Users must scroll through potentially long lists with arrow keys — no way to jump or filter at all.
This is especially frustrating when switching models frequently (e.g., comparing outputs across providers).
Proposed Solution
WebUI (ModelPickerDialog.tsx)
- Replace the current
String.includes() filtering with a fuzzy matching library (e.g., fuse.js or a lightweight inline scorer).
- Rank results by match quality — exact matches first, then fuzzy matches by score.
- Highlight matched characters in the results so users see why a model matched.
TUI (modelPicker.tsx)
- Add a filter/search input to the model selection stage (similar to how
key stage already has text input).
- Typing characters filters the model list in real-time with fuzzy matching.
- Arrow keys navigate the filtered list; Enter selects.
- Backspace removes filter characters; Esc clears filter or goes back.
Suggested libraries
- WebUI:
fuse.js (already common in React apps, ~6KB gzipped) or cmdk/fzy.js for lighter weight
- TUI: A minimal JS fuzzy scorer (can be a ~30-line utility, no external dep needed)
Alternatives Considered
- Prefix-only matching — simpler but still misses cases like
4o → gpt-4o.
- Regex search — powerful but hostile to casual users who just want to type partial names.
- Server-side filtering — overkill; the model list is already loaded client-side.
Feature Description
Add fuzzy search/filtering to the model picker in both the WebUI dashboard (
ModelPickerDialog) and the TUI (modelPicker.tsx).Currently:
web/src/components/ModelPickerDialog.tsx): Has a search bar but uses exact substring matching (String.includes()). Typingg4owill NOT matchgpt-4o.ui-tui/src/components/modelPicker.tsx): Has no search at all — only arrow-key up/down navigation through provider and model lists.Motivation
With 100+ models across 15+ providers, finding a specific model is painful:
sonnetworks, butson4orclad snntdo not.This is especially frustrating when switching models frequently (e.g., comparing outputs across providers).
Proposed Solution
WebUI (
ModelPickerDialog.tsx)String.includes()filtering with a fuzzy matching library (e.g.,fuse.jsor a lightweight inline scorer).TUI (
modelPicker.tsx)keystage already has text input).Suggested libraries
fuse.js(already common in React apps, ~6KB gzipped) orcmdk/fzy.jsfor lighter weightAlternatives Considered
4o→gpt-4o.