diff --git a/surfsense_web/components/settings/llm-role-manager.tsx b/surfsense_web/components/settings/llm-role-manager.tsx index c8057ef08..6bdc07926 100644 --- a/surfsense_web/components/settings/llm-role-manager.tsx +++ b/surfsense_web/components/settings/llm-role-manager.tsx @@ -27,8 +27,10 @@ import { SelectTrigger, SelectValue, } from "@/components/ui/select"; -import { useGlobalLLMConfigs, useLLMConfigs, useLLMPreferences } from "@/hooks/use-llm-configs"; +import { useGlobalLLMConfigs, useLLMPreferences } from "@/hooks/use-llm-configs"; +import { useAtomValue } from "jotai"; +import { llmConfigsAtom } from "@/atoms/llm-config/llm-config-query.atoms"; const ROLE_DESCRIPTIONS = { long_context: { icon: Brain, @@ -62,11 +64,11 @@ interface LLMRoleManagerProps { export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) { const { - llmConfigs, - loading: configsLoading, - error: configsError, - refreshConfigs, - } = useLLMConfigs(searchSpaceId); + data: llmConfigs = [], + isFetching: configsLoading, + isError: configsError, + refetch: refreshConfigs + } = useAtomValue(llmConfigsAtom); const { globalConfigs, loading: globalConfigsLoading, @@ -203,7 +205,7 @@ export function LLMRoleManager({ searchSpaceId }: LLMRoleManagerProps) {