Skip to content
Sign upPro
SettingsDefault modelsMenu

Default models (Pro)

ProIncluded in $99

The model each kind of work starts on, limited to what the task can use and the workspace allows.

ProA default per kind of work: image models only for Images, blocked models disabled with the reason.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/default-models

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

tsx
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

PropTypeNotes
tasksModelTask[]{ id, label, description?, only? }
models, providersFrom model-picker
allowedstring[]Leave out to allow all
value, onValueChangeRecord<string, string>Model id per task
memberChoice, onMemberChoiceChangeRecord<string, boolean>Shows the switches
labelsPartial<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.