Skip to main content
Reasoning refers to model behaviors that spend extra budget on problem solving and may expose that work through typed output. The exact request controls and visible output depend on the public API and model.

Support Matrix

APIRequest controlsVisible outputNotes
Responsesreasoning.effortreasoning items in output[] and reasoning stream eventsBest starting point for new work
Chat Completionsreasoning_effort on supported modelsassistant message fields such as reasoning_details or reasoning_contentUse for OpenAI chat compatibility
Messagesthinking and output_config.effortAnthropic thinking blocks and thinking eventsUse for Anthropic compatibility

Reasoning Effort

When reasoning effort is supported, the normalized values used in the docs are:
  • none
  • minimal
  • low
  • medium
  • high
  • xhigh
Higher effort usually increases latency and cost. Start low, then raise it only when the extra quality is worth it.
In Messages, output_config is a reasoning control, not a generic structured-output feature.

When To Use It

  • hard planning or decomposition tasks
  • agent workflows that need stronger tool selection and longer deliberation
  • tasks where quality matters more than minimal latency
from openai import OpenAI

client = OpenAI(
    base_url="https://api.naga.ac/v1",
    api_key="YOUR_API_KEY",
)

response = client.responses.create(
    model="gpt-5",
    input="Explain the likely root cause of a slow PostgreSQL query and suggest the first two checks.",
    reasoning={"effort": "medium"},
)

print(response.output)
On Responses, visible reasoning can arrive as reasoning items before or alongside message items. On Chat Completions and Messages, it appears in protocol-specific fields and blocks instead.

Preserving Reasoning Across Turns

If a model pauses for tool use and you continue the conversation in another request, preserve any reasoning payload from that assistant turn unchanged.
  • Responses: replay the prior reasoning item unchanged in the next input[] turn if you want to preserve reasoning continuity
  • Chat Completions: if an assistant turn includes reasoning_details, send those details back unchanged with that assistant message when you append the later role: tool result
  • Messages: if an assistant turn includes thinking blocks, replay those blocks unchanged, including any signature, before the later tool_result block
Changing or dropping encrypted reasoning/signature data can break reasoning continuity across turns.