Sorry, I hit a snag. Please try again shortly or modify your prompt. How to solve this error

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:streamGenerateContent?alt=sse: [400 Bad Request] The input token count (1050023) exceeds the maximum number of tokens allowed (1048576).

Please i want a fast method to solve this error i am getting this error from 2 days i guess its because of App Prototyper is working with reduced project context because your project is getting large. but also i cant delete any files form my code project please help me. @kirupa @dms @jamesor please help

I’m sorry you’re hitting this, I’d like to understand how you got to this point so quickly, but in the meantime, a temporary workaround involves using a tool to reduce the input token count. A community-provided workaround is available at Temporary workaround for error due to exceeding input token count (unofficial) . A more permanent solution is in development.


I don’t know how to solve this error
@kirupac @dms @RichH

Sir i please request you to solve this matter i know its not easy but due to this i am unable to do only 3 - 4 changes which are required for my website and due to this students are not seeing questions properly

Hey @soham_asodekar, this error is usually a result of exceeding the context limit. One thing that I’ve found helpful is to call out the specific files you want to edit so the model knows where to look. If you want hands-on help, ping me and we can walk through it together.

thank you sir for your response could you please tell me how to call out the specific files