Model Picker
NEWA searchable AI model selector that adapts from a desktop popover to a mobile bottom sheet.
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/model-picker
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| models | AIModel[] | — | Models to display, optionally grouped by provider. |
| value | string | — | Selected model ID for controlled usage. |
| defaultValue | string | — | Initial model ID for uncontrolled usage. |
| onChange | (id: string, model: AIModel) => void | — | Called when a model is selected. |
| variant | "pill" | "field" | "pill" | Compact composer chip or full-width labeled field. |
| searchable | boolean | "auto" | "auto" | Whether to show search; auto enables it for more than six models. |
| footer | ReactNode | — | Optional content displayed beneath the model list. |
| disabled | boolean | false | Disables opening the picker. |