Skip to content

Commit 47c1122

Browse files
author
Miriad
committed
fix: reduce INFOGRAPHIC_BATCH_SIZE to 2 for Gemini generateContent timing
Gemini generateContent with thinking+search grounding takes ~12s/call vs ~4s for Imagen. BATCH_SIZE=4 (8 calls) exceeds Vercel 60s limit. BATCH_SIZE=2 (4 calls × ~12s = ~48s) fits safely.
1 parent 66851d3 commit 47c1122

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/api/cron/check-research/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ async function buildStuckThresholds(): Promise<Record<string, number>> {
118118
const MAX_DOCS_PER_STATUS = 2;
119119

120120
/** Max prompts to process per cron cycle (each prompt = 2 Imagen calls) */
121-
const INFOGRAPHIC_BATCH_SIZE = 4;
121+
const INFOGRAPHIC_BATCH_SIZE = 2; // Gemini generateContent with thinking+search takes ~12s/call
122122

123123
// ---------------------------------------------------------------------------
124124
// Sanity Write Client

0 commit comments

Comments
 (0)