Skip to main content

Code

V4 models run with thinking enabled by default, so you get reasoning_content out of the box. Use the use_thinking flag to control it.
thinking_mode.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run Agent

Save the code above as thinking_mode.py, then run: