For models with chain-of-thought (DeepSeek-R1, Qwen3), control reasoning depth with the reasoning_effort parameter.
Reasoning effort levels
response = client.chat.completions.create(
model="forii/deepseek-r1",
messages=[{"role": "user", "content": "Solve: x² - 5x + 6 = 0"}],
reasoning_effort="high", # none | low | medium | high
)
| Level | Behavior | Use case |
|---|
none | No chain-of-thought | Simple lookups, classification |
low | Brief reasoning | Straightforward tasks |
medium | Moderate reasoning | Standard problems |
high | Deep reasoning | Math, logic, complex analysis |
The reasoning_effort parameter is a Forii extension. It maps to the model’s internal chain-of-thought configuration. Higher effort = more tokens = higher cost. Use none or low for simple tasks to save credits.
Reading reasoning output
The model’s chain-of-thought is returned in the reasoning_content field:
response = client.chat.completions.create(
model="forii/deepseek-r1",
messages=[{"role": "user", "content": "Solve: x² - 5x + 6 = 0"}],
reasoning_effort="high",
)
# The final answer
print(response.choices[0].message.content)
# "The solutions are x = 2 and x = 3."
# The chain-of-thought (reasoning process)
print(response.choices[0].message.reasoning_content)
# "Let me factor the quadratic: x² - 5x + 6 = (x-2)(x-3) = 0..."
Available reasoning models
| Model | Reasoning support |
|---|
forii/deepseek-r1 | Full chain-of-thought with reasoning_effort |
forii/qwen3 | Full chain-of-thought with reasoning_effort |
forii/deepseek-v3 | Not a reasoning model — reasoning_effort has no effect |
reasoning_effort only affects reasoning models. On standard models like DeepSeek-V3, it is silently ignored.