Skip to main content

Code

Set reasoning_effort to "high" or "max". The API defaults to "high"; DeepSeek recommends "max" for demanding agent tasks. While thinking is active, temperature, top_p, presence_penalty and frequency_penalty are ignored by the API.
reasoning_effort.py

Usage

1

Set up your virtual environment

2

Set your API key

3

Install dependencies

4

Run Agent

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