Gemini 2.5 Pro (paid, with API key) errors 100% of the time when token count is over 131k

We are using Gemini 2.5 heavily in production and as of this morning, it stopped working. Any time we go over 131k tokens, we get the error below:

Status 400, Bad Request. The input token count (…) exceeds the maximum number of tokens allowed (131072)

NOTE: This is not the same as previous people who have reported this error while using millions of tokens. This specific error happened with only 150k tokens in input. This model is supposed to support 1 million tokens, and we have been using more than 200k token inputs for months without issue.

Details:

  • Using @google/genai with typescript
  • It works when under 131k tokens, fails 100% of the time over 131k tokens
  • Definitely set to use gemini 2.5 pro, and it worked for months before suddenly breaking today

Using a paid account, with an API key, tier 3. It also happens in our staging environment, using a different, tier 2, api key

1 Like

Started facing the exact same issue this morning. Urgent fix needed.

1 Like

@Steven_Waterman are you still facing this issue?

I’m using Gemini 2.5 Pro in a Dify Workflow and i’m still getting 429’d there but the responses are working fine in the gen-ai python package for some reason

1 Like

Hi @Steven_Waterman & @PatrickMaia

We are having an outage and that is probably why you are facing this issue.

You can always check for outages using this public url - Google AI Studio

The team currently working to fix it.

1 Like

Hi @Krish_Varnakavi1 it is not resolved. I still get the same error 100% of the time when going over 131k tokens. I have had to fully disable our production gemini integration because the API always returns this same error saying that the token limit is only 131,072 when it should actually be 1 million.

We first saw the error around 10am UTC yesterday (around 8 hours before the outage started). We hadn’t changed anything regarding our AI integration for at least a week prior to this.

2 Likes

Have the same issue ^

Having the same issue. Seems like hidden rate limit.

Hi @Steven_Waterman,
We tried with reproducing your issue and observed that it is working as expected, even with 150k + tokens. Can you please confirm, if you are still facing this issue?

Google AI is garbage. It fails in every API key I’ve ever tried and there is no difference between the free model and paid models on the web interface, still cant process large documents when both claude and open ai can.

Gemini code assist is awful and I have to use GPT or Claude to fix things Gemini does. Quite sad actually