Skip to content

Commit dd9ae3c

Browse files
Merge pull request #6776 from mrbullwinkle/mrb_08_26_2025_v1_009
[Release Branch] [Azure OpenAI] v1 Updates
2 parents c5feb12 + 087de37 commit dd9ae3c

File tree

2 files changed

+44
-46
lines changed

2 files changed

+44
-46
lines changed

articles/ai-foundry/openai/how-to/reasoning.md

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Azure OpenAI's advanced GPT-5 series, o3-mini, o1,
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: include
8-
ms.date: 08/15/2025
8+
ms.date: 08/27/2025
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
---
@@ -46,7 +46,7 @@ Azure OpenAI reasoning models are designed to tackle reasoning and problem-solvi
4646

4747
| **Feature** | **gpt-5**, **2025-08-07** | **gpt-5-mini**, **2025-08-07** | **gpt-5-nano**, **2025-08-07** |
4848
|:-------------------|:--------------------------:|:------:|:--------:|
49-
| **API Version** | [v1 preview](../api-version-lifecycle.md#api-evolution) | [v1 preview](../api-version-lifecycle.md#api-evolution) | [v1 preview](../api-version-lifecycle.md#api-evolution) |
49+
| **API Version** | [v1](../api-version-lifecycle.md#api-evolution) | [v1](../api-version-lifecycle.md#api-evolution) | [v1](../api-version-lifecycle.md#api-evolution) |
5050
| **[Developer Messages](#developer-messages)** ||||
5151
| **[Structured Outputs](./structured-outputs.md)** ||||
5252
| **[Context Window](../concepts/models.md#o-series-models)** | 400,000 <br><br>Input: 272,000 <br> Output: 128,000 | 400,000 <br><br> Input: 272,000 <br> Output: 128,000 | 400,000 <br><br> Input: 272,000 <br> Output: 128,000 |
@@ -83,7 +83,7 @@ For more information, we also recommend reading OpenAI's [GPT-5 prompting cookbo
8383

8484
| **Feature** | **codex-mini**, **2025-05-16** | **o3-pro**, **2025-06-10** | **o4-mini**, **2025-04-16** | **o3**, **2025-04-16** | **o3-mini**, **2025-01-31** |**o1**, **2024-12-17** | **o1-mini**, **2024-09-12** |
8585
|:-------------------|:--------------------------:|:------:|:--------|:-----:|:-------:|:--------------------------:|:---:|
86-
| **API Version** | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) |
86+
| **API Version** | `2025-04-01-preview` & [v1](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) | `2025-04-01-preview` & [v1 preview](../api-version-lifecycle.md#api-evolution) |
8787
| **[Developer Messages](#developer-messages)** ||||||| - |
8888
| **[Structured Outputs](./structured-outputs.md)** ||||||| - |
8989
| **[Context Window](../concepts/models.md#o-series-models)** | Input: 200,000 <br> Output: 100,000 | Input: 200,000 <br> Output: 100,000 | Input: 200,000 <br> Output: 100,000 | Input: 200,000 <br> Output: 100,000 | Input: 200,000 <br> Output: 100,000 | Input: 200,000 <br> Output: 100,000 | Input: 128,000 <br> Output: 65,536 |
@@ -118,32 +118,25 @@ The following are currently unsupported with reasoning models:
118118

119119
These models [don't currently support the same set of parameters](#api--feature-support) as other models that use the chat completions API.
120120

121-
# [Python (Microsoft Entra ID)](#tab/python-secure)
121+
# [Python (key-based auth)](#tab/python)
122122

123-
You'll need to upgrade your OpenAI client library for access to the latest parameters.
123+
You might need to upgrade your version of the OpenAI Python library to take advantage of the new parameters like `max_completion_tokens`.
124124

125125
```cmd
126126
pip install openai --upgrade
127127
```
128128

129-
If you're new to using Microsoft Entra ID for authentication see [How to configure Azure OpenAI in Azure AI Foundry Models with Microsoft Entra ID authentication](../how-to/managed-identity.md).
130-
131129
```python
132-
from openai import AzureOpenAI
133-
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
130+
import os
131+
from openai import OpenAI
134132

135-
token_provider = get_bearer_token_provider(
136-
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
137-
)
138-
139-
client = AzureOpenAI(
140-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
141-
azure_ad_token_provider=token_provider,
142-
api_version="2025-03-01-preview"
133+
client = OpenAI(
134+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
135+
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
143136
)
144137

145138
response = client.chat.completions.create(
146-
model="o1-new", # replace with your model deployment name
139+
model="gpt-5-mini", # replace with the model deployment name of your o1 deployment.
147140
messages=[
148141
{"role": "user", "content": "What steps should I think about when writing my first Python API?"},
149142
],
@@ -154,26 +147,32 @@ response = client.chat.completions.create(
154147
print(response.model_dump_json(indent=2))
155148
```
156149

157-
# [Python (key-based auth)](#tab/python)
150+
# [Python (Microsoft Entra ID)](#tab/python-secure)
158151

159-
You might need to upgrade your version of the OpenAI Python library to take advantage of the new parameters like `max_completion_tokens`.
152+
You'll need to upgrade your OpenAI client library for access to the latest parameters.
160153

161154
```cmd
162155
pip install openai --upgrade
163156
```
164157

165-
```python
158+
If you're new to using Microsoft Entra ID for authentication see [How to configure Azure OpenAI in Azure AI Foundry Models with Microsoft Entra ID authentication](../how-to/managed-identity.md).
166159

160+
```python
167161
from openai import AzureOpenAI
162+
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
163+
164+
token_provider = get_bearer_token_provider(
165+
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
166+
)
168167

169168
client = AzureOpenAI(
170169
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
171-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
172-
api_version="2025-03-01-preview"
170+
azure_ad_token_provider=token_provider,
171+
api_version="2025-04-01-preview"
173172
)
174173

175174
response = client.chat.completions.create(
176-
model="o1-new", # replace with the model deployment name of your o1 deployment.
175+
model="o1-new", # replace with your model deployment name
177176
messages=[
178177
{"role": "user", "content": "What steps should I think about when writing my first Python API?"},
179178
],
@@ -325,70 +324,69 @@ Functionally developer messages ` "role": "developer"` are the same as system me
325324

326325
Adding a developer message to the previous code example would look as follows:
327326

328-
# [Python (Microsoft Entra ID)](#tab/python-secure)
327+
# [Python (key-based auth)](#tab/python)
329328

330-
You'll need to upgrade your OpenAI client library for access to the latest parameters.
329+
You might need to upgrade your version of the OpenAI Python library to take advantage of the new parameters like `max_completion_tokens`.
331330

332331
```cmd
333332
pip install openai --upgrade
334333
```
335334

336-
If you're new to using Microsoft Entra ID for authentication see [How to configure Azure OpenAI with Microsoft Entra ID authentication](../how-to/managed-identity.md).
337-
338335
```python
339-
from openai import AzureOpenAI
340-
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
341-
342-
token_provider = get_bearer_token_provider(
343-
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
344-
)
336+
import os
337+
from openai import OpenAI
345338

346-
client = AzureOpenAI(
347-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
348-
azure_ad_token_provider=token_provider,
349-
api_version="2025-04-01-preview"
339+
client = OpenAI(
340+
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
341+
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
350342
)
351343

352344
response = client.chat.completions.create(
353-
model="o1-new", # replace with your model deployment name
345+
model="gpt-5-mini", # replace with the model deployment name of your o1 deployment.
354346
messages=[
355347
{"role": "developer","content": "You are a helpful assistant."}, # optional equivalent to a system message for reasoning models
356348
{"role": "user", "content": "What steps should I think about when writing my first Python API?"},
357349
],
358350
max_completion_tokens = 5000,
359351
reasoning_effort = "medium" # low, medium, or high
360-
361352
)
362353

363354
print(response.model_dump_json(indent=2))
364355
```
365356

366-
# [Python (key-based auth)](#tab/python)
357+
# [Python (Microsoft Entra ID)](#tab/python-secure)
367358

368-
You might need to upgrade your version of the OpenAI Python library to take advantage of the new parameters like `max_completion_tokens`.
359+
You'll need to upgrade your OpenAI client library for access to the latest parameters.
369360

370361
```cmd
371362
pip install openai --upgrade
372363
```
373364

374-
```python
365+
If you're new to using Microsoft Entra ID for authentication see [How to configure Azure OpenAI with Microsoft Entra ID authentication](../how-to/managed-identity.md).
375366

367+
```python
376368
from openai import AzureOpenAI
369+
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
370+
371+
token_provider = get_bearer_token_provider(
372+
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
373+
)
377374

378375
client = AzureOpenAI(
379376
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
380-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
377+
azure_ad_token_provider=token_provider,
381378
api_version="2025-04-01-preview"
382379
)
383380

384381
response = client.chat.completions.create(
385-
model="o1-new", # replace with the model deployment name of your o1 deployment.
382+
model="o1-new", # replace with your model deployment name
386383
messages=[
387384
{"role": "developer","content": "You are a helpful assistant."}, # optional equivalent to a system message for reasoning models
388385
{"role": "user", "content": "What steps should I think about when writing my first Python API?"},
389386
],
390387
max_completion_tokens = 5000,
391388
reasoning_effort = "medium" # low, medium, or high
389+
392390
)
393391

394392
print(response.model_dump_json(indent=2))

articles/ai-foundry/openai/how-to/responses.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: Learn how to use Azure OpenAI's new stateful Responses API.
55
author: mrbullwinkle
66
ms.author: mbullwin
77
manager: nitinme
8-
ms.date: 08/07/2025
8+
ms.date: 08/27/2025
99
ms.service: azure-ai-openai
1010
ms.topic: include
1111
ms.custom:

0 commit comments

Comments
 (0)