ValyroUI Русская версия

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

PropTypeDefault
models *AIModel[]Options in menu order; without a value the first available one is selected.
valuestringSelected model id.
defaultValuestringInitial value when uncontrolled.
onValueChange(id: string) => voidCalled with the new value when it changes.
openbooleanControlled open; use with onOpenChange.
defaultOpenbooleanfalseInitial open when uncontrolled.
onOpenChange(open: boolean) => voidCalled with the new open when it changes.
searchablebooleanfalseAdds a filter field above the list.
placementPlacement'bottom-start'Preferred side and alignment of the menu; it flips when there's no room.
onUpgrade(model: AIModel) => voidMakes plan-locked (disabled) models actionable: choosing one calls this and closes the menu instead of selecting it.
inlinebooleanfalseRenders 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>.
localestringBCP 47 locale for context-window sizes; defaults to the ThemeProvider's.
labelsPartial<ModelSelectorLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Inline Suggestion · Next: Model Comparison · All AI chat and agents