Skip to content

Commit 4f386a0

Browse files
authored
Merge pull request #6773 from MicrosoftDocs/release-2025-openai-v1-staggered
[Release Branch --> Main Tracking branch] release-2025-openai-v1-staggered
2 parents 9fbc250 + 31eb36e commit 4f386a0

File tree

4 files changed

+6117
-1372
lines changed

4 files changed

+6117
-1372
lines changed

articles/ai-foundry/openai/api-version-lifecycle.md

Lines changed: 48 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: cognitive-services
55
manager: nitinme
66
ms.service: azure-ai-openai
77
ms.topic: conceptual
8-
ms.date: 05/25/2025
8+
ms.date: 08/26/2025
99
author: mrbullwinkle
1010
ms.author: mbullwin
1111
recommendations: false
@@ -17,18 +17,28 @@ ms.custom:
1717
This article is to help you understand the support lifecycle for Azure OpenAI APIs.
1818

1919
> [!NOTE]
20-
> New API response objects may be added to the API response without version changes. We recommend you only parse the response objects you require.
20+
> New API response objects may be added to the API response at any time. We recommend you only parse the response objects you require.
2121
>
22-
> The `2025-04-01-preview` Azure OpenAI spec uses OpenAPI 3.1, is a known issue that this is currently not fully supported by [Azure API Management](/azure/api-management/api-management-key-concepts)
2322
2423
## API evolution
2524

26-
Historically, Azure OpenAI received monthly updates of new API versions. Taking advantage of new features required constantly updating code and environment variables with each new API release. Azure OpenAI also required the extra step of using Azure specific clients which created overhead when migrating code between OpenAI and Azure OpenAI. Starting in May 2025, you can now opt in to our next generation of v1 Azure OpenAI APIs which add support for:
25+
Previously, Azure OpenAI received monthly updates of new API versions. Taking advantage of new features required constantly updating code and environment variables with each new API release. Azure OpenAI also required the extra step of using Azure specific clients which created overhead when migrating code between OpenAI and Azure OpenAI.
2726

