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

**URL:** <https://discuss.google.dev/t/gemini-3-8-flash-on-vertex-ai-does-maxoutputtokens-cap-thinking-and-output-together/409565>\
**Category:** Generative AI & Foundational Models\
**Tags:** gemini\
**Created:** [October 30, 2026, 4:01pm UTC](https://discuss.google.dev/t/gemini-3-8-flash-on-vertex-ai-does-maxoutputtokens-cap-thinking-and-output-together/409565 "2026-10-30T16:01:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johan\_K](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@Johan\_K](https://discuss.google.dev/u/Johan_K)\
**Post date:** [October 30, 2026, 4:02pm UTC](https://discuss.google.dev/t/gemini-3-8-flash-on-vertex-ai-does-maxoutputtokens-cap-thinking-and-output-together/409565/1 "2026-10-30T16:02:02Z")

</div>

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](http://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:

> **[Gemini 3.8 Flash HIGH: does maxOutputTokens include thinking tokens?](https://discuss.ai.google.dev/t/gemini-3-8-flash-high-does-maxoutputtokens-include-thinking-tokens/181077/6)**
>
> Hello, @Pax, regarding your follow-up questions: Project-level restrictions return 403 PERMISSION\_DENIED (Project restricted or unavailable), whereas 503 UNAVAILABLE indicates temporary service overload — re-enable automatic SDK retries or use...

Thanks!
