Fix: always set google maxOutputTokens to 65536

Co-authored-by: gemini-3.5-flash <gemini@google.com>
This commit is contained in:
2026-05-24 21:49:02 -07:00
parent 0a64e532ff
commit 8fe94b2b58

View File

@@ -207,7 +207,7 @@ export async function streamGoogle({ apiKey, body, signal, onDelta, isRunning })
const generationConfig = Object.entries({ const generationConfig = Object.entries({
temperature: body.temperature, temperature: body.temperature,
topP: body.top_p, topP: body.top_p,
maxOutputTokens: body.max_tokens, maxOutputTokens: 65536,
}).reduce((acc, [k, v]) => (Number.isFinite(+v) && +v >= 0 ? { ...acc, [k]: +v } : acc), {}) }).reduce((acc, [k, v]) => (Number.isFinite(+v) && +v >= 0 ? { ...acc, [k]: +v } : acc), {})
if (body.reasoning) { if (body.reasoning) {