Skip to content
Sign upPro
SettingsModel policyMenu

Model policy (Pro)

ProIncluded in $99

Which models a workspace may use, by provider, with each provider's data terms and the defaults per task kept in step.

ProThree providers with their data terms. Switch off Claude Opus 5.5 and the Code default asks for another.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/model-policy

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 { ModelPolicy } from "@/components/ui/chatcn/pro/model-policy"

<ModelPolicy
  models={models}       // ModelOption[] from model-picker
  providers={[{ id: "anthropic", name: "Anthropic", region: "US and EU", retention: "Zero data retention" }, …]}
  allowed={allowed}
  onAllowedChange={setAllowed}
  newModels="review"
  onNewModelsChange={setRule}
  defaults={{ tasks, value: defaults, onValueChange: setDefaults }}
/>

Models are grouped by provider, and each provider states where it processes requests and what it keeps, as plain facts beside its name, because that is the first thing a security review asks. Each model has a switch and each provider an allow all with a count when only some are on. A rule says whether new models from allowed providers arrive allowed or wait for review. With defaults, the default model per task sits underneath as default-models; every model row says which tasks it is the default for, and blocking one of those makes the task ask for another. Without handlers it is read only, so members can see the policy too.

Examples

States

ProRead only for members, in a narrow frame.

Props

PropTypeNotes
modelsModelOption[]From the free model-picker
providersPolicyProvider[]{ id, name, icon?, region?, retention? }
allowed, onAllowedChangestring[]Model ids the workspace may use
newModels, onNewModelsChange"allow" | "review"What happens to new models
defaultsDefaultModelsProps without modelsShows default models per task underneath
labelsPartial<ModelPolicyLabels>Every string, for translation

Accessibility

  • Every switch is named: Allow Claude Opus 5.5, Allow every Anthropic model.
  • The new model rule is a native radio group.
  • A blocked default is a status message on its task.

Motion

Switch thumbs slide 150 ms. Nothing else moves.