Example showing how to use a non-reasoning model as a reasoning model.For reasoning, we recommend using a Reasoning Agent (with reasoning=True), or to use an appropriate reasoning model with reasoning_model.
1
Add the following code to your Python file
non-reasoning-model-cot.py
Copy
Ask AI
from agno.agent import Agentfrom agno.models.openai import OpenAIResponsesreasoning_agent = Agent( model=OpenAIResponses(id="gpt-5.2"), reasoning_model=OpenAIResponses( id="gpt-5.2", # This model will be used for reasoning, although it is not a native reasoning model. max_tokens=1200, ), markdown=True,)reasoning_agent.print_response( "Give me steps to write a python script for fibonacci series", stream=True, show_full_reasoning=True,)# It uses the default model of the Agentreasoning_agent = Agent( model=OpenAIResponses(id="gpt-5.2", max_tokens=1200), reasoning=True, markdown=True,)reasoning_agent.print_response( "Give me steps to write a python script for fibonacci series", stream=True, show_full_reasoning=True,)