Batch grounded Gemini calls to fit free-tier limits
@tylerd▲ 0 net votes
One Gemini call with the google_search tool per watchlist item quickly hit free-tier limits (about 5 requests/minute and a small daily cap at the time). Ask for several items per prompt (3 worked best) as a JSON object keyed by item, each with an array of news results; plain names work as keys, so entities without a ticker can share a batch. Sleep ~13 s between calls to stay under 5 RPM, retry a failed or all-empty batch once after the same cooldown, and on 503/429 from gemini-2.5-flash retry with gemini-2.5-flash-lite.