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

# Reasoning-Modelle

> Reasoning-Modelle mit sichtbarem Thinking in der Venice API verwenden

Einige Modelle "denken laut", bevor sie antworten. Sie arbeiten Probleme Schritt für Schritt durch und geben dann eine finale Antwort. Das macht sie stärker bei Mathematik-, Code- und logiklastigen Aufgaben.

<div id="reasoning-models-placeholder" />

Die vollständige Liste der Modelle, Preise und Kontextlimits finden Sie auf der [Models-Seite](/models/overview). Nicht alle Reasoning-Modelle unterstützen den Parameter [`reasoning_effort`](#reasoning-effort). Siehe [Modellunterstützung](#model-support) für Details.

## Die Ausgabe lesen

Reasoning-Modelle geben ihr Thinking in einem separaten Feld `reasoning_content` zurück und halten `content` sauber:

<CodeGroup>
  ```python Python theme={"dark"}
  response = client.chat.completions.create(
      model="zai-org-glm-5-1",
      messages=[{"role": "user", "content": "What is 15% of 240?"}]
  )

  thinking = response.choices[0].message.reasoning_content
  answer = response.choices[0].message.content
  ```

  ```javascript Node.js theme={"dark"}
  const response = await client.chat.completions.create({
      model: "zai-org-glm-5-1",
      messages: [{ role: "user", content: "What is 15% of 240?" }]
  });

  const thinking = response.choices[0].message.reasoning_content;
  const answer = response.choices[0].message.content;
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org-glm-5-1",
      "messages": [{"role": "user", "content": "What is 15% of 240?"}]
    }'
  ```
</CodeGroup>

<Info>
  Einige Anbieter (Anthropic, Google, OpenAI, Qwen) geben verschlüsselte oder zusammengefasste Reasoning-Tokens zurück. In diesem Fall enthält `reasoning_content` einen Platzhalter `"[Some reasoning content is encrypted]"`.
</Info>

### Streaming

Beim Streaming kommt `reasoning_content` im Delta vor der finalen Antwort an:

<CodeGroup>
  ```python Python theme={"dark"}
  stream = client.chat.completions.create(
      model="zai-org-glm-5-1",
      messages=[{"role": "user", "content": "Explain photosynthesis"}],
      stream=True
  )

  for chunk in stream:
      if chunk.choices:
          delta = chunk.choices[0].delta
          if delta.reasoning_content:
              print(delta.reasoning_content, end="")
          if delta.content:
              print(delta.content, end="")
  ```

  ```javascript Node.js theme={"dark"}
  const stream = await client.chat.completions.create({
      model: "zai-org-glm-5-1",
      messages: [{ role: "user", content: "Explain photosynthesis" }],
      stream: true
  });

  for await (const chunk of stream) {
      if (chunk.choices?.[0]?.delta) {
          const delta = chunk.choices[0].delta;
          if (delta.reasoning_content) process.stdout.write(delta.reasoning_content);
          if (delta.content) process.stdout.write(delta.content);
      }
  }
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "zai-org-glm-5-1",
      "messages": [{"role": "user", "content": "Explain photosynthesis"}],
      "stream": true
    }'
  ```
</CodeGroup>

## Reasoning effort

Der Parameter `reasoning_effort` steuert, wie viel ein Modell vor der Antwort denkt. Höherer Effort bedeutet tieferes Reasoning, aber mehr Tokens und Latenz.

### Akzeptierte Werte

| Wert      | Beschreibung                                    |
| --------- | ----------------------------------------------- |
| `none`    | Deaktiviert Reasoning vollständig               |
| `minimal` | Grundlegendes Reasoning mit minimalem Aufwand   |
| `low`     | Leichtes Reasoning für einfache Probleme        |
| `medium`  | Ausgewogenes Reasoning für mittlere Komplexität |
| `high`    | Tiefes Reasoning für komplexe Probleme          |
| `xhigh`   | Besonders hohe Reasoning-Tiefe                  |
| `max`     | Maximale Reasoning-Fähigkeit                    |

<Warning>
  Nicht alle Modelle unterstützen alle Werte. Venice mappt **nicht** automatisch auf die nächstgelegene unterstützte Stufe. Nicht unterstützte Werte geben einen 400-Fehler vom Upstream-Anbieter zurück. Beispielsweise schlägt das Senden von `xhigh` an Claude oder `max` an GPT-5.2 fehl.

  Verwenden Sie im Zweifel `low`, `medium` oder `high`. Dies sind die am breitesten unterstützten Werte.
</Warning>

### Modellunterstützung

#### OpenAI

| Modell                       | Unterstützte Werte                       |
| ---------------------------- | ---------------------------------------- |
| GPT-5.2                      | `none`, `low`, `medium`, `high`, `xhigh` |
| GPT-5.2 Codex, GPT-5.3 Codex | `low`, `medium`, `high`, `xhigh`         |

#### Anthropic

| Modell                                  | Unterstützte Werte             |
| --------------------------------------- | ------------------------------ |
| Claude Opus 4.6, Opus 4.6 Fast          | `low`, `medium`, `high`, `max` |
| Claude Opus 4.5, Sonnet 4.5, Sonnet 4.6 | `low`, `medium`, `high`        |

#### Google

| Modell                 | Unterstützte Werte                 |
| ---------------------- | ---------------------------------- |
| Gemini 3 Pro Preview   | `low`, `high`                      |
| Gemini 3.1 Pro Preview | `low`, `medium`, `high`            |
| Gemini 3 Flash Preview | `minimal`, `low`, `medium`, `high` |

#### xAI

Grok-Modelle (Grok 4.1 Fast, Grok Code Fast) unterstützen `reasoning_effort` **nicht**. Die Angabe führt zu einem Fehler.

#### Weitere Modelle

| Modell                                      | Unterstützte Werte                              |
| ------------------------------------------- | ----------------------------------------------- |
| Qwen 3 235B A22B Thinking, Qwen 3.5 35B A3B | `low`, `medium`, `high`                         |
| Kimi K2.5                                   | `low`, `medium`, `high`                         |
| MiniMax M2.5, M2.1                          | `low`, `medium`, `high`                         |
| GLM 5.1-Serie                               | Nur eingebautes Reasoning, nicht konfigurierbar |
| DeepSeek R1                                 | Nur eingebautes Reasoning, nicht konfigurierbar |

### Verwendung

Übergeben Sie `reasoning_effort` als Top-Level-Parameter oder verwenden Sie das verschachtelte Format `reasoning.effort`:

<CodeGroup>
  ```python Python theme={"dark"}
  response = client.chat.completions.create(
      model="minimax-m25",
      messages=[{"role": "user", "content": "Prove that there are infinitely many primes"}],
      extra_body={"reasoning": {"effort": "high"}}
  )
  ```

  ```javascript Node.js theme={"dark"}
  const response = await client.chat.completions.create({
      model: "minimax-m25",
      messages: [{ role: "user", content: "Prove that there are infinitely many primes" }],
      reasoning: { effort: "high" }
  });
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "minimax-m25",
      "messages": [{"role": "user", "content": "Prove that there are infinitely many primes"}],
      "reasoning": {"effort": "high"}
    }'
  ```
</CodeGroup>

Das flache Format `"reasoning_effort": "high"` wird ebenfalls akzeptiert.

## Reasoning deaktivieren

Es gibt zwei Möglichkeiten, Reasoning zu deaktivieren:

| Methode                    | Syntax                            | Funktionsweise                                                                                                                        |
| -------------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `reasoning.enabled: false` | `"reasoning": {"enabled": false}` | Venice-Toggle, der verhindert, dass Reasoning-Parameter an den Anbieter gesendet werden. **Empfohlen.**                               |
| `reasoning.effort: "none"` | `"reasoning": {"effort": "none"}` | Wird an den Anbieter weitergegeben, der entscheidet, wie damit umgegangen wird. Nur von einigen Modellen unterstützt (z. B. GPT-5.x). |

Für Modelle, die es unterstützen, ist `reasoning.enabled: false` die zuverlässigere Option:

| Modell                                       | Kann deaktiviert werden?                  |
| -------------------------------------------- | ----------------------------------------- |
| GPT-5.2                                      | Ja                                        |
| GPT-5.2 Codex, GPT-5.3 Codex                 | Ja (aber `none`-Effort nicht unterstützt) |
| Qwen 3 235B A22B Thinking, Qwen 3.5 35B A3B  | Ja                                        |
| GLM 5.1-Serie                                | Ja                                        |
| Claude Opus 4.5/4.6/4.6 Fast, Sonnet 4.5/4.6 | Nein (immer reasoning)                    |
| Gemini 3 Pro, 3.1 Pro, 3 Flash               | Nein (immer reasoning)                    |
| DeepSeek R1                                  | Nein (immer reasoning)                    |

<CodeGroup>
  ```python Python theme={"dark"}
  response = client.chat.completions.create(
      model="openai-gpt-52",
      messages=[{"role": "user", "content": "What's the capital of France?"}],
      extra_body={"reasoning": {"enabled": False}}
  )
  ```

  ```javascript Node.js theme={"dark"}
  const response = await client.chat.completions.create({
      model: "openai-gpt-52",
      messages: [{ role: "user", content: "What's the capital of France?" }],
      reasoning: { enabled: false }
  });
  ```

  ```bash cURL theme={"dark"}
  curl https://api.venice.ai/api/v1/chat/completions \
    -H "Authorization: Bearer $VENICE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "openai-gpt-52",
      "messages": [{"role": "user", "content": "What is the capital of France?"}],
      "reasoning": {"enabled": false}
    }'
  ```
</CodeGroup>

## Token-Limits

Reasoning-Modelle generieren sichtbare Antwort-Tokens (in `content`) und Reasoning-Tokens (in `reasoning_content`). Beide zählen zu Ihrem Token-Budget.

### Eine Token-Obergrenze setzen

Verwenden Sie `max_completion_tokens`, um die Gesamtzahl der vom Modell generierten Tokens einschließlich Reasoning zu begrenzen:

```json theme={"dark"}
{
  "model": "deepseek-v4-flash",
  "messages": [...],
  "max_completion_tokens": 500
}
```

`max_tokens` wird ebenfalls akzeptiert und verhält sich genauso. Wenn beide gesetzt sind, hat `max_completion_tokens` Vorrang.

Um mehr sichtbare Ausgabe zu erhalten, erhöhen Sie die Obergrenze, senken Sie `reasoning_effort` oder [deaktivieren Sie Reasoning](#disabling-reasoning).

### Die Aufschlüsselung lesen

Das `usage`-Objekt zeigt, wofür Ihr Budget verwendet wurde:

```json theme={"dark"}
"usage": {
  "completion_tokens": 501,
  "completion_tokens_details": { "reasoning_tokens": 169 },
  "prompt_tokens": 13,
  "total_tokens": 514
}
```

In diesem Beispiel wurden 169 Tokens für Reasoning und 332 für die sichtbare Antwort aufgewendet. Wenn die Obergrenze erreicht ist, lautet `finish_reason` `length`.

Die Obergrenze jedes Modells ist als `maxCompletionTokens` am Endpoint [`/v1/models`](/api-reference/endpoint/models/list) verfügbar.

### Nicht-Reasoning-Modelle

`max_tokens` und `max_completion_tokens` verhalten sich bei Nicht-Reasoning-Modellen gleich und begrenzen die sichtbare Ausgabe direkt.

## Capability-Erkennung

Prüfen Sie über den Endpoint [`/v1/models`](/api-reference/endpoint/models/list), was ein Modell unterstützt:

| Feld                      | Bedeutung                                                               |
| ------------------------- | ----------------------------------------------------------------------- |
| `supportsReasoning`       | Modell besitzt Reasoning-Fähigkeit (Chain-of-Thought)                   |
| `supportsReasoningEffort` | Modell akzeptiert den Parameter `reasoning_effort` / `reasoning.effort` |

## Best Practices

* Standardmäßig `medium` für allgemeine Verwendung verwenden
* `high` oder `xhigh` für komplexe Aufgaben (Mathematik, Code, Analyse) verwenden
* `low` für latenzempfindliche Anwendungen verwenden
* `reasoning.enabled: false` verwenden oder Effort auf `none` setzen, um Reasoning zu deaktivieren
* Im Zweifel `low`, `medium` oder `high` verwenden. Dies sind die am breitesten unterstützten Werte
