Fix maxOutputTokens too low for gemini-3.5-flash thinking model
gemini-3.5-flash uses thinking tokens that share the same budget as output tokens. With maxOutputTokens=200 (vision) or 100 (intent), the model would exhaust the budget on thinking (~288-1043 tokens) and truncate the actual response to 8-11 tokens, producing garbage output like "040825". Fix: 2048 for vision (needs full JSON), 1024 for intent, 512 for connection test. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
5c15f9f3fe
commit
157691e166
Regular → Executable
+1
-1
@@ -34,7 +34,7 @@ class GeminiVisionService
|
||||
|
||||
$body = [
|
||||
'contents' => $contents,
|
||||
'generationConfig' => ['temperature' => 0.1, 'maxOutputTokens' => 200],
|
||||
'generationConfig' => ['temperature' => 0.1, 'maxOutputTokens' => 2048],
|
||||
];
|
||||
|
||||
$inicio = microtime(true);
|
||||
|
||||
Reference in New Issue
Block a user