28-
- Ongoing access to the latest features with no need to update `api-version` each month.
27+
Starting in August 2025, you can now opt in to our next generation v1 Azure OpenAI APIs which add support for:
28+
29+
- Ongoing access to the latest features with no need specify new `api-version`'s each month.
30+
- Faster API release cycle with new features launching more frequently.
2931
- OpenAI client support with minimal code changes to swap between OpenAI and Azure OpenAI when using key-based authentication.
32+
- OpenAI client support for token based authentication and automatic token refresh without the need to take a dependency on a separate Azure OpenAI client will be added for all currently supported languages. Adding support for this functionality is **coming soon** for the [Python](https://pypi.org/project/openai/), and the [TypeScript/JavaScript](https://github.com/openai/openai-node) libraries. .NET, Java, and Go support is currently available in preview.
33+
34+
Access to new API calls that are still in preview will be controlled by passing feature specific preview headers allowing you to opt in to the features you want, without having to swap API versions. Alternatively, some features will indicate preview status through their API path and don't require an additional header.
35+
36+
Examples:
3037

31-
For the initial preview launch we are only supporting a subset of the inference API. While in preview, operations may have incomplete functionality that will be continually expanded.
38+
- `/openai/v1/evals` is in preview and requires passing an `"aoai-evals":"preview"` header.
39+
- `/openai/v1/fine_tuning/alpha/graders/` is in preview and requires no custom header due to the presence of `alpha` in the API path.
40+
41+
For the initial v1 GA API launch we're only supporting a subset of the inference and authoring API capabilities. We'll be rapidly adding support for more capabilities soon.
3242

3343
## Code changes
3444

@@ -62,8 +72,7 @@ from openai import OpenAI
6272

6373
client = OpenAI(
6474
api_key=os.getenv("AZURE_OPENAI_API_KEY"),
65-
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
66-
default_query={"api-version": "preview"},
75+
base_url="https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/"
6776
)
6877

6978
response = client.responses.create(
@@ -76,9 +85,7 @@ print(response.model_dump_json(indent=2))
7685

7786
- `OpenAI()` client is used instead of `AzureOpenAI()`.
7887
- `base_url` passes the Azure OpenAI endpoint and `/openai/v1` is appended to the endpoint address.
79-
- `default_query={"api-version": "preview"}` indicates that the version-less always up-to-date preview API is being used.
80-
81-
Once we release the GA next generation v1 API, you will no longer need to specify api-version at all. Access to new features that are still in preview will be controlled by passing feature specific headers to access the preview feature.
88+
- `api-version` is no longer a required parameter with the v1 GA API.
8289

8390
# [Microsoft Entra ID](#tab/entra)
8491

@@ -108,19 +115,20 @@ print(response.model_dump_json(indent=2))
108115

109116
### Next generation API
110117

118+
> [!IMPORTANT]
119+
> Handling automatic token refresh was previously handled through use of the `AzureOpenAI()` client. The v1 API will remove this dependency, but adding automatic token refresh support to the `OpenAI()` client is still in progress. The example below is the current proposed structure, but it may be subject to change. The code below is for example purposes only, and won't execute successfully until the updated OpenAI library is released.
111120
112121
```python
113-
from openai import AzureOpenAI
122+
from openai import OpenAI
114123
from azure.identity import DefaultAzureCredential, get_bearer_token_provider
115124

116125
token_provider = get_bearer_token_provider(
117126
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
118127
)
119128

120-
client = AzureOpenAI(
129+
client = OpenAI(
121130
base_url = "https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/",
122-
azure_ad_token_provider=token_provider,
123-
api_version="preview"
131+
api_key=lamba: fetch_azure_token()
124132
)
125133

126134
response = client.responses.create(
@@ -133,9 +141,7 @@ print(response.model_dump_json(indent=2))
133141

134142
- `AzureOpenAI()` is used to take advantage of automatic token refresh provided by `azure_ad_token_provider`.
135143
- `base_url` passes the Azure OpenAI endpoint and `/openai/v1` is appended to the endpoint address.
136-
- `api-version="preview"` indicates that the version-less always up-to-date preview API is being used.
137-
138-
Once we release the GA next generation v1 API, we will support two values: `latest` and `preview`. If `api-version` is not passed traffic is automatically routed to the `latest` GA version. Currently only `preview` is supported.
144+
- `api_key` parameter will call `fetch_azure_token()`, enabling automatic retrieval and refresh of an authentication token instead of using a static API key.
139145

140146
# [REST](#tab/rest)
141147

@@ -257,13 +263,29 @@ curl -X POST https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/responses?api
257263

258264
---
259265

260-
## Preview API releases
266+
## v1 API support
261267

262-
Azure OpenAI API latest releases:
268+
### Status
263269

264-
- [**NEW** v1 Preview API](reference-preview-latest.md)
265-
- Inference: [2025-04-01-preview](reference-preview.md)
266-
- Authoring: [2025-04-01-preview](authoring-reference-preview.md)
270+
| API Path | Status |
271+
|----------------------------------------|---------------------|
272+
| `/openai/v1/chat/completions` | Generally Available |
273+
| `/openai/v1/embeddings` | Generally Available |
274+
| `/openai/v1/evals` | Preview |
275+
| `/openai/v1/files` | Generally Available |
276+
| `/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints/{fine_tuning_checkpoint_id}/copy` | Preview |
277+
| `/openai/v1/fine_tuning/alpha/graders/`| Preview |
278+
| `/openai/v1/fine_tuning/` | Generally Available |
279+
| `/openai/v1/models` | Generally Available |
280+
| `/openai/v1/responses` | Generally Available |
281+
| `/openai/v1/vector_stores` | Generally Available |
282+
283+
### Preview headers
284+
285+
| API Path | Header |
286+
|---------------------------------------|:-------------------------|
287+
| `/openai/v1/evals` | `"aoai-evals":"preview"` |
288+
| `/openai/v1/fine_tuning/jobs/{fine_tuning_job_id}/checkpoints/{fine_tuning_checkpoint_id}/copy` | `"aoai-copy-ft-checkpoints" : "preview"` |
267289

268290
## Changes between v1 preview release and 2025-04-01-preview
269291

@@ -303,7 +325,7 @@ Azure OpenAI API latest releases:
303325

304326
## Changes between 2024-09-01-preview and 2024-08-01-preview
305327

306-
- `max_completion_tokens` added to support `o1-preview` and `o1-mini` models. `max_tokens` does not work with the **o1 series** models.
328+
- `max_completion_tokens` added to support `o1-preview` and `o1-mini` models. `max_tokens` doesn't work with the **o1 series** models.
307329
- `parallel_tool_calls` added.
308330
- `completion_tokens_details` & `reasoning_tokens` added.
309331
- `stream_options` & `include_usage` added.
@@ -344,13 +366,10 @@ Azure OpenAI API latest releases:
344366

345367
Azure OpenAI API version [2024-10-21](./reference.md) is currently the latest GA API release. This API version is the replacement for the previous `2024-06-01` GA API release.
346368

347-
## Updating API versions
348-
349-
We recommend first testing the upgrade to new API versions to confirm there's no impact to your application from the API update before making the change globally across your environment.
369+
## Known issues
350370

351-
If you're using the OpenAI Python or JavaScript client libraries, or the REST API, you'll need to update your code directly to the latest preview API version.
371+
- The `2025-04-01-preview` Azure OpenAI spec uses OpenAPI 3.1, is a known issue that this is currently not fully supported by [Azure API Management](/azure/api-management/api-management-key-concepts)
352372

353-
If you're using one of the Azure OpenAI SDKs for C#, Go, or Java, you'll instead need to update to the latest version of the SDK. Each SDK release is hardcoded to work with specific versions of the Azure OpenAI API.
354373

355374
## Next steps
356375

0 commit comments

Comments
 (0)