only enabled ai models in super admin
This commit is contained in:
@@ -12,7 +12,7 @@ import {
|
||||
SelectValue,
|
||||
} from '@/components/ui/select';
|
||||
import { useSettings } from 'state/useSettings';
|
||||
import { useVisiblePiModels, getProviderDisplayName, type ModelOption } from 'state/useModels';
|
||||
import { useEnabledPiModels, getProviderDisplayName, type ModelOption } from 'state/useModels';
|
||||
|
||||
function buildGroups(models: ModelOption[]) {
|
||||
const groups: Record<string, { id: string; name: string }[]> = {};
|
||||
@@ -30,9 +30,11 @@ const NONE = '__none__';
|
||||
|
||||
export const AIModels = () => {
|
||||
const { settings, saveSettings } = useSettings();
|
||||
const piModels = useVisiblePiModels();
|
||||
const piModels = useEnabledPiModels();
|
||||
const [isSaving, setIsSaving] = useState(false);
|
||||
|
||||
console.log('[AIModels] enabledModels:', settings.ai?.enabledModels?.length, 'filtered:', piModels.length);
|
||||
|
||||
const [chatModel, setChatModel] = useState<string | null>(settings.chat.defaultModel);
|
||||
const [projectModel, setProjectModel] = useState<string | null>(settings.chat.defaultProjectModel);
|
||||
const [taskModel, setTaskModel] = useState<string | null>(settings.tasks.defaultModel);
|
||||
|
||||
Reference in New Issue
Block a user