Prodular UI

Model picker

AIPro

Choose the model that runs a feature. Each option shows a provider glyph, a short descriptor, capabilities, context window and relative speed and cost.

npx prodular-ui add model-picker

Part of Prodular UI Pro. Preview and read the docs freely, install with a license. See pricing

In the composer toolbar

The compact trigger is a ghost button that fits next to the other tools, with the context window ring beside send.

26%

In a settings form

The full trigger shows the descriptor so people can compare without opening the list. Models outside the plan stay visible but disabled.

Runs on every new ticket. Pick a fast model.

Runs once a month on the full ledger.

Anatomy

<ModelPicker  models={models}  value={model}  onValueChange={setModel}  variant="compact"/>

Guidance

Use it when

  • Use the compact variant in a composer toolbar and the full variant in settings and forms.
  • Write descriptions as what the model is good for in your product, not marketing copy: Thinks longer for reconciliations and audits.
  • Group options with group when there are more than four, for example Recommended and All models.
  • Show models that are not on the person's plan as disabled with a tag, so they know they exist.

Avoid

  • Real provider logos. Use the monochrome letter glyph or pass a neutral icon in glyph.
  • Raw model ids as names. Show the human name and keep the id in value.
  • Listing more than eight models. Curate the list for the task.

Rules for AI agents

Published in llms-full.txt, the registry and the MCP server, so coding agents follow them when they build with this component.

  • Render ModelPicker controlled with value and onValueChange. Store and send the model id, never the display name.
  • Pass contextWindow in tokens, speed and cost as relative 1 to 3 values, and capabilities from vision, tools, reasoning, files, web. Leave a field out rather than guessing it.
  • In a composer use variant="compact" inside PromptInputTools. In a form use variant="full" with a visible label linked through id, or pass aria-label.
  • When the selected model changes, update anything that depends on it, such as ContextWindow max.
  • Do not use brand logos or brand colors for providers. Use ModelGlyph.

API

ModelPicker

PropTypeDefaultDescription
modelsModelOption[]id, name, provider, description, capabilities, contextWindow, speed, cost, group, tag, glyph, disabled.
value / onValueChangestring / (id: string) => voidThe selected model id.
variant"compact" | "full""compact"compact for toolbars, full for forms.
aria-labelstring"Model"Accessible name for the trigger.

ModelGlyph

PropTypeDefaultDescription
providerstringIts first letter becomes the mark.

ModelRating

PropTypeDefaultDescription
kind / value"speed" | "cost" / 1 | 2 | 3Three pips with an accessible word.

Installation

The Prodular UI CLI adds the source to components/ui with everything it depends on. In a project that already uses shadcn/ui, the shadcn CLI installs it from the Prodular registry too. See Installation for the first setup.

npx prodular-ui add model-picker# or, with the registry in components.jsonnpx shadcn@latest add @prodular/model-picker