From cfa38e51df1ce8566e6ce86c27981dad8e13953c Mon Sep 17 00:00:00 2001 From: Lizandro Date: Wed, 15 Jul 2026 04:21:55 +0000 Subject: [PATCH] fix: change default Gemini model to gemini-3.5-flash gemini-2.5-flash and gemini-2.0-flash-lite are restricted/unavailable. gemini-3.5-flash is confirmed working on this account. Co-Authored-By: Claude Sonnet 4.6 --- app/Http/Livewire/Chat/ShowConfiguracionChat.php | 6 +++--- app/Services/GeminiIntentService.php | 2 +- app/Services/GeminiVisionService.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Http/Livewire/Chat/ShowConfiguracionChat.php b/app/Http/Livewire/Chat/ShowConfiguracionChat.php index 50fb618..c0609dd 100755 --- a/app/Http/Livewire/Chat/ShowConfiguracionChat.php +++ b/app/Http/Livewire/Chat/ShowConfiguracionChat.php @@ -21,7 +21,7 @@ class ShowConfiguracionChat extends Component // ── Gemini IA ───────────────────────────────────────────── public string $gemini_api_key = ''; - public string $gemini_model = 'gemini-2.0-flash'; + public string $gemini_model = 'gemini-3.5-flash'; public string $gemini_habilitado = '0'; public string $gemini_prompt_extra = ''; @@ -55,7 +55,7 @@ class ShowConfiguracionChat extends Component 'mensaje_transferencia' => 'Un agente se comunicara contigo en breve. Por favor espera.', 'validacion_accion_auto' => 'solo_notificar', 'validacion_monto_tolerancia' => '0', - 'gemini_model' => 'gemini-2.0-flash', + 'gemini_model' => 'gemini-3.5-flash', ]; foreach ($keys as $key) { @@ -92,7 +92,7 @@ class ShowConfiguracionChat extends Component public function probarGemini(): void { $key = trim($this->gemini_api_key ?: \App\Models\ChatConfig::get('gemini_api_key')); - $model = trim($this->gemini_model ?: \App\Models\ChatConfig::get('gemini_model', 'gemini-2.0-flash')); + $model = trim($this->gemini_model ?: \App\Models\ChatConfig::get('gemini_model', 'gemini-3.5-flash')); if (! $key) { $this->geminiResult = '⚠️ La API Key de Gemini está vacía.'; diff --git a/app/Services/GeminiIntentService.php b/app/Services/GeminiIntentService.php index 11b7d3f..969369b 100644 --- a/app/Services/GeminiIntentService.php +++ b/app/Services/GeminiIntentService.php @@ -17,7 +17,7 @@ class GeminiIntentService public function __construct() { $this->apiKey = ChatConfig::get('gemini_api_key', ''); - $this->model = ChatConfig::get('gemini_model', 'gemini-2.0-flash'); + $this->model = ChatConfig::get('gemini_model', 'gemini-3.5-flash'); // v1 for newer models, v1beta as fallback $ver = preg_match('/gemini-(2\.5|3[\.\d]*)/', $this->model) ? 'v1' : 'v1beta'; $this->apiUrl = "https://generativelanguage.googleapis.com/{$ver}/models/{$this->model}:generateContent"; diff --git a/app/Services/GeminiVisionService.php b/app/Services/GeminiVisionService.php index c7cdaf0..75787ad 100644 --- a/app/Services/GeminiVisionService.php +++ b/app/Services/GeminiVisionService.php @@ -17,7 +17,7 @@ class GeminiVisionService public function __construct() { $this->apiKey = ChatConfig::get('gemini_api_key', ''); - $this->model = ChatConfig::get('gemini_model', 'gemini-2.0-flash'); + $this->model = ChatConfig::get('gemini_model', 'gemini-3.5-flash'); $ver = preg_match('/gemini-(2\.5|3[\.\d]*)/', $this->model) ? 'v1' : 'v1beta'; $this->apiUrl = "https://generativelanguage.googleapis.com/{$ver}/models/{$this->model}:generateContent"; }