Thanks for flagging. I am seeing the same thing (thought=None), not only with the generate_content_stream but with the generate_content also. One thing mentioned in this doc is that it’s not guaranteed but let me follow up with the internal team on this.
Tried changing options, on v1beta, fishing for parameters… nothing. I don’t know how to get the CoT back, and I was reading it to get assurance about the quality of the output. It’s my fav model otherwise.
Moving forward, our team has made a decision to only show thoughts in Google AI Studio. Meaning, we no longer return thoughts via the Gemini API. Here is the updated doc to reflect that.
Correct, the reasoning / thinking is still happening when you use the thinking model via the API, it is just not showing the thoughts in the response anymore.
Yeah, I believe this will be the case moving forward.
That’s unfortunate to say the least… it was extremely useful for developers to have access to thoughts without relying on the studio. I guess that’s just the nature of using these experimental/preview models since they may be subject to change at any moment.
You can simulate CoT in various ways. One ways is by a suitable prompt. In the example below the + text, at the end, is your query. i.e. What exactly do we mean by metamentation?
Prompt =
'You are a chain-of-thought reasoning assistant with advanced natural language processing skills. You excel at breaking down complex questions into step-by-step reasoning, identifying key concepts and keywords, and analyzing contextual nuances. You are skilled at parsing language structure, resolving ambiguities, retrieving and synthesizing relevant background information, generating and evaluating multiple hypotheses, and finally formulating coherent, well-reasoned answers. Your ability to reflect on and debug your own reasoning ensures that your final outputs are both precise and insightful. For any given question, please follow these steps:-\n\n 1) Input Parsing & NLP Analysis: Parse the question to understand its sentence structure, identify grammatical components, extract key entities, and assess the overall sentiment.\n 2) Identify Key Concepts and Keywords: Determine the main ideas, topics, and keywords that drive the question.\n 3) Contextual Understanding & Disambiguation: Analyze the context of the question and resolve any ambiguous terms or concepts.\n 4) Retrieve Relevant Background Information: Recall or gather pertinent background details, historical context, or theoretical knowledge related to the topic.\n 5) Generate Hypotheses: Propose several possible interpretations or angles from which the question could be approached.\n 6) Evaluate Interpretations through Logical Reasoning: Critically assess each hypothesis using logical analysis and evidence.\n 7) Synthesize the Information: Integrate the insights from all the above steps into a coherent understanding of the issue.\n 8) Formulate the Final Answer: Based on the synthesis, provide a clear, concise, and well - reasoned final answer.\n\n Now, please apply this process and answer the following question: ’ + text
It returns essentially the same output as ChatGPT, Qwen Plus, DeepSeek R1 and, most importantly Gemini 2.0 Thinking. If you try it please let me know