I’ve got a weird issue with Gemini 1.5 Pro (seems to be only that) and a large-ish prompt. When I test my prompt in AI Studio, I get a token count of around 170k or so and I get a result just fine.
I then do a quick test with the Node SDK and I can’t get the prompt to run. Calling countTokens returns 185530, well within limits, but when generateContent is run, I get a 429 Too Many Requests. Now, you could think that’s just me using the API too much, but I’m not, and can confirm in the cloud console. I can also immediately run a test with a small prompt and it runs fine.
I created a repro here: ai-testingzone/test_pro_issue at main · cfjedimaster/ai-testingzone · GitHub. Obviously you need your own key. When I run my script, test.mjs, against a small prompt, it works perfectly. When I run it against the larger one (large.txt), I get the 429 error.
Anything come to mind?