Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Settings/Models from ./settings-models.
import { SettingsModelsScreen } from "@/components/ui/settings-models";
export default function Page() {
return (
<SettingsModelsScreen
providers={providers}
defaultChat="auto"
defaultImage="gpt-image"
onSave={(state) => saveModelSettings(state)}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| providers | Provider[] | Providers with id, name, region (eu, global or custom), logo and their models – each model has id, name, kind (chat or image), on and access. The sample list when left out | |
| defaultChat | string | "auto" | Model id of the default chat model, or auto – Auto shows a short explainer under it |
| defaultImage | string | "gpt-image" | Model id of the default image model |
| keys | { provider: string; masked: string; added: string }[] | [] | The workspace's own API keys, already masked |
| onSave | (state) => void | Called with providers, defaults and keys whenever something changes. A switched-off default falls back – chat to Auto | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| workspace | string | Workspace name in the sidebar | |
| user | { name: string; avatar?: string } | Account at the bottom of the sidebar | |
| loading | boolean | While the models load: the defaults, every provider with its models and the API keys as gray shapes in the shape of the real ones | |
| empty | boolean | No models yet: the defaults on Auto, “No models yet” with a Custom model button in the models' place and “No API keys” with Add key | |
| className | string | Extra class on the root |
Fills its container – give it the full viewport height in your app
Below 600px controls move under their labels, the filter takes its own line and Auto's picks go under its text
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"; colors are CSS variables on .ui-as