Skip to content

Commit 21c9d16

Browse files
Merge pull request #7388 from mrbullwinkle/mrb_09_30_2025_freshness_005
[Azure OpenAI] Freshness 005
2 parents 8e088bb + 333629b commit 21c9d16

File tree

5 files changed

+30
-28
lines changed

5 files changed

+30
-28
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Monitor Azure OpenAI in Azure AI Foundry Models
33
description: Start here to learn how to use Azure Monitor tools like Log Analytics to capture and analyze metrics and data logs for your Azure OpenAI.
4-
ms.date: 07/02/2025
4+
ms.date: 09/30/2025
55
ms.custom: horz-monitor, subject-monitoring
66
ms.topic: conceptual
77
author: mrbullwinkle

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ The responses API is currently available in the following regions:
4444

4545
### Model support
4646

47+
- `gpt-5-codex` (Version: `2025-09-11`)
4748
- `gpt-5` (Version: `2025-08-07`)
4849
- `gpt-5-mini` (Version: `2025-08-07`)
4950
- `gpt-5-nano` (Version: `2025-08-07`)

articles/ai-foundry/openai/how-to/structured-outputs.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Structured outputs make a model follow a [JSON Schema](https://json-schema.org/o
2525
2626
## Supported models
2727

28+
- `gpt-5-codex` version `2025-09-11`
2829
- `gpt-5` version `2025-08-07`
2930
- `gpt-5-mini` version `2025-08-07`
3031
- `gpt-5-nano` version `2025-08-07`
@@ -43,7 +44,7 @@ Structured outputs make a model follow a [JSON Schema](https://json-schema.org/o
4344

4445
## API support
4546

46-
Support for structured outputs was first added in API version `2024-08-01-preview`. It is available in the latest preview APIs as well as the latest GA API: `2024-10-21`.
47+
Support for structured outputs was first added in API version `2024-08-01-preview`. It is available in the latest preview APIs as well as the latest GA API: `v1`.
4748

4849

4950
::: zone pivot="programming-language-python"

articles/ai-foundry/openai/includes/structured-outputs-python.md

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
ms.service: azure-ai-openai
33
ms.topic: how-to
4-
ms.date: 05/25/2025
4+
ms.date: 09/30/2025
55
author: mrbullwinkle
66
ms.author: mbullwin
77
zone_pivot_groups: structured-outputs
@@ -22,20 +22,18 @@ If you are new to using Microsoft Entra ID for authentication see [How to config
2222
```python
2323
import os
2424
from pydantic import BaseModel
25-
from openai import AzureOpenAI
25+
from openai import OpenAI
2626
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
2727

2828
token_provider = get_bearer_token_provider(
2929
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
3030
)
3131

32-
client = AzureOpenAI(
33-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
34-
azure_ad_token_provider=token_provider,
35-
api_version="2024-10-21"
32+
client = OpenAI(
33+
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
34+
api_key=token_provider,
3635
)
3736

38-
3937
class CalendarEvent(BaseModel):
4038
name: str
4139
date: str
@@ -108,15 +106,13 @@ pip install openai pydantic --upgrade
108106
```python
109107
import os
110108
from pydantic import BaseModel
111-
from openai import AzureOpenAI
109+
from openai import OpenAI
112110

113-
client = AzureOpenAI(
114-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
115-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
116-
api_version="2024-10-21"
111+
client = OpenAI(
112+
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
113+
api_key=os.getenv("AZURE_OPENAI_API_KEY")
117114
)
118115

119-
120116
class CalendarEvent(BaseModel):
121117
name: str
122118
date: str
@@ -193,15 +189,17 @@ Structured Outputs for function calling can be enabled with a single parameter,
193189
from enum import Enum
194190
from typing import Union
195191
from pydantic import BaseModel
196-
import openai
197-
from openai import AzureOpenAI
192+
from openai import OpenAI
193+
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
198194

199-
client = AzureOpenAI(
200-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
201-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
202-
api_version="2024-10-21"
195+
token_provider = get_bearer_token_provider(
196+
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
203197
)
204198

199+
client = OpenAI(
200+
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
201+
api_key=token_provider,
202+
)
205203

206204
class GetDeliveryDate(BaseModel):
207205
order_id: str
@@ -229,14 +227,14 @@ from enum import Enum
229227
from typing import Union
230228
from pydantic import BaseModel
231229
import openai
232-
from openai import AzureOpenAI
230+
from openai import OpenAI
233231

234-
client = AzureOpenAI(
235-
azure_endpoint = os.getenv("AZURE_OPENAI_ENDPOINT"),
236-
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
237-
api_version="2024-10-21"
232+
client = OpenAI(
233+
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
234+
api_key=os.getenv("AZURE_OPENAI_API_KEY")
238235
)
239236

237+
240238
class GetDeliveryDate(BaseModel):
241239
order_id: str
242240

articles/ai-foundry/openai/includes/structured-outputs-rest.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ zone_pivot_groups: structured-outputs
1212
`response_format` is set to `json_schema` with `strict: true` set.
1313

1414
```bash
15-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-10-21 \
15+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/v1/chat/completions \
1616
-H "api-key: $AZURE_OPENAI_API_KEY" \
1717
-H "Content-Type: application/json" \
1818
-d '{
19+
"model": "YOUR_MODEL_DEPLOYMENT_NAME",
1920
"messages": [
2021
{"role": "system", "content": "Extract the event information."},
2122
{"role": "user", "content": "Alice and Bob are going to a science fair on Friday."}
@@ -85,10 +86,11 @@ Output:
8586
## Function calling with structured outputs
8687

8788
```bash
88-
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/deployments/YOUR_MODEL_DEPLOYMENT_NAME/chat/completions?api-version=2024-10-21 \
89+
curl -X POST https://YOUR_RESOURCE_NAME.openai.azure.com/openai/v1/chat/completions \
8990
-H "api-key: $AZURE_OPENAI_API_KEY" \
9091
-H "Content-Type: application/json" \
9192
-d '{
93+
"model": "YOUR_MODEL_DEPLOYMENT_NAME",
9294
"messages": [
9395
{
9496
"role": "system",

0 commit comments

Comments
 (0)