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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
13199b1de4
commit
cfa38e51df
@@ -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.';
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user