Dev #99

Merged
NiekRabelink merged 5 commits from dev into main 2026-10-05 08:33:53 +00:00
Showing only changes of commit 86041b665d - Show all commits
+8 -3
View File
@@ -268,9 +268,14 @@ function fociz_ai_chat_gemini(array $messages, array $options, array $aiSettings
continue;
}
// Bij autorisatiefouten (zoals ongeldige API key 400/403) direct stoppen
$response = $res;
break;
// Alleen bij expliciete autorisatiefouten (ongeldige API key 400/401/403) stoppen
if (in_array($res['status'], [400, 401, 403], true)) {
$response = $res;
break;
}
// Voor alle andere fouten (serverfout 500, timeout, etc.): probeer volgende kandidaat
continue;
}
// Als alle directe kandidaten een 404 gaven, probeer dynamisch via ListModels een passend gemini model te vinden