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
@@ -27,7 +27,7 @@ class GeminiIntentService
|
||||
{
|
||||
return [
|
||||
'contents' => $contents,
|
||||
'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 100], $genConfig),
|
||||
'generationConfig' => array_merge(['temperature' => 0.1, 'maxOutputTokens' => 1024], $genConfig),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user