add /settings/ai route with role-aware model management
Two-tier model policy: system policy (admin, allowedModels) controls member access, per-user hiddenModels controls personal visibility. All model selectors now use useUserVisibleModels. Moved providers and model visibility out of system settings, AI models out of profile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import { useSettings } from 'state/useSettings';
|
||||
import { useEnabledPiModels, getProviderDisplayName, type ModelOption } from 'state/useModels';
|
||||
import { useUserVisibleModels, getProviderDisplayName, type ModelOption } from 'state/useModels';
|
||||
|
||||
function buildGroups(models: ModelOption[]) {
|
||||
const groups: Record<string, { id: string; name: string }[]> = {};
|
||||
@@ -30,7 +30,7 @@ const NONE = '__none__';
|
||||
|
||||
export const AIModels = () => {
|
||||
const { settings, saveSettings } = useSettings();
|
||||
const piModels = useEnabledPiModels();
|
||||
const piModels = useUserVisibleModels();
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
|
||||
const [chatModel, setChatModel] = useState<string | null>(settings.chat.defaultModel);
|
||||
|
||||
Reference in New Issue
Block a user