Model Selector
AI model picker. Pro · AI chat and agents › Prompts and models
Installation
npx valyro-cli@latest login
npx valyro-cli@latest add model-selector
npm install valyro-ui-pro
import 'valyro-ui-pro/styles.css';
import { ModelSelector } from 'valyro-ui-pro';
Props
| Prop | Type | Default | |
|---|---|---|---|
models * | AIModel[] | Options in menu order; without a value the first available one is selected. | |
value | string | Selected model id. | |
defaultValue | string | Initial value when uncontrolled. | |
onValueChange | (id: string) => void | Called with the new value when it changes. | |
open | boolean | Controlled open; use with onOpenChange. | |
defaultOpen | boolean | false | Initial open when uncontrolled. |
onOpenChange | (open: boolean) => void | Called with the new open when it changes. | |
searchable | boolean | false | Adds a filter field above the list. |
placement | Placement | 'bottom-start' | Preferred side and alignment of the menu; it flips when there's no room. |
onUpgrade | (model: AIModel) => void | Makes plan-locked (disabled) models actionable: choosing one calls this and closes the menu instead of selecting it. | |
inline | boolean | false | Renders the list in the page flow, without the trigger and popover: a default-model setting or an always-open picker. className, style, ref and the rest props then go to the list's container <div>. |
locale | string | BCP 47 locale for context-window sizes; defaults to the ThemeProvider's. | |
labels | Partial<ModelSelectorLabels> | Overrides for the built-in English text; keys left out keep their defaults. |
Related components
- Prompt Composer — Prompt field with attachments
- Inline Suggestion — Inline autocomplete suggestion
- Model Comparison — Side-by-side answers from several models
- Prompt Library — Prompt library with variables
- AI Chat Window — AI chat window
- Chat Message — Messages with streaming output
- Message Branches — Message versions and a conversation branch tree
- Streaming Text — Smooth token streaming
- Markdown Preview — Rendered Markdown
- Response Feedback — Answer rating and a rubric for reviewers
- Chain of Thought — Model reasoning steps
- Tool Call — Tool call with approval
Previous: Inline Suggestion · Next: Model Comparison · All AI chat and agents