Skip to content

Commit 104a200

Browse files
added the bicep changes related to deployment models
1 parent cd6a684 commit 104a200

File tree

2 files changed

+85
-22
lines changed

2 files changed

+85
-22
lines changed

infra/main.bicep

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var deployingUserPrincipalId = deployerInfo.objectId
4242
azd: {
4343
type: 'location'
4444
usageName: [
45-
'OpenAI.GlobalStandard.4.1-mini, 50'
45+
'OpenAI.GlobalStandard.o4-mini, 50'
4646
]
4747
}
4848
})
@@ -1517,11 +1517,11 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15171517
}
15181518
{
15191519
name: 'AZURE_BING_CONNECTION_NAME'
1520-
value: ''
1520+
value: 'binggrnd'
15211521
}
1522-
{
1522+
{
15231523
name: 'BING_CONNECTION_NAME'
1524-
value: ''
1524+
value: 'binggrnd'
15251525
}
15261526
{
15271527
name: 'REASONING_MODEL_NAME'
@@ -1555,10 +1555,6 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15551555
name: 'AZURE_AI_SEARCH_API_KEY'
15561556
secretRef: 'azure-ai-search-api-key'
15571557
}
1558-
{
1559-
name: 'BING_CONNECTION_NAME'
1560-
value: ''
1561-
}
15621558
{
15631559
name: 'AZURE_STORAGE_BLOB_URL'
15641560
value: avmStorageAccount.outputs.serviceEndpoints.blob

infra/main_custom.bicep

Lines changed: 81 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ var deployingUserPrincipalId = deployerInfo.objectId
4242
azd: {
4343
type: 'location'
4444
usageName: [
45-
'OpenAI.GlobalStandard.gpt-4o, 150'
45+
'OpenAI.GlobalStandard.4.1-mini, 50'
4646
]
4747
}
4848
})
@@ -51,13 +51,20 @@ param azureAiServiceLocation string
5151

5252
@minLength(1)
5353
@description('Optional. Name of the GPT model to deploy:')
54-
param gptModelName string = 'gpt-4o'
54+
param gptModelName string = 'gpt-4.1-mini'
5555

56-
@description('Optional. Version of the GPT model to deploy. Defaults to 2024-08-06.')
57-
param gptModelVersion string = '2024-08-06'
56+
@description('Optional. Version of the GPT model to deploy. Defaults to 2025-04-14.')
57+
param gptModelVersion string = '2025-04-14'
58+
59+
@minLength(1)
60+
@description('Optional. Name of the GPT Reasoning model to deploy:')
61+
param gptReasoningModelName string = 'o4-mini'
62+
63+
@description('Optional. Version of the GPT Reasoning model to deploy. Defaults to 2025-04-14.')
64+
param gptReasoningModelVersion string = '2025-04-16'
5865

5966
@description('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2025-01-01-preview.')
60-
param azureopenaiVersion string = '2025-01-01-preview'
67+
param azureopenaiVersion string = '2024-12-01-preview'
6168

6269
@minLength(1)
6370
@allowed([
@@ -67,8 +74,19 @@ param azureopenaiVersion string = '2025-01-01-preview'
6774
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
6875
param gptModelDeploymentType string = 'GlobalStandard'
6976

77+
@minLength(1)
78+
@allowed([
79+
'Standard'
80+
'GlobalStandard'
81+
])
82+
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
83+
param gptReasoningModelDeploymentType string = 'GlobalStandard'
84+
85+
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
86+
param gptModelCapacity int = 50
87+
7088
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
71-
param gptModelCapacity int = 150
89+
param gptReasoningModelCapacity int = 50
7290

7391
@description('Optional. The tags to apply to all deployed Azure resources.')
7492
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}
@@ -111,6 +129,15 @@ param frontendContainerImageName string = 'macaefrontend'
111129
@description('Optional. The Container Image Tag to deploy on the frontend.')
112130
param frontendContainerImageTag string = 'latest_2025-07-22_895'
113131

132+
@description('Optional. The Container Registry hostname where the docker images for the MCP are located.')
133+
param MCPContainerRegistryHostname string = 'macaemcpacrdk.azurecr.io'
134+
135+
@description('Optional. The Container Image Name to deploy on the MCP.')
136+
param MCPContainerImageName string = 'macae-mac-app'
137+
138+
@description('Optional. The Container Image Tag to deploy on the MCP.')
139+
param MCPContainerImageTag string = 't9'
140+
114141
@description('Optional. Enable/Disable usage telemetry for module.')
115142
param enableTelemetry bool = true
116143

@@ -1000,6 +1027,16 @@ var aiFoundryAiServicesModelDeployment = {
10001027
}
10011028
raiPolicyName: 'Microsoft.Default'
10021029
}
1030+
var aiFoundryAiServicesReasoningModelDeployment = {
1031+
format: 'OpenAI'
1032+
name: gptReasoningModelName
1033+
version: gptReasoningModelVersion
1034+
sku: {
1035+
name: gptReasoningModelDeploymentType
1036+
capacity: gptReasoningModelCapacity
1037+
}
1038+
raiPolicyName: 'Microsoft.Default'
1039+
}
10031040
var aiFoundryAiProjectDescription = 'AI Foundry Project'
10041041

