Model picker
Select an AI model and capability-aware reasoning or search settings in a quiet pill or searchable catalog panel.
import { ModelPicker } from '@uthereal/ui/model-picker'Model picker playground
The flagship for complex coding, long agent runs and careful analysis. Effort sets how long it thinks.
- Context
- 1M tokens
- Input
- $4.00
- Output
- $20.00
- Effort
- Medium
Prices per million tokens
Overview
ModelPicker presents a host model catalog in two layouts that share one schema and one atomic selection state (model, thinking, effort, and webSearch):
pill(default): A compact pill trigger showing the provider mark, current model name, and reasoning effort. Opening the menu lists featured models with one-line blurbs, an Effort submenu for reasoning models, and More models grouped by provider. Below640px, submenus open as in-menu pages with a Back row and spring height. EnableshowSummaryto display a review card with description, context window, token prices, effort, and change confirmation underneath the pill.panel: A full catalog popover with optional search filtering (searchable), concrete model androuterentries, host-supplied 0–5 relative score bars (showMetricsandmetricColumns), capability-aware Thinking, Effort, and Web search controls (showSettings), and per-setting latency and cost readouts (showEstimates).
Choosing a model or changing settings reconciles unsupported capabilities automatically (reconcileModelValue) and snaps reasoning effort to the nearest level the chosen model accepts (effortFor). The component never starts inference or mutates remote billing.
Usage
Composer pill
Omit models to render the illustrative sample lineup, or supply your own catalog and featured IDs.
'use client'
import { useState } from 'react'
import { ModelPicker, type ModelPickerValue } from '@uthereal/ui/model-picker'
export function ComposerModelPicker() {
const [value, setValue] = useState<ModelPickerValue>({
model: 'claude-opus-5-5',
thinking: true,
effort: 'medium',
webSearch: true,
})
return (
<ModelPicker
value={value}
onValueChange={setValue}
featured={['claude-opus-5-5', 'claude-sonnet-5-5', 'gpt-6-1-sol']}
showSummary
/>
)
}Searchable catalog panel
Switch to layout="panel" when users need to search a larger catalog, compare host metrics, or adjust thinking and web search settings inline.
'use client'
import { ModelPicker } from '@uthereal/ui/model-picker'
export function CatalogModelPicker() {
return (
<ModelPicker
layout="panel"
label="Choose model"
searchable
showMetrics
showSettings
showEstimates
defaultModel="balanced"
models={[
{
id: 'auto',
label: 'Auto',
kind: 'router',
blurb: 'Picks the best model per message',
},
{
id: 'balanced',
label: 'Balanced',
provider: 'Example AI',
blurb: 'Everyday coding and agents',
thinking: true,
webSearch: true,
efforts: ['low', 'medium', 'high'],
speed: 4,
quality: 4,
cost: 2,
estimates: [
{ thinking: false, webSearch: false, latencyMs: 900, cost: 0.002 },
{
thinking: true,
effort: 'medium',
webSearch: false,
latencyMs: 2400,
cost: 0.006,
},
],
},
]}
/>
)
}Examples
Use <SchemaPlayground /> above to inspect the pill trigger with summary card and switch layout to panel.
Router, host metrics, and estimates
Combine layout="panel", search, an Auto router (kind="router"), relative speed/quality/cost bars, and exact host-supplied setting estimates. Hovering or focusing a model previews its estimate without changing the selection.
Layouts and reasoning efforts
| Layout | Best for | Key props |
|---|---|---|
pill | Composer toolbars, compact headers, settings with a review | featured, providers, showSummary, triggerLabel |
panel | Model catalogs, API playgrounds, capability configuration | searchable, showSettings, showMetrics, metricColumns, showEstimates |
| Effort | Label | Description |
|---|---|---|
low | Low | Quickest answers |
medium | Medium | Balanced speed and depth |
high | High | Thinks longer |
xhigh | Extra high | Thinks much longer |
max | Max | Deepest thinking, slowest |
Only models with a non-empty efforts array show effort controls. When switching models, an unsupported effort snaps to the nearest supported level in MODEL_EFFORTS order and fires onEffortChange. Setting showSettings, showMetrics, or showEstimates to false changes presentation only; selection reconciliation still runs and hidden estimates suppress estimate announcements.
API reference
These serializable arguments and defaults come directly from the component schema.
| Argument | Type / default | Description |
|---|---|---|
layout | pill | panelDefault: "pill" | Quiet pill with featured models and submenus (`pill`), or full searchable catalog panel (`panel`). |
label | stringDefault: "Model" | Accessible name for the model menu and radio groups. |
triggerLabel | string— | Custom trigger text; defaults to the currently selected model name. |
providers | ModelProvider[]— | Providers in the order More models groups them; a model without its own mark inherits its provider mark. |
models | ModelOption[]Default: [{"id":"claude-fable-5-1","label":"Claude Fable 5.1","kind":"model","provider":"anthropic","brand":"claude","color":"#D97757","blurb":"Most capable, for the hardest work","description":"The most capable widely released model. Thinking is always on, for the hardest research, coding and agent work.","tag":"Most capable","disabled":false,"thinking":true,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":128000,"price":{"input":10,"output":50},"released":"2026-09-01","efforts":["low","medium","high","xhigh","max"],"defaultEffort":"high","speed":2,"quality":5,"cost":5,"estimates":[]},{"id":"claude-opus-5-5","label":"Claude Opus 5.5","kind":"model","provider":"anthropic","brand":"claude","color":"#D97757","blurb":"Complex coding, agents and analysis","description":"The flagship for complex coding, long agent runs and careful analysis. Effort sets how long it thinks.","tag":"Recommended","disabled":false,"thinking":true,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":128000,"price":{"input":4,"output":20},"released":"2026-09-22","efforts":["low","medium","high","xhigh","max"],"defaultEffort":"medium","speed":3,"quality":5,"cost":4,"estimates":[]},{"id":"claude-sonnet-5-5","label":"Claude Sonnet 5.5","kind":"model","provider":"anthropic","brand":"claude","color":"#D97757","blurb":"Smart and efficient for everyday work","description":"Everyday coding and agents at a lower price, with strong tool use across a full million-token context.","disabled":false,"thinking":true,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":128000,"price":{"input":2,"output":10},"released":"2026-09-28","efforts":["low","medium","high","xhigh","max"],"defaultEffort":"high","speed":4,"quality":4,"cost":3,"estimates":[]},{"id":"claude-haiku-5-5","label":"Claude Haiku 5.5","kind":"model","provider":"anthropic","brand":"claude","color":"#D97757","blurb":"Fastest, for quick answers","description":"The fastest and cheapest option, for high-volume work, subagents and quick replies.","tag":"Fast","disabled":false,"thinking":true,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":128000,"price":{"input":0.1,"output":0.5},"released":"2026-10-07","efforts":["low","medium","high","xhigh","max"],"defaultEffort":"medium","speed":5,"quality":3,"cost":1,"estimates":[]},{"id":"gpt-6-1-sol","label":"GPT-6.1 Sol","kind":"model","provider":"openai","blurb":"General reasoning across text and images","description":"A general reasoning model for coding, analysis and multimodal work, tuned for long tool loops.","disabled":false,"thinking":true,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":128000,"price":{"input":5,"output":30},"released":"2026-09-29","efforts":["low","medium","high"],"defaultEffort":"medium","speed":3,"quality":5,"cost":4,"estimates":[]},{"id":"gpt-6-luna","label":"GPT-6 Luna","kind":"model","provider":"openai","blurb":"Small and quick for simple tasks","description":"A small, quick model for classification, extraction and chat that has to feel instant.","tag":"Fast","disabled":false,"thinking":false,"webSearch":true,"contextTokens":400000,"maxOutputTokens":64000,"price":{"input":0.4,"output":2},"released":"2026-09-22","efforts":[],"speed":5,"quality":3,"cost":1,"estimates":[]},{"id":"gemini-4-argon","label":"Gemini 4 Argon","kind":"model","provider":"google","blurb":"Long context, reads whole repositories","description":"A long-context reasoning model that reads whole repositories, videos and document sets in one pass.","disabled":false,"thinking":true,"webSearch":true,"contextTokens":2000000,"maxOutputTokens":64000,"price":{"input":3.5,"output":21},"released":"2026-09-30","efforts":["low","medium","high"],"defaultEffort":"medium","speed":3,"quality":4,"cost":3,"estimates":[]},{"id":"grok-4-7","label":"Grok 4.7","kind":"model","provider":"xai","brand":"grok","blurb":"Reasoning with live search","description":"A reasoning model with live search tools, for research and fast-moving topics.","disabled":false,"thinking":true,"webSearch":true,"contextTokens":512000,"maxOutputTokens":64000,"price":{"input":3,"output":15},"released":"2026-09-21","efforts":["low","medium","high"],"defaultEffort":"medium","speed":4,"quality":4,"cost":3,"estimates":[]},{"id":"mistral-large-4","label":"Mistral Large 4","kind":"model","provider":"mistral","blurb":"Multilingual generalist","description":"A strong multilingual generalist for European languages, documents and agents.","disabled":false,"thinking":false,"webSearch":true,"contextTokens":256000,"maxOutputTokens":32000,"price":{"input":1.5,"output":6},"released":"2026-10-06","efforts":[],"speed":4,"quality":4,"cost":2,"estimates":[]},{"id":"deepseek-v4-1-flash","label":"DeepSeek V4.1 Flash","kind":"model","provider":"deepseek","blurb":"Low cost, with open weights","description":"A low-cost reasoning model you can also run on your own hardware.","tag":"Open weights","disabled":false,"thinking":true,"webSearch":false,"contextTokens":256000,"maxOutputTokens":32000,"price":{"input":0.14,"output":0.56},"released":"2026-09-10","efforts":["low","medium","high"],"defaultEffort":"medium","speed":4,"quality":4,"cost":1,"estimates":[]},{"id":"muse-spark-1-3","label":"Muse Spark 1.3","kind":"model","provider":"meta","blurb":"Everyday chat and images","description":"A multimodal assistant model for chat, images and everyday writing.","disabled":false,"thinking":false,"webSearch":true,"contextTokens":1000000,"maxOutputTokens":32000,"price":{"input":0.6,"output":2.4},"released":"2026-09-02","efforts":[],"speed":4,"quality":3,"cost":1,"estimates":[]},{"id":"qwen3-8-max","label":"Qwen3.8 Max","kind":"model","provider":"qwen","blurb":"Strong at code and math","description":"A large reasoning model with strong code and math, and wide language coverage.","disabled":false,"thinking":true,"webSearch":false,"contextTokens":1000000,"maxOutputTokens":64000,"price":{"input":1.2,"output":6},"released":"2026-08-02","efforts":["low","medium","high"],"defaultEffort":"medium","speed":3,"quality":4,"cost":2,"estimates":[]}] | Host model catalog including optional Auto routers, capability flags, efforts, prices, scores, and setting estimates. |
featured | string[]— | Model IDs listed at the top of the pill menu in order; remaining models sit under More models. Defaults to the first four. |
defaultModel | string— | Initial selected model ID; edits do not reset a mounted instance. |
defaultThinking | booleanDefault: false | Initial thinking preference; reconciled against the selected model capabilities. |
defaultEffort | low | medium | high | xhigh | max— | Initial reasoning effort; defaults to the chosen model default and snaps to the nearest supported level. |
defaultWebSearch | booleanDefault: false | Initial web-search preference; reconciled against the selected model capabilities. |
defaultOpen | booleanDefault: false | Initial open state of the popup menu; edits do not reset a mounted instance. |
showSummary | booleanDefault: false | Pill layout only: displays a review card beneath the pill with description, context window, token prices, effort, and change confirmation. |
searchable | booleanDefault: false | Panel layout: renders a search input above the model list to filter by name, provider, blurb, tag, or kind. |
showSettings | booleanDefault: true | Panel layout: displays capability-aware Thinking, Effort, and Web search controls below the list. |
showMetrics | booleanDefault: false | Panel layout: displays host-supplied 0–5 relative score bars for each model. |
showEstimates | booleanDefault: false | Panel layout: displays host-supplied latency and cost estimates for the active or previewed setting combination. |
metricColumns | ('speed' | 'quality' | 'cost')[]Default: ["speed","quality","cost"] | Ordered subset of host metric columns (`speed`, `quality`, `cost`) shown when `showMetrics` is enabled. |
placement | PlacementDefault: "bottom-start" | Preferred popup side and alignment relative to the trigger. |
locale | string— | BCP 47 locale for currency and number formatting; inherits UtherealProvider locale or en-US when omitted. |
motionOptions | PopupMotionOptions— | Optional popup presence transition overrides; durations are milliseconds. |
recipe | studio | softDefault: "studio" | Visual treatment (`studio` or `soft`); behavior is identical. |
motion | none | subtle | expressiveDefault: "subtle" | Motion preset (`subtle`, `expressive`, or `none`); system reduced motion takes precedence. |
dir | ltr | rtl— | Explicit reading direction (`ltr` or `rtl`); inherits document direction when omitted. |
theme | ModelPickerTheme— | Color mode, semantic accent, and typed design token overrides. |
The module also exports effortFor, reconcileModelValue, formatTokens, MODEL_EFFORTS, MODEL_BRANDS, sampleProviders, sampleModels, and sampleFeatured.
React integration
| Prop | Purpose |
|---|---|
value | Controlled atomic { model, thinking, effort, webSearch } object. |
onValueChange(value, model) | Called with the reconciled selection and matched ModelOption in both modes. |
effort | Controlled reasoning effort override; snaps to the nearest level supported by the model. |
onEffortChange(effort) | Called when effort changes directly or snaps after switching to a different model. |
open / onOpenChange | Controlled popup visibility state. |
autoFocus / restoreFocus | Control focus entry on open and focus return on close (e.g., false for toolbar handoffs). |
renderProviderMark | Custom decorative mark slot receiving { brand, icon, color, name }. |
renderIcon | Custom renderer for curated icon names on models and providers. |
portalContainer | Custom mount node for portalled menu and submenu surfaces. |
preset, tokens | Application defaults and --ui-* CSS variable overrides applied to root and portals. |
ref, className, style | Forwarded to the root <div> element along with native attributes. |
Keyboard & accessibility
| Key | Interaction |
|---|---|
Enter, Space, ArrowDown | On the trigger, opens the menu and focuses the selected model (or first visible match). |
ArrowUp, ArrowDown | Moves focus across enabled models and menu rows, wrapping at the ends. |
Home, End | Jumps to the first or last enabled row in the active menu surface. |
| Type a character | Jumps to the next matching model or effort row in the active menu surface. |
ArrowRight (ArrowLeft in RTL) | Opens the Effort or More models submenu (or drills into the mobile page below 640px). |
ArrowLeft (ArrowRight in RTL) | Closes the active submenu or returns from a mobile subpage to the main menu. |
Enter, Space | Selects the focused model or effort and closes the menu. |
Escape | Closes the active submenu first, or closes the main menu and restores focus to the pill trigger. |
Featured models, effort options, and grouped models expose radio semantics (role="menuitemradio" / role="radio" with aria-checked). Provider marks and check indicators are decorative (aria-hidden="true"). Selection changes and estimate availability announce through a polite role="status" live region. All spacing, borders, slide directions, and submenu placements use logical properties and mirror cleanly under dir="rtl". High-contrast forced-colors: active preserves outlines, check states, and metric dots.
Motion & theming
The trigger smoothly springs its width (useMorphWidth) and crossfades its mark and label when the model or effort changes. A single highlight element glides between rows on the snappy spring for pointer motion and snaps instantaneously for keyboard navigation. Mobile subpages slide horizontally and spring menu height without overshoot. In panel layout, estimate numbers roll digit by digit (RollingNumber). Under prefers-reduced-motion: reduce, spatial travel collapses to a 120ms opacity crossfade; motion="none" makes every transition immediate (0ms).
| Token group / key | Role |
|---|---|
surface, surfaceRaised, surfaceSunken, highlight | Trigger, menu surfaces, sunken chips/inputs, and gliding highlight. |
foreground (--ui-text), textSecondary, mutedForeground | Primary model labels, blurbs, hints, and muted metadata. |
border, borderStrong, borderSubtle, borderWidth | Trigger edge, hover/open outline, separators, and summary borders. |
accent, accentStrong, accentSubtle, focusRing | Active checkmarks, metric dots, and keyboard focus outlines. |
track, success, warning, danger | Unfilled score dots, switch tracks, and change confirmations. |
radius, radiusSm, popupRadius, itemRadius, shadow | Pill, tag, popup surface, row radii, and overlay elevation. |
An application-wide UtherealProvider supplies theme, recipe, locale, and motion defaults below instance props.
Composition
In an agent composition, ModelPicker is a leaf. The host persists the reconciled ModelPickerValue at /fields/instance-<id>/value, seeded from defaultModel, defaultThinking, defaultEffort, and defaultWebSearch. Configuration is literal validated data; model IDs, capabilities, prices, and estimates come from the host catalog. See React and JSON integration.
{
"type": "ModelPicker",
"props": {
"layout": "pill",
"showSummary": true,
"featured": ["claude-opus-5-5", "claude-sonnet-5-5", "gpt-6-1-sol"],
"defaultModel": "claude-opus-5-5"
},
"children": []
}