hello, there is an error that everyone is talking about, its “Sorry, I hit a snag. Please try again shortly or modify your prompt.
[GoogleGenerativeAI Error]: Error fetching from https://monospace-pa.googleapis.com/v1/models/gemini-2.5-pro-preview-03-25:streamGenerateContent?alt=sse: [400 Bad Request] The input token count (1065021) exceeds the maximum number of tokens allowed (1048576).” this mean that Gemeni context got too big(because of history data and mostly that Gemeni read all files before talking to me, and the files got too big) this isn’t a simple issue or a feature that we request to be added, this is critical and gets us stuck, no solutions and no documentation about it, its really frustrating, and i tried all the solutions they suggest on the forum, but none of them work either probably because of firebase studio upades, its been 3 days now that im searching for solutions and trying to fix that. firebase studio was a really good deal but this error blows up litteraly everything, the google members said that they are working on that more than 20 days ago, and the problem is still there. Its a major issue that make firebase studio unusable, if fixing that isn’t soon at least we will appreciate an official documentation for a temporary solution, thank you.
Thank you for sharing; same issues here.
I welcome a resolution from Google engineers to ensure our code assets are usable because, at the moment, nothing is working.
/clear
i’ve found work well now and then!
how did you fix ? did you find the solution ?
/clear
in the AI chat
what do you mean ? you can’t clear the chat, did you even try it ?
Hi @Abderrahmane - first of all, I want to apologize for this problem that you are running into. We have released a handful of fixes over the past few weeks to help reduce the likelihood of this error happening, and we have more work we need to do.
One of the changes we are looking into is condensing the large context into something smaller (kinda like RAG) and seeing if we can help reduce the amount of data Gemini needs to process per request. We are also working on making it easy to clear your chat history or create a new chat thread that doesn’t carry along the context of any previous convos.
All of these changes are in various stages of landing in the next few weeks, so I do appreciate your patience as we continue to make progress on issues like these.
Cheers,
Kirupa
thank you for your time and your anwser