10051042
resource existingAiFoundryAiServices 'Microsoft.CognitiveServices/accounts@2025-06-01' existing = if (useExistingAiFoundryAiProject) {
@@ -1026,6 +1063,19 @@ module existingAiFoundryAiServicesDeployments 'modules/ai-services-deployments.b
10261063
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
10271064
}
10281065
}
1066+
{
1067+
name: aiFoundryAiServicesReasoningModelDeployment.name
1068+
model: {
1069+
format: aiFoundryAiServicesReasoningModelDeployment.format
1070+
name: aiFoundryAiServicesReasoningModelDeployment.name
1071+
version: aiFoundryAiServicesReasoningModelDeployment.version
1072+
}
1073+
raiPolicyName: aiFoundryAiServicesReasoningModelDeployment.raiPolicyName
1074+
sku: {
1075+
name: aiFoundryAiServicesReasoningModelDeployment.sku.name
1076+
capacity: aiFoundryAiServicesReasoningModelDeployment.sku.capacity
1077+
}
1078+
}
10291079
]
10301080
roleAssignments: [
10311081
{
@@ -1075,6 +1125,19 @@ module aiFoundryAiServices 'br:mcr.microsoft.com/bicep/avm/res/cognitive-service
10751125
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
10761126
}
10771127
}
1128+
{
1129+
name: aiFoundryAiServicesReasoningModelDeployment.name
1130+
model: {
1131+
format: aiFoundryAiServicesReasoningModelDeployment.format
1132+
name: aiFoundryAiServicesReasoningModelDeployment.name
1133+
version: aiFoundryAiServicesReasoningModelDeployment.version
1134+
}
1135+
raiPolicyName: aiFoundryAiServicesReasoningModelDeployment.raiPolicyName
1136+
sku: {
1137+
name: aiFoundryAiServicesReasoningModelDeployment.sku.name
1138+
capacity: aiFoundryAiServicesReasoningModelDeployment.sku.capacity
1139+
}
1140+
}
10781141
]
10791142
networkAcls: {
10801143
defaultAction: 'Allow'
@@ -1487,11 +1550,15 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
14871550
}
14881551
{
14891552
name: 'AZURE_BING_CONNECTION_NAME'
1490-
value: ''
1553+
value: 'binggrnd'
14911554
}
1555+
{
1556+
name: 'BING_CONNECTION_NAME'
1557+
value: 'binggrnd'
1558+
}
14921559
{
14931560
name: 'REASONING_MODEL_NAME'
1494-
value: 'o3'
1561+
value: aiFoundryAiServicesReasoningModelDeployment.name
14951562
}
14961563
{
14971564
name: 'MCP_SERVER_ENDPOINT'
@@ -1520,11 +1587,7 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15201587
{
15211588
name: 'AZURE_AI_SEARCH_API_KEY'
15221589
value: 'azure-ai-search-api-key'
1523-
}
1524-
{
1525-
name: 'BING_CONNECTION_NAME'
1526-
value: ''
1527-
}
1590+
}
15281591
{
15291592
name: 'AZURE_STORAGE_BLOB_URL'
15301593
value: avmStorageAccount.outputs.serviceEndpoints.blob
@@ -1533,6 +1596,10 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15331596
name: 'AZURE_STORAGE_CONTAINER_NAME'
15341597
value: storageContainerName
15351598
}
1599+
{
1600+
name: 'AZURE_AI_MODEL_DEPLOYMENT_NAME'
1601+
value: aiFoundryAiServicesModelDeployment.name
1602+
}
15361603
]
15371604
}
15381605
]
@@ -2009,7 +2076,7 @@ output AZURE_CLIENT_ID string = userAssignedIdentity!.outputs.clientId
20092076
output AZURE_TENANT_ID string = tenant().tenantId
20102077
output AZURE_AI_SEARCH_CONNECTION_NAME string = searchService.outputs.name
20112078
output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
2012-
output REASONING_MODEL_NAME string = 'o3'
2079+
output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment.name
20132080
output MCP_SERVER_NAME string = 'MACAE MCP Server'
20142081
output MCP_SERVER_DESCRIPTION string = 'MACAE MCP Server Description'
20152082
output SUPPORTED_MODELS string = '["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'

0 commit comments

Comments
 (0)