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

# Reasoning

Configure reasoning to improve model performance on complex tasks.

***

Reasoning-capable language models can spend additional computation to "think" through problems step-by-step before generating a final response. This can improve performance on complex tasks.

You can control this behavior using the `reasoning_effort` parameter. Available values and default behavior depend on the selected model.

Check the **Reasoning** column under [Available Models](https://docs.deploy.com/models-and-pricing.md#available-open-source-models) to see which models support this feature.

***

# **Configure reasoning effort**

You can configure `reasoning_effort` in your API request, which controls how much reasoning the model performs. If not manually set, it will run with its default value, which is model-dependent.

```python Python theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://api-cdn.deploy.com/api/v1",
    api_key="DEPLOY_API_KEY",
)

response = client.chat.completions.create(
    model="DEPLOY_MODEL_ID",
    messages=[
        {
            "role": "user",
            "content": "A sequence begins: 2, 6, 12, 20, 30, ... Determine the simplest consistent pattern, calculate the next two terms, and explain how you derived them."
        }
    ],
    reasoning_effort="high",
)

print(response.choices[0].message.content)
```

```bash cURL theme={null}
curl https://api-cdn.deploy.com/api/v1/chat/completions \
  -H "Authorization: Bearer $DEPLOY_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{
    "model": "DEPLOY_MODEL_ID",
    "messages": [
      {
        "role": "user",
        "content": "A sequence begins: 2, 6, 12, 20, 30, ... Determine the simplest consistent pattern, calculate the next two terms, and explain how you derived them."
      }
    ],
    "reasoning_effort": "high"
  }'
```

# **Choosing reasoning effort level**

Consider your task's complexity, your application's latency, and your token budget. Higher effort can improve performance on complex tasks, but can also increase latency and output token consumption.

* **Default effort**: Use the model's default unless you have established that another setting performs better for your use case.
* **Lower effort**: Best-suited for simple tasks and latency-sensitive requests.
* **Higher effort**: Best-suited for complex debugging, mathematical problems, multi-step analysis, and planning.
* **None**: Disables thinking, making the model behave like a standard chat model.

Models use internal `reasoning_tokens` before producing a response. These are billed and counted as output tokens.

***

# **Model-specific behavior**

Available reasoning effort values and default behavior varies between models. See the model-specific documentation for more details.

<table>
  <colgroup>
    <col width="198" />

    <col width="269" />

    <col width="210" />
  </colgroup>

  <thead>
    <tr>
      <th>**Model**</th>
      <th>**Available Values**</th>
      <th>**Default Value**</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>[DeepSeek V4.1 Flash 1017](https://docs.deploy.com/deepseek-v4-1-flash-1017.md)</td>
      <td>`none`, `low`, `high`, `max`</td>
      <td>`high`</td>
    </tr>

    <tr>
      <td>[GLM 5.3 Flash](https://docs.deploy.com/glm-5-3-flash.md)</td>
      <td>`low`, `high`, `max`</td>
      <td>`high`</td>
    </tr>
  </tbody>
</table>

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.