> ## Documentation Index
> Fetch the complete documentation index at: https://docs.forii.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reasoning Models

> Control chain-of-thought depth for reasoning models like DeepSeek-R1 and Qwen3.

For models with chain-of-thought (DeepSeek-R1, Qwen3), control reasoning depth with the `reasoning_effort` parameter.

## Reasoning effort levels

```python theme={null}
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  |

<Info>
  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.
</Info>

## Reading reasoning output

The model's chain-of-thought is returned in the `reasoning_content` field:

```python theme={null}
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 |

<Warning>
  `reasoning_effort` only affects reasoning models. On standard models like DeepSeek-V3, it is silently ignored.
</Warning>
