I am using the Gemini 2.5 Pro API and have noticed that in some cases the model’s internal reasoning or “thought process” is included in the final output that is returned to the user.
From my understanding the model’s thinking should be done internally and only the final answer should appear in the output unless includeThoughts
is explicitly enabled in the request. In my implementation I am not setting includeThoughts
and I am only reading the main response.text
yet the output occasionally contains what looks like step by step reasoning or meta commentary that should remain hidden.
I have seen other developers report similar issues in community forums so it seems to be a reproducible bug rather than an isolated case.
Could the team clarify under what circumstances this can happen and if there is a way to guarantee that internal thinking will never appear in the user visible output?