Skip to main content
Reasoning models spend more computation on difficult problems before returning an answer. They are useful for math, logic, programming, planning, analysis, and tasks where a quick general-purpose response is not enough. They can be slower and more expensive than standard chat models, so use them when the task benefits from deeper reasoning.

When to use them

Control reasoning effort

Some OpenAI-compatible reasoning models support reasoning_effort:
Common values: Supported values depend on the selected model.

Reasoning content

Some providers expose a separate reasoning field, such as reasoning_content, while others return only the final answer. If the model exposes reasoning content, your application can display it, store it for debugging, or ignore it. Example response shape:
Field names and availability vary by model provider. For production systems, treat reasoning fields as optional.

Python example

Replace the entire sk-your-api-key value in API_KEY with your actual key. To use another reasoning model, change MODEL. Not every model returns reasoning_content, so the example reads it safely with getattr.

Node.js example

Replace the entire sk-your-api-key value in API_KEY with your actual key. To use another reasoning model, change MODEL. reasoning_content is an optional extension field, so the example checks whether it exists.

Streaming reasoning output

In streaming mode, a provider may send reasoning deltas before final answer deltas. If you choose to display them, keep them visually separate from the final answer and make sure your parser handles missing fields.

Cost and latency

Reasoning tokens usually count toward output usage. A higher reasoning budget may improve quality on hard tasks, but it also increases latency and cost. Monitor usage in dashboard and usage.

Practical guidance

  • Start with a standard model for simple tasks.
  • Use reasoning models for hard tasks with measurable accuracy needs.
  • Keep prompts focused and provide the necessary facts up front.
  • Set reasoning controls only when the selected model supports them.
  • Validate final answers when they affect money, permissions, or user data.

Next steps