I am finding that while I still get the Thoughts the Thinking is no longer returned from the updated API call. Having enquired in Google Ai Studio its preferred suggestion was: Scenario 1: “Parts Array Length: 1” and “Parts Array: […]” shows only one object.
- Diagnosis: This confirms that in version ‘01-21’, the API is indeed only returning a single part in the parts array. This part likely contains the entire final response text. There is no parts[1] because it doesn’t exist in the response structure of this version.
Thus in:
print('Parts 0: ’ + output.candidates[0].content.parts[0].text)
print('Parts 1: ’ + output.candidates[0].content. parts[1].text)
only parts[0] has content and it returns the Thoughts whereas in the earlier version ( gemini-2.0-flash-thinking-exp-1219) part[0] was the thinking and part[1] the thoughts.
I had been benchmarking Gemini Thinking and DeepSeek’s R1. It looks as if I may have to drop Gemini and just go with R1.
Any thoughts?
1 Like
I’m in the same boat. Apparently the change is in the default setting of the include_thoughts
parameter documented here - Gemini 2.0 Flash Thinking | Gemini API | Google AI for Developers
Initially (in December) the parameter default must have been true
, now it needs to be set to true
to get the thoughts log. Thing is, it’s only documented for Python, and people working with the REST API are left wondering where in the request structure the parameter is expected.
Meanwhile, until Google fixes the documentation, R1 is the go-to tool to harvest decent thoughts logs.
1 Like
Thanks for your confirmation. I’d read the docs and have tried to include the thoughts even if it’s the thinking I wanted.
But I’ve migrated it all to R1 now and won’t look back.
as my test, this example failed to print thought
The Gemini team may not be aware that the Thinking is as interesting, if not more so, than the Thoughts. DeepSeek gives both and up until recently so did Gemini. Even o3 doesn’t appear to give both.
If the Thinking process is what we want we’ll go where we can get it.
1 Like