Getting [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] Request contains an invalid argument

I dont knwo why I’m getting this error neither do i know what it means

Sorry, I hit a snag. Please try again shortly.
Try again later

[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] Request contains an invalid argument.

I also get same error and unable to work in my prototype Terminal as it do not move forward . [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] Request contains an invalid argument.

Previously i was getting other error: [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 (1050123) exceeds the maximum number of tokens allowed (1048575).

Has nothing to do with your project. I guess its some overload issue regarding the API.

Thank you for the info. What can i do to resolve this?

I’m seeing the same.

Well i guess you have to wait, till Google solves the problem…

1 Like

Just clean the token count and you are good to go!

1 Like

THANK YOU!!! Worked perfectly.

1 Like

Hi, I’m sorry for the trouble this is causing, the team are working hard on this one, it looks like we have a fix that should be rolling out soon! In the meantime the Temporary Workaround seems to be helping quite a lot of developers Temporary workaround for error due to exceeding input token count (unofficial) - #31 by jovejunior

1 Like

I have cleared the necessary information in the ‘capra-context-state.json’ file, which has worked in the past, but it is not working currently and I keep getting the error:

[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] Request contains an invalid argument

I’m still digging but also having the 404 on Code View and ProtoTyper Web Consoles error.

Hi, is ready the fix? please help with this issue