From 3dc09a11a76531660225dc1dc8554caf67eebe58 Mon Sep 17 00:00:00 2001 From: Darkayer Date: Wed, 23 Sep 2026 10:49:52 +0200 Subject: [PATCH] fix(ai): prioritize flash models, prevent high-demand blocks, and add resilient brainstorm fallbacks --- admin.php | 7 ++-- brainstorm_canvas.php | 48 +++++++++++++++++++++---- includes/ai.php | 82 ++++++++++++++++++++++++++++++++++--------- includes/settings.php | 4 +-- profile.php | 6 ++-- 5 files changed, 115 insertions(+), 32 deletions(-) diff --git a/admin.php b/admin.php index cc01e22..3f3c77d 100644 --- a/admin.php +++ b/admin.php @@ -385,7 +385,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $activeTab = 'system'; try { $aiEnabled = isset($_POST['ai_enabled']) ? 1 : 0; - $aiModel = trim((string)($_POST['ai_model'] ?? 'gemini-1.5-pro')); + $aiModel = trim((string)($_POST['ai_model'] ?? 'gemini-2.0-flash')); $aiProvider = trim((string)($_POST['ai_provider'] ?? '')); if (empty($aiProvider)) { $aiProvider = str_contains($aiModel, 'gpt') ? 'openai' : 'gemini'; @@ -2126,10 +2126,9 @@ require_once __DIR__ . '/includes/header.php'; - - + +