Captain UI

Model picker

Point at a model and the same answer streams at that model's own speed, with what one task costs on it. You feel fast and slow instead of reading a spec table.

npx shadcn@latest add https://captain-ui.vercel.app/r/model-picker.json
Balanced

0.0 s to answer$0.072 per review

Usage

import { ModelPicker } from "@/components/ui/model-picker"

<ModelPicker
  models={[{ id: "fast", name: "Fast", tps: 160, ttft: 250, input: 0.8, output: 4 }]}
  sample="Store event.id before charging and return 200 if you have seen it."
  task={{ label: "review", input: 18000, output: 1200 }}
/>

Props

PropTypeDefaultWhat it does
models{ id; name; tps; ttft; input; output }[]tps is output tokens a second, ttft the wait for the first token in ms, input and output are $ per million tokens.
samplestringThe answer every model streams, so only the speed differs.
task{ label: string; input: number; output: number }The job the cost is quoted for, in tokens, e.g. one review.
valuestringControlled model id.
defaultValuestringmodels[0].idInitial model when uncontrolled.
onValueChange(id: string) => voidCalled when a model is picked.

Keyboard

↑ ↓
Move between models; the preview follows focus
Enter / Space
Pick the focused model

Accessibility

  • role=listbox with role=option and aria-selected; arrows move focus, Enter picks.
  • The preview is linked to each option with aria-describedby, and is not a live region, so it never talks over the user.
  • Reduced motion shows the whole answer at once, with the time it would take.