Skip to content

Commit 01bc725

Browse files
- Removed reasoning model parameters and related logic from Bicep and JSON templates.
- Updated deployment capacity defaults for GPT models. - Added private endpoint configurations for Azure Container Registry based on networking settings. - Adjusted scripts for building and pushing images to temporarily relax ACR restrictions during WAF deployments. - Enhanced WebSocket handling in the frontend to coalesce streaming messages for improved UI performance. - Updated backend configuration to reflect changes in reasoning model naming and supported models. - Improved agent handling logic in the orchestration layer to prevent infinite loops during approval processes.
1 parent 212f7c5 commit 01bc725

18 files changed

Lines changed: 210 additions & 307 deletions

.github/workflows/deploy-waf.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ jobs:
2323
environment: production
2424
env:
2525
GPT_5_4_MINI_MIN_CAPACITY: 1
26-
GPT_REASONING_MIN_CAPACITY: 1
2726
GPT_5_4_MIN_CAPACITY: 1
2827
steps:
2928
- name: Checkout Code
@@ -41,7 +40,6 @@ jobs:
4140
env:
4241
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
4342
GPT_5_4_MINI_MIN_CAPACITY: ${{ env.GPT_5_4_MINI_MIN_CAPACITY }}
44-
GPT_REASONING_MIN_CAPACITY: ${{ env.GPT_REASONING_MIN_CAPACITY }}
4543
GPT_5_4_MIN_CAPACITY: ${{ env.GPT_5_4_MIN_CAPACITY }}
4644
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
4745
run: |
@@ -135,7 +133,6 @@ jobs:
135133
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
136134
gptDeploymentCapacity=${{ env.GPT_5_4_MINI_MIN_CAPACITY }} \
137135
gpt5_4ModelCapacity=${{ env.GPT_5_4_MIN_CAPACITY }} \
138-
gptReasoningModelCapacity=${{ env.GPT_REASONING_MIN_CAPACITY }} \
139136
enableTelemetry=true \
140137
enableMonitoring=true \
141138
enablePrivateNetworking=true \

.github/workflows/deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ on:
1717
- cron: "0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
1818
workflow_dispatch: #Allow manual triggering
1919
env:
20-
GPT_5_4_MINI_MIN_CAPACITY: 50
21-
GPT_REASONING_MIN_CAPACITY: 50
20+
GPT_5_4_MINI_MIN_CAPACITY: 100
2221
GPT_5_4_MIN_CAPACITY: 150
2322
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
2423

@@ -48,7 +47,6 @@ jobs:
4847
env:
4948
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
5049
GPT_5_4_MINI_MIN_CAPACITY: ${{ env.GPT_5_4_MINI_MIN_CAPACITY }}
51-
GPT_REASONING_MIN_CAPACITY: ${{ env.GPT_REASONING_MIN_CAPACITY }}
5250
GPT_5_4_MIN_CAPACITY: ${{ env.GPT_5_4_MIN_CAPACITY }}
5351
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
5452
run: |
@@ -153,7 +151,7 @@ jobs:
153151
backendContainerImageTag="${IMAGE_TAG}" \
154152
frontendContainerImageTag="${IMAGE_TAG}" \
155153
azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
156-
gptDeploymentCapacity=50 \
154+
gptDeploymentCapacity=100 \
157155
createdBy="Pipeline" \
158156
tags="{'Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \
159157
--output json

.github/workflows/job-deploy.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ on:
9898
value: ${{ jobs.azure-setup.outputs.QUOTA_FAILED }}
9999

100100
env:
101-
GPT_5_4_MINI_MIN_CAPACITY: 50
102-
GPT_REASONING_MIN_CAPACITY: 50
101+
GPT_5_4_MINI_MIN_CAPACITY: 100
103102
GPT_5_4_MIN_CAPACITY: 150
104103
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
105104
WAF_ENABLED: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.waf_enabled || false) || false }}
@@ -307,7 +306,6 @@ jobs:
307306
env:
308307
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
309308
GPT_5_4_MINI_MIN_CAPACITY: ${{ env.GPT_5_4_MINI_MIN_CAPACITY }}
310-
GPT_REASONING_MIN_CAPACITY: ${{ env.GPT_REASONING_MIN_CAPACITY }}
311309
GPT_5_4_MIN_CAPACITY: ${{ env.GPT_5_4_MIN_CAPACITY }}
312310
AZURE_REGIONS: ${{ vars.AZURE_REGIONS }}
313311
run: |

data/agent_teams/retail.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
"input_key": "",
4444
"type": "",
4545
"name": "AnalysisRecommendationAgent",
46-
"deployment_name": "gpt-5.4-mini-reasoning",
46+
"deployment_name": "gpt-5.4-mini",
4747
"icon": "",
4848
"system_message": "You are a reasoning agent that can analyze customer and order data and provide recommendations for improving customer satisfaction and retention. You do not have access to any data sources, but you can reason based on the information provided to you by other agents. Use your reasoning skills to identify patterns, trends, and insights that can help improve customer satisfaction and retention. Provide actionable recommendations based on your analysis. You have access to other agents that can answer questions and provide data about customers, products, orders, inventory, and fulfilment. Use these agents to gather information as needed.",
4949
"description": "A reasoning agent that can analyze customer and order data and provide recommendations for improving customer satisfaction and retention.",

docs/CustomizingAzdParameters.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ By default this template will use the environment name as the prefix to prevent
1515
| `AZURE_ENV_GPT_MODEL_NAME` | string | `gpt-5.4-mini` | Specifies the underlying GPT model to be deployed (e.g., `gpt-5.4-mini`, `gpt-5.4`). |
1616
| `AZURE_ENV_GPT_MODEL_VERSION` | string | `2026-03-17` | Version of the GPT model to be used for deployment. |
1717
| `AZURE_ENV_GPT_DEPLOYMENT_NAME` | string | (defaults to `AZURE_ENV_GPT_MODEL_NAME`) | Optional. Deployment (alias) name used in Azure OpenAI for the main GPT model. This is the value referenced as `deployment_name` in `data/agent_teams/*.json`. Override this if you want the deployment alias to differ from the underlying model name. |
18-
| `AZURE_ENV_GPT_MODEL_CAPACITY` | int | `50` | Sets the GPT model capacity. |
18+
| `AZURE_ENV_GPT_MODEL_CAPACITY` | int | `100` | Sets the GPT model capacity. |
1919
| `AZURE_ENV_MODEL_5_4_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
2020
| `AZURE_ENV_MODEL_5_4_NAME` | string | `gpt-5.4` | Specifies the underlying larger GPT model to be deployed. |
2121
| `AZURE_ENV_MODEL_5_4_VERSION` | string | `2026-03-05` | Version of the larger GPT model to be used for deployment. |
2222
| `AZURE_ENV_MODEL_5_4_DEPLOYMENT_NAME` | string | (defaults to `AZURE_ENV_MODEL_5_4_NAME`) | Optional. Deployment (alias) name used in Azure OpenAI for the larger GPT model. Override if the alias should differ from the underlying model name. |
2323
| `AZURE_ENV_MODEL_5_4_CAPACITY` | int | `150` | Sets the GPT model capacity. |
24-
| `AZURE_ENV_REASONING_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Defines the deployment type for the AI model (e.g., Standard, GlobalStandard). |
25-
| `AZURE_ENV_REASONING_MODEL_NAME` | string | `gpt-5.4-mini` | Specifies the underlying reasoning GPT model to be deployed. |
26-
| `AZURE_ENV_REASONING_MODEL_VERSION` | string | `2026-03-17` | Version of the reasoning GPT model to be used for deployment. |
27-
| `AZURE_ENV_REASONING_DEPLOYMENT_NAME` | string | `gpt-5.4-mini-reasoning` (auto-derived when it would otherwise collide with `AZURE_ENV_GPT_DEPLOYMENT_NAME`) | Optional. Deployment (alias) name used in Azure OpenAI for the reasoning model. Must be unique from `AZURE_ENV_GPT_DEPLOYMENT_NAME`. |
28-
| `AZURE_ENV_REASONING_MODEL_CAPACITY` | int | `50` | Sets the reasoning GPT model capacity. |
2924
| `AZURE_ENV_IMAGE_TAG` | string | `latest_v4` | Docker image tag used for container deployments. |
3025
| `AZURE_ENV_ENABLE_TELEMETRY` | bool | `true` | Enables telemetry for monitoring and diagnostics. |
3126
| `AZURE_EXISTING_AIPROJECT_RESOURCE_ID` | string | `<Existing Workspace Id>` | Set this if you want to reuse an AI Foundry Project instead of creating a new one. |

docs/DeploymentGuide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ Ensure you have access to an [Azure subscription](https://azure.microsoft.com/fr
6969

7070
**Default Quota Configuration:**
7171
- **gpt-5.4 (150k tokens)** — backs the larger GPT model deployment (alias `gpt-5.4`).
72-
- **gpt-5.4-mini (100k tokens combined)**50k for the main GPT deployment (alias `gpt-5.4-mini`) plus 50k for the reasoning deployment (alias `gpt-5.4-mini-reasoning`).
72+
- **gpt-5.4-mini (100k tokens)**backs the smaller GPT model deployment (alias `gpt-5.4-mini`), also used for reasoning workloads.
7373

74-
> **Note:** The underlying models are `gpt-5.4` (2026-03-05 series) and `gpt-5.4-mini` (2026-03-17 series). Both are reasoning-capable GPT-5.4 GA models. The reasoning deployment intentionally uses the same underlying model as the main deployment but under a distinct alias so applications can route separately to reasoning-heavy workloads.
74+
> **Note:** The underlying models are `gpt-5.4` (2026-03-05 series) and `gpt-5.4-mini` (2026-03-17 series). Both are reasoning-capable GPT-5.4 GA models.
7575
7676
> **Note:** When you run `azd up`, the deployment will automatically show you regions with available quota, so this pre-check is optional but helpful for planning purposes. You can customize these settings later in [Step 3.3: Advanced Configuration](#33-advanced-configuration-optional).
7777

infra/main.bicep

Lines changed: 26 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,6 @@ param gpt5_4ModelVersion string = '2026-03-05'
6565
@description('Optional. Deployment (alias) name used in Azure OpenAI for the larger GPT model. Defaults to gpt5_4ModelName.')
6666
param gpt5_4DeploymentName string = gpt5_4ModelName
6767

68-
@minLength(1)
69-
@description('Optional. Name of the underlying GPT Reasoning model to deploy. Defaults to gpt-5.4-mini (reasoning-capable, 2026-03-17 series).')
70-
param gptReasoningModelName string = 'gpt-5.4-mini'
71-
72-
@description('Optional. Version of the GPT Reasoning model to deploy. Defaults to 2026-03-17 (gpt-5.4-mini release).')
73-
param gptReasoningModelVersion string = '2026-03-17'
74-
75-
@description('Optional. Deployment (alias) name used in Azure OpenAI for the reasoning model. Must be unique from gptDeploymentName. Defaults to "{gptReasoningModelName}-reasoning" when it would otherwise collide with gptDeploymentName, otherwise gptReasoningModelName.')
76-
param gptReasoningDeploymentName string = gptReasoningModelName == gptModelName
77-
? '${gptReasoningModelName}-reasoning'
78-
: gptReasoningModelName
79-
8068
@description('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2024-12-01-preview.')
8169
param azureOpenaiAPIVersion string = '2024-12-01-preview'
8270

@@ -99,23 +87,12 @@ param gpt5_4ModelDeploymentType string = 'GlobalStandard'
9987
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
10088
param deploymentType string = 'GlobalStandard'
10189

102-
@minLength(1)
103-
@allowed([
104-
'Standard'
105-
'GlobalStandard'
106-
])
107-
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
108-
param gptReasoningModelDeploymentType string = 'GlobalStandard'
109-
11090
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
111-
param gptDeploymentCapacity int = 50
91+
param gptDeploymentCapacity int = 100
11292

11393
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
11494
param gpt5_4ModelCapacity int = 150
11595

116-
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
117-
param gptReasoningModelCapacity int = 50
118-
11996
@description('Optional. The tags to apply to all deployed Azure resources.')
12097
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
12198

@@ -717,6 +694,7 @@ var privateDnsZones = [
717694
'privatelink.documents.azure.com'
718695
'privatelink.blob.core.windows.net'
719696
'privatelink.search.windows.net'
697+
'privatelink.azurecr.io'
720698
]
721699

722700
// DNS Zone Index Constants
@@ -727,6 +705,7 @@ var dnsZoneIndex = {
727705
cosmosDb: 3
728706
blob: 4
729707
search: 5
708+
containerRegistry: 6
730709
}
731710

732711
// List of DNS zone indices that correspond to AI-related services.
@@ -800,17 +779,6 @@ var aiFoundryAiServices5_4ModelDeployment = {
800779
}
801780
raiPolicyName: 'Microsoft.Default'
802781
}
803-
var aiFoundryAiServicesReasoningModelDeployment = {
804-
format: 'OpenAI'
805-
deploymentName: gptReasoningDeploymentName
806-
name: gptReasoningModelName
807-
version: gptReasoningModelVersion
808-
sku: {
809-
name: gptReasoningModelDeploymentType
810-
capacity: gptReasoningModelCapacity
811-
}
812-
raiPolicyName: 'Microsoft.Default'
813-
}
814782
var aiFoundryAiProjectDescription = 'AI Foundry Project'
815783

816784
resource existingAiFoundryAiServices 'Microsoft.CognitiveServices/accounts@2025-12-01' existing = if (useExistingAiFoundryAiProject) {
@@ -850,19 +818,6 @@ module existingAiFoundryAiServicesDeployments 'modules/ai-services-deployments.b
850818
capacity: aiFoundryAiServices5_4ModelDeployment.sku.capacity
851819
}
852820
}
853-
{
854-
name: aiFoundryAiServicesReasoningModelDeployment.deploymentName
855-
model: {
856-
format: aiFoundryAiServicesReasoningModelDeployment.format
857-
name: aiFoundryAiServicesReasoningModelDeployment.name
858-
version: aiFoundryAiServicesReasoningModelDeployment.version
859-
}
860-
raiPolicyName: aiFoundryAiServicesReasoningModelDeployment.raiPolicyName
861-
sku: {
862-
name: aiFoundryAiServicesReasoningModelDeployment.sku.name
863-
capacity: aiFoundryAiServicesReasoningModelDeployment.sku.capacity
864-
}
865-
}
866821
]
867822
roleAssignments: [
868823
{
@@ -925,19 +880,6 @@ module aiFoundryAiServices 'br:mcr.microsoft.com/bicep/avm/res/cognitive-service
925880
capacity: aiFoundryAiServices5_4ModelDeployment.sku.capacity
926881
}
927882
}
928-
{
929-
name: aiFoundryAiServicesReasoningModelDeployment.deploymentName
930-
model: {
931-
format: aiFoundryAiServicesReasoningModelDeployment.format
932-
name: aiFoundryAiServicesReasoningModelDeployment.name
933-
version: aiFoundryAiServicesReasoningModelDeployment.version
934-
}
935-
raiPolicyName: aiFoundryAiServicesReasoningModelDeployment.raiPolicyName
936-
sku: {
937-
name: aiFoundryAiServicesReasoningModelDeployment.sku.name
938-
capacity: aiFoundryAiServicesReasoningModelDeployment.sku.capacity
939-
}
940-
}
941883
]
942884
networkAcls: {
943885
defaultAction: 'Allow'
@@ -1215,14 +1157,31 @@ module containerRegistry 'br/public:avm/res/container-registry/registry:0.12.0'
12151157
params: {
12161158
name: 'cr${solutionSuffix}'
12171159
acrAdminUserEnabled: false
1218-
acrSku: 'Basic'
1160+
acrSku: enablePrivateNetworking ? 'Premium' : 'Basic'
12191161
azureADAuthenticationAsArmPolicyStatus: 'enabled'
1220-
exportPolicyStatus: 'enabled'
1162+
exportPolicyStatus: enablePrivateNetworking ? 'disabled' : 'enabled'
12211163
location: location
12221164
softDeletePolicyDays: 7
12231165
softDeletePolicyStatus: 'disabled'
12241166
tags: tags
12251167
networkRuleBypassOptions: 'AzureServices'
1168+
// WAF: Premium SKU + private endpoint; public access disabled, pulls flow over the private endpoint.
1169+
publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled'
1170+
networkRuleSetDefaultAction: enablePrivateNetworking ? 'Deny' : 'Allow'
1171+
privateEndpoints: enablePrivateNetworking
1172+
? [
1173+
{
1174+
name: 'pep-cr${solutionSuffix}'
1175+
customNetworkInterfaceName: 'nic-cr${solutionSuffix}'
1176+
privateDnsZoneGroup: {
1177+
privateDnsZoneGroupConfigs: [
1178+
{ privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.containerRegistry]!.outputs.resourceId }
1179+
]
1180+
}
1181+
subnetResourceId: virtualNetwork!.outputs.backendSubnetResourceId
1182+
}
1183+
]
1184+
: []
12261185
roleAssignments: [
12271186
{
12281187
roleDefinitionIdOrName: acrPullRole
@@ -1394,7 +1353,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.0' = {
13941353
}
13951354
{
13961355
name: 'REASONING_MODEL_NAME'
1397-
value: aiFoundryAiServicesReasoningModelDeployment.deploymentName
1356+
value: aiFoundryAiServicesModelDeployment.deploymentName
13981357
}
13991358
{
14001359
name: 'MCP_SERVER_ENDPOINT'
@@ -1418,7 +1377,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.22.0' = {
14181377
}
14191378
{
14201379
name: 'SUPPORTED_MODELS'
1421-
value: '["${aiFoundryAiServicesModelDeployment.deploymentName}","${aiFoundryAiServices5_4ModelDeployment.deploymentName}","${aiFoundryAiServicesReasoningModelDeployment.deploymentName}"]'
1380+
value: '["${aiFoundryAiServicesModelDeployment.deploymentName}","${aiFoundryAiServices5_4ModelDeployment.deploymentName}"]'
14221381
}
14231382
{
14241383
name: 'AZURE_STORAGE_BLOB_URL'
@@ -1917,10 +1876,10 @@ output AZURE_CLIENT_ID string = userAssignedIdentity!.outputs.clientId
19171876
output AZURE_TENANT_ID string = tenant().tenantId
19181877
output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
19191878
output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
1920-
output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment.deploymentName
1879+
output REASONING_MODEL_NAME string = aiFoundryAiServicesModelDeployment.deploymentName
19211880
output MCP_SERVER_NAME string = 'MacaeMcpServer'
19221881
output MCP_SERVER_DESCRIPTION string = 'MCP server with greeting, HR, and planning tools'
1923-
output SUPPORTED_MODELS string = '["${aiFoundryAiServicesModelDeployment.deploymentName}","${aiFoundryAiServices5_4ModelDeployment.deploymentName}","${aiFoundryAiServicesReasoningModelDeployment.deploymentName}"]'
1882+
output SUPPORTED_MODELS string = '["${aiFoundryAiServicesModelDeployment.deploymentName}","${aiFoundryAiServices5_4ModelDeployment.deploymentName}"]'
19241883
output BACKEND_URL string = 'https://${containerApp.outputs.fqdn}'
19251884
output AZURE_AI_PROJECT_ENDPOINT string = aiFoundryAiProjectEndpoint
19261885
output AZURE_AI_AGENT_ENDPOINT string = aiFoundryAiProjectEndpoint

0 commit comments

Comments
 (0)