Skip to main content
Solve a logic puzzle with thinking mode on. Setting use_thinking=True makes the model emit reasoning_content, which show_full_reasoning=True streams alongside the answer so you can watch it work through the problem.
reasoning_agent.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Xiaomi MiMo API key

4

Run the example

Save the code above as reasoning_agent.py, then run:
Full source: cookbook/90_models/xiaomi/reasoning_agent.py