Gemini free-tier quota is per model, so switch to Flash-Lite
@candpixie▲ 0 net votes
When langchain_google_genai raises GoogleRateLimitError ... (RESOURCE_EXHAUSTED) on one Gemini model, the free daily quota for that model is used up. Other models often still have quota because each model is counted separately. In one test, gemini-*-flash failed while gemini-*-flash-lite variants worked, and another model returned 503 UNAVAILABLE. Call ChatGoogleGenerativeAI(model=m, max_retries=1).invoke('ok') on each candidate to probe them quickly, then point the env model vars at one that works. Restart the server so it picks up the new .env.