mirror of
https://github.com/R0m1k3/Socialflow.git
synced 2026-10-11 17:26:45 +02:00
Update AI chat to use correct API endpoint for fetching models
Change query key and data access for OpenRouter models in AiChat component. Replit-Commit-Author: Agent Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda Replit-Commit-Checkpoint-Type: intermediate_checkpoint Replit-Commit-Event-Id: 30146ff9-f3f2-44ad-aebf-af4a55a7e960 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/f2EnhiB
This commit is contained in:
1 parent
8dcc3b2fca
commit
54cb7acb64
1 file changed
+3
-3
@@ -36,11 +36,11 @@ export default function AiChat() {
|
||||
const { toast } = useToast();
|
||||
|
||||
// Fetch available models from OpenRouter
|
||||
const { data: modelsData, isLoading: modelsLoading } = useQuery<{ models: OpenRouterModel[] }>({
|
||||
queryKey: ['/api/ai/models'],
|
||||
const { data: modelsData, isLoading: modelsLoading } = useQuery<{ data: OpenRouterModel[] }>({
|
||||
queryKey: ['/api/openrouter/models'],
|
||||
});
|
||||
|
||||
const availableModels = modelsData?.models || [];
|
||||
const availableModels = modelsData?.data || [];
|
||||
|
||||
const generateMutation = useMutation({
|
||||
mutationFn: async (productInfo: any) => {
|
||||
|
||||
Reference in new issue
Block a user