Gemini Pro and Flash 002 suddenly shorter context window

Hi @AskingQuestions,

Welcome to Google Cloud Community!

The error message indicates that the context length you provided (53,163 tokens) exceeds the maximum token limit (32,768 tokens) supported by the Gemini 1.5 Pro model. It’s possible that you’re now using a version of the model with a smaller token limit than you expected.

As a temporary workaround , you might consider exploring other models that offer similar context lengths or test with a smaller context window to confirm that the issue is indeed related to the context window size and not something else in your request.

If the issue persists, I suggest contacting Google Cloud Support as they can provide more insights to see if the behavior you’ve encountered is a known issue or specific to your project.

I hope the above information is helpful