Skip to main content
Azure OpenAI reasoning models are designed to tackle reasoning and problem-solving tasks with increased focus and capability. These models spend more time processing and understanding the user’s request, making them exceptionally strong in areas like science, coding, and math compared to previous iterations. Key capabilities of reasoning models:
  • Complex Code Generation: Capable of generating algorithms and handling advanced coding tasks to support developers.
  • Advanced Problem Solving: Ideal for comprehensive brainstorming sessions and addressing multifaceted challenges.
  • Complex Document Comparison: Perfect for analyzing contracts, case files, or legal documents to identify subtle differences.
  • Instruction Following and Workflow Management: Particularly effective for managing workflows requiring shorter contexts.

Prerequisites

  • An Azure OpenAI reasoning model deployed.
  • If you use the REST examples:
    • Install the Azure CLI. For more information, see Install the Azure CLI.
    • Sign in with az login, then generate a bearer token and store it in the AZURE_OPENAI_AUTH_TOKEN environment variable.

Usage

These models don’t currently support the same set of parameters as other models that use the chat completions API.

Chat completions API

Reasoning effort

Reasoning models have reasoning_tokens as part of completion_tokens_details in the model response. These are hidden tokens that aren’t returned as part of the message response content but are used by the model to help generate a final answer to your request. reasoning_effort can be set to low, medium, or high for all reasoning models except o1-mini. The higher the effort setting, the longer the model will spend processing the request, which will generally result in a larger number of reasoning_tokens.

Developer messages

Developer messages ("role": "developer") are functionally the same as system messages. Adding a developer message to the previous code example would look as follows:

Reasoning summary

When using the latest reasoning models with the Responses API you can use the reasoning summary parameter to receive summaries of the model’s chain of thought reasoning.
Attempting to extract raw reasoning through methods other than the reasoning summary parameter are not supported, may violate the Acceptable Use Policy, and may result in throttling or suspension when detected.
Even when enabled, reasoning summaries are not guaranteed to be generated for every step/request. This is expected behavior.

Python lark

GPT-5 series reasoning models have the ability to call a new custom_tool called lark_tool. This tool is based on Python lark and can be used for more flexible constraining of model output.

Responses API

Microsoft Entra ID:
API Key:
Output:

Chat Completions

Availability

Region availability

API & feature support

Input and output limits share the available context budget and aren’t additive. For details and a GPT-5.5 calculation example, see Understand model token limits and Responses API token budget.
1 Parallel tool calls are not supported when reasoning_effort is set to minimal

2 Reasoning models will only work with the max_completion_tokens parameter when using the Chat Completions API. Use max_output_tokens with the Responses API.

3 The latest reasoning models support system messages to make migration easier. You should not use both a developer message and a system message in the same API request.

4 gpt-5.1 reasoning_effort defaults to none. When upgrading from previous reasoning models to gpt-5.1 keep in mind that you may need to update your code to explicitly pass a reasoning_effort level if you want reasoning_effort to occur.

5 gpt-5-pro only supports reasoning_effort high, this is the default value even when not explicitly passed to the model.

6 gpt-5.1-codex-max adds support for a new reasoning_effort level of xhigh which is the highest level that reasoning effort can be set to.

7 gpt-5.6, gpt-5.5, gpt-5.4, gpt-5.2, gpt-5.1, gpt-5.1-codex, gpt-5.1-codex-max, and gpt-5.1-codex-mini support 'None' as a value for the reasoning_effort parameter. To use these models to generate responses without reasoning, set reasoning_effort='None'. This setting can increase speed.

NEW GPT-5 reasoning features

* gpt-5-codex also does not support reasoning_effort minimal.For more information, we also recommend reading OpenAI’s GPT-5 prompting cookbook guide and their GPT-5 feature guide.
  • To avoid timeouts background mode is recommended for o3-pro.
  • o3-pro does not currently support image generation.

Not Supported

The following are currently unsupported with reasoning models:
  • temperature, top_p, presence_penalty, frequency_penalty, logprobs, top_logprobs, logit_bias, max_tokens

Markdown output

By default the o3-mini and o1 models will not attempt to produce output that includes markdown formatting. A common use case where this behavior is undesirable is when you want the model to output code contained within a markdown code block. When the model generates output without markdown formatting you lose features like syntax highlighting, and copyable code blocks in interactive playground experiences. To override this new default behavior and encourage markdown inclusion in model responses, add the string Formatting re-enabled to the beginning of your developer message. Adding Formatting re-enabled to the beginning of your developer message does not guarantee that the model will include markdown formatting in its response, it only increases the likelihood. We have found from internal testing that Formatting re-enabled is less effective by itself with the o1 model than with o3-mini. To improve the performance of Formatting re-enabled you can further augment the beginning of the developer message which will often result in the desired output. Rather than just adding Formatting re-enabled to the beginning of your developer message, you can experiment with adding a more descriptive initial instruction like one of the examples below:
  • Formatting re-enabled - please enclose code blocks with appropriate markdown tags.
  • Formatting re-enabled - code output should be wrapped in markdown.
Depending on your expected output you may need to customize your initial developer message further to target your specific use case.