Gemini 3.8 Flash on Vertex AI: does maxOutputTokens cap thinking and output together?

Hi,

I was directed here from the Gemini API forum. I’m preparing a small test on Google Cloud and need to understand the token limit before sending my first generation request.

My setup:

  • Model: gemini-3.8-flash
  • Endpoint: aiplatform.eu.rep.googleapis.com, location eu
  • REST v1 generateContent
  • Text-only input, systemInstruction and responseSchema for JSON output
  • Default MEDIUM thinking, maxOutputTokens=4096
  • No tools, streaming, continuation or retries

The question is: can the combined thoughtsTokenCount + candidatesTokenCount exceed 4096 with this setup?

The existing discussion contains an answer saying the limit covers both, followed by reports of overshooting, including on Vertex AI. Those are other users’ observations; I haven’t tested this myself.

If 4096 is not a guaranteed combined ceiling, is there a supported setting or documented maximum that lets me bound the total chargeable generation before making the call?

A Cloud-specific documentation link or clarification from someone familiar with the Vertex implementation would really help.

Previous discussion and referral:

Thanks!