fix(gemini): deshabilitar thinking y subir maxOutputTokens a 8192/2048

Con thinkingBudget=0 el modelo no consume tokens en razonamiento interno,
evitando que el JSON de respuesta quede truncado (bug: '{"banco":"Nu",...').
maxOutputTokens 2048→8192 en Vision, 1024→2048 en Intent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro
2026-07-18 17:11:55 +00:00
co-authored by Claude Sonnet 4.6
parent 31ba26ee33
commit 5e20155ae4
2 changed files with 10 additions and 2 deletions
+5 -1
View File
@@ -27,7 +27,11 @@ class GeminiIntentService
{
return [
'contents' => $contents,
'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 1024], $genConfig),
'generationConfig' => array_merge([
'temperature' => 0.1,
'maxOutputTokens' => 2048,
'thinkingConfig' => ['thinkingBudget' => 0],
], $genConfig),
];
}
+5 -1
View File
@@ -34,7 +34,11 @@ class GeminiVisionService
$body = [
'contents' => $contents,
'generationConfig' => ['temperature' => 0.1, 'maxOutputTokens' => 2048],
'generationConfig' => [
'temperature' => 0.1,
'maxOutputTokens' => 8192,
'thinkingConfig' => ['thinkingBudget' => 0],
],
];
$inicio = microtime(true);