Error: Sorry, I hit a snag. Please try again shortly or modify your prompt

I can’t use the Gemini prototyper, anything I give it this is a consistent reponse I get…

[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 (1049725) exceeds the maximum number of tokens allowed (1048576).

2 Likes

This error means you’re sending too much text (1,049,725 tokens) to the Gemini 2.5 Pro model, which has a hard limit of 1,048,576 tokens per request. Tokens are chunks of text (words, punctuation, or subwords) that the AI processes. TO FIX IT, shorten your input — remove unnecessary details, split long prompts into smaller parts, or summarize content — so it stays under the token limit.

1 Like

Even one word prompt shows this error. The prototyper never execute anything.

Have a look at the file(s) you’re working on and their sizes (lines and char count) maybe see/ask if a refactor of the file is in order. I had a js file that was getting pretty big and single line prompts against that file bogged it down and I would get errors and even no responses.
I used straight Gemini outside of FBS and had it refactor my single js file into many smaller, modular files, and link everything back together. I copy pasted into FBS, and used the prompt that Gemini made for me to tell FBS that I had refactored my initial file and their setup.

Smooth sailing for me since then. YMMV