Skip to content

feat(web): richer model picker with always-on search and capability metadata - #550

Open
tt-a1i wants to merge 1 commit into
mainfrom
codex/web-model-picker-rich
Open

tt-a1i wants to merge 1 commit into
mainfrom
codex/web-model-picker-rich

Conversation

@tt-a1i

@tt-a1i tt-a1i commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Problem

The Web workbench's composer model picker only offered a search box when the snapshot catalog was truncated, and each row was a single bare identity line. With many configured models there was no way to filter the loaded list, narrow by provider, or tell models apart by capability (context window, reasoning, image input) — unlike denser pickers such as Kimi Code's model dialog.

Value

Faster, more confident model selection in the browser: instant client-side filtering for the common case, provider chips for quick scoping, and per-model capability metadata so same-named or similar models are distinguishable without memorizing IDs.

Approach

  • ModelPicker keeps the existing ComplexSelector shell, server-side search (debounced, byte/count-bounded) for truncated catalogs, and option-level keyboard navigation; the search input is now always rendered and filters the loaded snapshot client-side when the catalog is complete (no server round-trip).
  • Provider filter chips appear when more than one provider is present; chip state resets with the search on close.
  • WebModelSummary gains optional contextWindow / reasoning / imageInput, projected by a shared projectModelSummary in pi-runtime (fields omitted when the source model lacks them, keeping the projection byte-identical for partial sources); snapshot bounding and the search endpoint inherit the fields via existing spreads.
  • Option rows keep the full modelIdentity label as the accessible name; the metadata line is aria-hidden so existing name-based queries and screen-reader output stay unchanged.
  • A pinned footer shows ↑↓/Enter/Esc hints; the options list is now the only scrolling region so search, chips, and hints stay visible. ArrowDown from the search input focuses the first option.
  • New i18n keys (en/zh): allProviders, modelMetaReasoning, modelMetaImageInput, modelPickerHints.

Validation

  • bun run check — green (config contract, discipline, web build, biome format+lint, tsc).
  • bun run test — green; includes new tests/web/model-picker-utils.test.ts (filter/chips/ctx formatting/meta parts), new tests/web/model-picker.spec.ts (client filter without server calls, chips, metadata, selection, input→option focus), and a pi-runtime test for metadata projection.
  • bun run test:web:e2e — 34/34, including the updated keyboard flow (search input focused on open, ArrowDown into options).
  • Manual smoke on a local workbench with a stubbed 6-model snapshot: screenshots verified search filtering, chips, metadata lines, and the pinned hints footer in the zh locale.

Impact

  • User-visible behavior: model picker gains always-on search, provider chips, capability metadata, and a hints footer; opening the picker now focuses the search input instead of the first option.
  • Model-visible context/tools: none.
  • Runtime/lifecycle: none; server-side model search path unchanged.
  • Persisted config/data: none.
  • Compatibility/risk: WebModelSummary gains optional fields only; older runtimes simply omit them and the picker renders identity-only rows. web/dist rebuilt and included per repo convention.

…etadata

The composer model picker now always shows a search box that filters the
loaded catalog client-side (server-side search still covers truncated
catalogs), adds provider filter chips, and renders a metadata line per
model (context window, reasoning, image input) projected from the Pi
model definition. A pinned footer documents the keyboard controls, and
ArrowDown moves from the search input into the option list.
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.

1 participant