Unable to submit request because it has a maxOutputTokens value of 828858

I am using Gemini CLI.

I start some discussions, say 5-6 prompt exchanges, which go okay, and then a total wipeout occurs.

>  [API Error: Unable to submit request because it has a maxOutputTokens value of 828858 but the supported range is 
>   from 1 (inclusive) to 65537 (exclusive). Update the value and try again.]

This message recurs, and there is no preventing it once it starts.

I made the decision to upgrade from Gemini Pro to Gemini Pro Ultra AI (that’s a pricey upgrade!) - and felt I would be well-supported in this decision with ample usage. I am curious if "maxOutputTokens is affected by my upgrade decision?

Bottom line, this is a difficult problem to diagnose with limited visibility into the debug console. I need advice for how to overcome this issue and get back to productive usage. No other parts of my usage are irregular, just examining a code base and diagnosing how to proceed. No successful tasks as yet, just the repeated crashing state with no way to fix.

Known issue: https://github.com/google-gemini/gemini-cli/issues/7578

I hope the fix gets a review/merge soon because this isn’t limited to “long conversations” as highlighted, the system is crashing very quickly due to the appended chat.

Hello,

Welcome to the Forum!

As you mentioned, this is a known issue and the Gemini CLI team will take the necessary actions to address it.

On this platform, we can assist you with queries related to Google AI Studio and the Gemini API. If you encounter any issues in these areas, please feel free to raise your concerns here.

Thank you for your understanding, and happy coding. :innocent: