From d39033eb8ff8b1d3fca0f9c9431206b2c9a52675 Mon Sep 17 00:00:00 2001 From: dinhviet44 Date: Wed, 9 Sep 2026 00:57:37 +0000 Subject: [PATCH 1/3] Change the OpenAI endpoint in operation config --- api_definitions/AzureOpenAI_OpenAPI.json | 22 ++++++---------------- public-apim.bicep | 8 ++++---- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/api_definitions/AzureOpenAI_OpenAPI.json b/api_definitions/AzureOpenAI_OpenAPI.json index 45d90ac..0ee0d14 100644 --- a/api_definitions/AzureOpenAI_OpenAPI.json +++ b/api_definitions/AzureOpenAI_OpenAPI.json @@ -7,10 +7,10 @@ }, "servers": [ { - "url": "https://example.openai.azure.com/openai", + "url": "https://demodeployment-aoai-apim.openai.azure.com/openai", "variables": { "endpoint": { - "default": "example.openai.azure.com" + "default": "demodeployment-aoai-apim.openai.azure.com" } } } @@ -26,20 +26,11 @@ } ], "paths": { - "/deployments/{deployment-id}/chat/completions": { + "/responses": { "post": { "summary": "Creates a completion for the chat message", "operationId": "ChatCompletions_Create", - "parameters": [ - { - "in": "path", - "name": "deployment-id", - "required": true, - "schema": { - "type": "string", - "description": "Deployment id of the model which was deployed." - } - }, + "parameters": { "in": "query", "name": "api-version", @@ -49,8 +40,7 @@ "example": "2023-03-15-preview", "description": "api version" } - } - ], + }, "requestBody": { "required": true, "content": { @@ -178,7 +168,7 @@ ] }, "example": { - "model": "gpt-35-turbo", + "model": "gpt-5-mini", "messages": [ { "role": "user", diff --git a/public-apim.bicep b/public-apim.bicep index 84d1eba..3a01bfe 100644 --- a/public-apim.bicep +++ b/public-apim.bicep @@ -11,16 +11,16 @@ param location string = resourceGroup().location param apiManagementSku string = 'Developer' @description('The name of the API publisher. This information is used by API Management.') -param apiManagementPublisherName string = 'Contoso' +param apiManagementPublisherName string = 'Nick' @description('The email address of the API publisher. This information is used by API Management.') -param apiManagementPublisherEmail string = 'admin@contoso.com' +param apiManagementPublisherEmail string = '1@1.1' @description('Provide the Name of the Azure Open AI service.') -param apiServiceNamePrimary string = 'Insert_Your_Azure_OpenAi_Name_Here' +param apiServiceNamePrimary string = 'demodeployment-aoai-apim' @description('Provide the Resource Group Name of the Azure Open AI service.') -param apiServiceRgPrimary string = 'Insert_Resource_Group_Name_Here' +param apiServiceRgPrimary string = 'aoai-apim' @description('If you want to provide resiliency when single region exceeds quota, then select Multi and provide URL to an additional Azure OpenAI endpoint. Otherwise, maintain default entry of Single and only provide one Azure OpenAI endpoint.') @allowed([ From f7d01fb5428fd256839dedfa2aae10762933bf28 Mon Sep 17 00:00:00 2001 From: dinhviet44 Date: Wed, 9 Sep 2026 03:58:32 +0000 Subject: [PATCH 2/3] updated api def json --- public-apim.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-apim.bicep b/public-apim.bicep index 3a01bfe..f99663d 100644 --- a/public-apim.bicep +++ b/public-apim.bicep @@ -45,7 +45,7 @@ var apiServiceUrlSecondary = 'https://${apiServiceNameSecondary}.openai.azure.co var openApiXmlRetry = enableRetryPolicy ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_SingleRegion.xml' : 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity.xml' var openApiXml = azureOpenAiRegionType == 'Multi' ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_MultiRegion.xml' : openApiXmlRetry -var openApiJson = 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/api_definitions/AzureOpenAI_OpenAPI.json' +var openApiJson = 'C:\\Users\\apim-aoai-aio\\AzureOpenAI-with-APIM-AIO\\api_definitions\\AzureOpenAI_OpenAPI.json' var apiManagementSkuCount = 1 From a62835b8e5a70ac37988dc25f2be24933a85169e Mon Sep 17 00:00:00 2001 From: dinhviet44 Date: Wed, 9 Sep 2026 08:29:15 +0000 Subject: [PATCH 3/3] next version --- public-apim.bicep | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public-apim.bicep b/public-apim.bicep index f99663d..4cd127b 100644 --- a/public-apim.bicep +++ b/public-apim.bicep @@ -45,7 +45,7 @@ var apiServiceUrlSecondary = 'https://${apiServiceNameSecondary}.openai.azure.co var openApiXmlRetry = enableRetryPolicy ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_SingleRegion.xml' : 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity.xml' var openApiXml = azureOpenAiRegionType == 'Multi' ? 'https://raw.githubusercontent.com/microsoft/AzureOpenAI-with-APIM/main/apim_policies/AOAI_Policy-Managed_Identity_with_Retry_MultiRegion.xml' : openApiXmlRetry -var openApiJson = 'C:\\Users\\apim-aoai-aio\\AzureOpenAI-with-APIM-AIO\\api_definitions\\AzureOpenAI_OpenAPI.json' +var openApiJson = 'https://github.com/dinhviet44/AzureOpenAI-with-APIM-AIO/blob/main/api_definitions/AzureOpenAI_OpenAPI.json' var apiManagementSkuCount = 1