From 7b9499cb715c896694c7884d9b41d8b90b020381 Mon Sep 17 00:00:00 2001 From: weiqingy Date: Mon, 27 Jul 2026 22:55:20 -0700 Subject: [PATCH] [docs] Use a current GA API version in the Azure OpenAI examples The Azure OpenAI parameter tables and examples used 2024-02-15-preview on the Python side and 2024-02-01 on the Java side. Both are early-2024 versions, and the two languages disagreed for no reason. Use 2024-10-21 in all four places. It is the most recent stable version in the AzureOpenAIServiceVersion enum of the openai-java SDK this project already depends on, so an example that names it stays consistent with what the client supports. --- docs/content/docs/development/chat_models.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/content/docs/development/chat_models.md b/docs/content/docs/development/chat_models.md index 1fd4f9fa1..f9b53ac99 100644 --- a/docs/content/docs/development/chat_models.md +++ b/docs/content/docs/development/chat_models.md @@ -506,7 +506,7 @@ Azure OpenAI provides access to OpenAI models (GPT-4, GPT-4o, etc.) through Azur | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `api_key` | str | Required | Azure OpenAI API key for authentication | -| `api_version` | str | Required | Azure OpenAI REST API version (e.g., "2024-02-15-preview"). See [API versions](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning) | +| `api_version` | str | Required | Azure OpenAI REST API version (e.g., "2024-10-21"). See [API versions](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning) | | `azure_endpoint` | str | Required | Azure OpenAI endpoint URL (e.g., `https://{resource-name}.openai.azure.com`) | | `timeout` | float | `60.0` | API request timeout in seconds | | `max_retries` | int | `3` | Maximum number of API retry attempts | @@ -518,7 +518,7 @@ Azure OpenAI provides access to OpenAI models (GPT-4, GPT-4o, etc.) through Azur | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `api_key` | String | Required | Azure OpenAI API key for authentication | -| `api_version` | String | Required | Azure OpenAI REST API version (e.g., "2024-02-01"). See [API versions](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning) | +| `api_version` | String | Required | Azure OpenAI REST API version (e.g., "2024-10-21"). See [API versions](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#rest-api-versioning) | | `azure_endpoint` | String | Required | Azure OpenAI endpoint URL (e.g., `https://{resource-name}.openai.azure.com`) — either a direct Azure resource or a proxy/gateway URL that fronts an Azure OpenAI service | | `timeout` | int | None | Timeout in seconds for API requests; must be greater than 0, otherwise ignored (SDK default applies) | | `max_retries` | int | None | Maximum number of API retry attempts; must be non-negative, otherwise ignored (SDK default applies) | @@ -580,7 +580,7 @@ class MyAgent(Agent): return ResourceDescriptor( clazz=ResourceName.ChatModel.AZURE_OPENAI_CONNECTION, api_key="", - api_version="2024-02-15-preview", + api_version="2024-10-21", azure_endpoint="https://your-resource.openai.azure.com" ) @@ -606,7 +606,7 @@ public class MyAgent extends Agent { public static ResourceDescriptor azureOpenAIConnection() { return ResourceDescriptor.Builder.newBuilder(ResourceName.ChatModel.AZURE_OPENAI_CONNECTION) .addInitialArgument("api_key", "") - .addInitialArgument("api_version", "2024-02-01") + .addInitialArgument("api_version", "2024-10-21") .addInitialArgument("azure_endpoint", "https://your-resource.openai.azure.com") .build(); }