← Back to PRs

#7020: feat: add search/filter to model selection in configure wizard

by GuoxiangZu open 2026-02-02 09:14 View on GitHub →
commands
When there are many models (>15), users can now type a search query to filter models by provider, id, name, or alias before selecting. This makes it much easier to find specific models without scrolling through a long list. ## Changes - Added search prompt in `promptDefaultModel()` for single model selection - Added search prompt in `promptModelAllowlist()` for multi-select model allowlist - Search matches against provider, model id, name, and aliases - If no matches found, shows all models again with a note ## Why Previously, users had to scroll through potentially hundreds of models one by one when running `openclaw configure`. This was especially painful with providers like OpenRouter that have 100+ models. ## How it works When there are more than 15 models to choose from, the wizard now shows a text prompt first: ``` Search models (127 available, type to filter by name, provider, or alias) > claude ``` Then only matching models are shown in the select list. <!-- greptile_comment --> <h2>Greptile Overview</h2> <h3>Greptile Summary</h3> This PR adds a “search before select” flow to the configure wizard’s model selection paths, prompting the user for a query when the available model list is large and then filtering models by provider/id/name/aliases before showing the select/multiselect list. The changes are localized to the CLI wizard model picker (`src/commands/model-picker.ts`) plus a small addition to the prompter type definitions (`src/wizard/prompts.ts`). The intent is to improve usability when providers expose many models (e.g., 100+), reducing scrolling in `openclaw configure`. <h3>Confidence Score: 2/5</h3> - This PR is not safe to merge as-is due to a TypeScript redeclaration error in the allowlist prompt logic. - The new search/filter logic in `promptModelAllowlist` introduces a duplicate `filteredCatalog` declaration that should fail compilation and also makes part of the search logic ineffective. The other notes are lower-severity maintainability/UX concerns. - src/commands/model-picker.ts (promptModelAllowlist variable redeclaration and duplicated search logic) <!-- greptile_other_comments_section --> <sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub> **Context used:** - Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8)) - Context from `dashboard` - AGENTS.md ([source](https://app.greptile.com/review/custom-context?memory=0d0c8278-ef8e-4d6c-ab21-f5527e322f13)) <!-- /greptile_comment -->

Most Similar PRs