009
A model menu that helps you choose: hover a model to compare speed, quality and cost, turn on thinking to set the effort, and watch latency and price count to their new values, inline or from a pill trigger.
akamodel picker·llm
Run this in any project set up for the shadcn CLI. It copies the Model Switcher source into your components folder, so the code is yours to change.
npx shadcn@latest add https://devl.dev/r/model-switcher.jsonImport it and render it. Every prop has a typed default, so it works straight away, and you pass your own data when you’re ready.
import { ModelSwitcherPanel } from "@/components/model-switcher";
export default function Page() {
return <ModelSwitcherPanel />;
}A free React component in the Conversation collection, written in TypeScript with Tailwind CSS on coss ui. MIT licensed.
Read from the Model Switcher source. Everything is optional unless it says required.
| Prop | Type | Default |
|---|---|---|
| models | SwitcherModel[] | defaultModels |
| value | ModelSwitcherValue | — |
| defaultValue | Partial<ModelSwitcherValue> | — |
| onValueChange | (value: ModelSwitcherValue) => void | — |
| className | string | — |