Get startedGet started for free

Tuning reasoning effort

By default, V4-Pro thinks at "high" effort. If you need it to push harder on a particularly tough problem, set reasoning_effort="max" and the model will spend longer working through the steps.

In this exercise, you'll send the same math_problem from the previous exercise — this time with reasoning_effort="max" — and compare how the response is laid out.

This exercise is part of the course

Working with DeepSeek in Python

View Course

Exercise instructions

  • Create a request to send math_problem to "deepseek-ai/DeepSeek-V4-Pro".
  • Set reasoning_effort to "max" to crank up the thinking intensity.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

client = OpenAI(api_key="", base_url="https://api.together.xyz/v1")

# Crank up the reasoning effort
response = client.chat.completions.create(
    model="deepseek-ai/____",
    reasoning_effort=____,
    max_tokens=600,
    messages=[
        {"role": "user",
         "content": math_problem}]
)

print(response.choices[0].message.content)
Edit and Run Code