Default models (Pro)
ProIncluded in $99The model each kind of work starts on, limited to what the task can use and the workspace allows.
On this page
ProA default per kind of work: image models only for Images, blocked models disabled with the reason.
Installation
Needs chatcn Pro
This command works with a Pro license, along with every Pro component.
Or start free: sign up and get three Pro components on us, with a new one every month.
Usage
import { DefaultModels } from "@/components/ui/chatcn/pro/default-models"
<DefaultModels
tasks={[
{ id: "chat", label: "Chat", description: "New conversations", only: textModelIds },
{ id: "images", label: "Images", only: imageModelIds },
]}
models={models}
allowed={allowed}
value={{ chat: "claude-sonnet-5-5", images: "gpt-image-2" }}
onValueChange={setDefaults}
memberChoice={{ chat: true, images: false }}
onMemberChoiceChange={setMemberChoice}
/>Each task row is the free model-picker. Models the task cannot use (only) and models the workspace blocks (allowed) stay in the list, disabled with the reason, so people learn the policy instead of wondering where a model went. A default that is no longer allowed is outlined and says so. memberChoice adds a switch per task for whether members may change it in a chat. model-policy embeds it.
Examples
States
ProA default that is no longer allowed, flagged on its row.
Props
| Prop | Type | Notes |
|---|---|---|
tasks | ModelTask[] | { id, label, description?, only? } |
models, providers | From model-picker | |
allowed | string[] | Leave out to allow all |
value, onValueChange | Record<string, string> | Model id per task |
memberChoice, onMemberChoiceChange | Record<string, boolean> | Shows the switches |
labels | Partial<DefaultModelsLabels> | Every string, for translation |
Accessibility
- Disabled models carry their reason in the picker.
- Switches are named with the task.
Motion
None beyond the picker's own.