Skip to content

Commit 260313f

Browse files
added the changes related to agent creation from mcp
1 parent 650e4ed commit 260313f

File tree

3 files changed

+155
-44
lines changed

3 files changed

+155
-44
lines changed

infra/main.bicep

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var deployingUserPrincipalId = deployerInfo.objectId
4040
azd: {
4141
type: 'location'
4242
usageName: [
43+
'OpenAI.GlobalStandard.gpt4.1, 150'
4344
'OpenAI.GlobalStandard.o4-mini, 50'
4445
'OpenAI.GlobalStandard.gpt4.1-mini, 50'
4546
]
@@ -55,6 +56,13 @@ param gptModelName string = 'gpt-4.1-mini'
5556
@description('Optional. Version of the GPT model to deploy. Defaults to 2025-04-14.')
5657
param gptModelVersion string = '2025-04-14'
5758

59+
@minLength(1)
60+
@description('Optional. Name of the GPT model to deploy:')
61+
param gpt4_1ModelName string = 'gpt-4.1'
62+
63+
@description('Optional. Version of the GPT model to deploy. Defaults to 2025-04-14.')
64+
param gpt4_1ModelVersion string = '2025-04-14'
65+
5866
@minLength(1)
5967
@description('Optional. Name of the GPT Reasoning model to deploy:')
6068
param gptReasoningModelName string = 'o4-mini'
@@ -65,6 +73,14 @@ param gptReasoningModelVersion string = '2025-04-16'
6573
@description('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2025-01-01-preview.')
6674
param azureopenaiVersion string = '2024-12-01-preview'
6775

76+
@minLength(1)
77+
@allowed([
78+
'Standard'
79+
'GlobalStandard'
80+
])
81+
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
82+
param gpt4_1ModelDeploymentType string = 'GlobalStandard'
83+
6884
@minLength(1)
6985
@allowed([
7086
'Standard'
@@ -81,10 +97,13 @@ param gptModelDeploymentType string = 'GlobalStandard'
8197
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
8298
param gptReasoningModelDeploymentType string = 'GlobalStandard'
8399

84-
@description('Optional. AI model deployment token capacity. Defaults to 250 for optimal performance.')
100+
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
85101
param gptModelCapacity int = 50
86102

87103
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
104+
param gpt4_1ModelCapacity int = 150
105+
106+
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
88107
param gptReasoningModelCapacity int = 50
89108

90109
@description('Optional. The tags to apply to all deployed Azure resources.')
@@ -1050,6 +1069,16 @@ var aiFoundryAiServicesModelDeployment = {
10501069
}
10511070
raiPolicyName: 'Microsoft.Default'
10521071
}
1072+
var aiFoundryAiServices4_1ModelDeployment = {
1073+
format: 'OpenAI'
1074+
name: gpt4_1ModelName
1075+
version: gpt4_1ModelVersion
1076+
sku: {
1077+
name: gpt4_1ModelDeploymentType
1078+
capacity: gpt4_1ModelCapacity
1079+
}
1080+
raiPolicyName: 'Microsoft.Default'
1081+
}
10531082
var aiFoundryAiServicesReasoningModelDeployment = {
10541083
format: 'OpenAI'
10551084
name: gptReasoningModelName
@@ -1086,6 +1115,19 @@ module existingAiFoundryAiServicesDeployments 'modules/ai-services-deployments.b
10861115
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
10871116
}
10881117
}
1118+
{
1119+
name: aiFoundryAiServices4_1ModelDeployment.name
1120+
model: {
1121+
format: aiFoundryAiServices4_1ModelDeployment.format
1122+
name: aiFoundryAiServices4_1ModelDeployment.name
1123+
version: aiFoundryAiServices4_1ModelDeployment.version
1124+
}
1125+
raiPolicyName: aiFoundryAiServices4_1ModelDeployment.raiPolicyName
1126+
sku: {
1127+
name: aiFoundryAiServices4_1ModelDeployment.sku.name
1128+
capacity: aiFoundryAiServices4_1ModelDeployment.sku.capacity
1129+
}
1130+
}
10891131
{
10901132
name: aiFoundryAiServicesReasoningModelDeployment.name
10911133
model: {
@@ -1148,6 +1190,19 @@ module aiFoundryAiServices 'br:mcr.microsoft.com/bicep/avm/res/cognitive-service
11481190
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
11491191
}
11501192
}
1193+
{
1194+
name: aiFoundryAiServices4_1ModelDeployment.name
1195+
model: {
1196+
format: aiFoundryAiServices4_1ModelDeployment.format
1197+
name: aiFoundryAiServices4_1ModelDeployment.name
1198+
version: aiFoundryAiServices4_1ModelDeployment.version
1199+
}
1200+
raiPolicyName: aiFoundryAiServices4_1ModelDeployment.raiPolicyName
1201+
sku: {
1202+
name: aiFoundryAiServices4_1ModelDeployment.sku.name
1203+
capacity: aiFoundryAiServices4_1ModelDeployment.sku.capacity
1204+
}
1205+
}
11511206
{
11521207
name: aiFoundryAiServicesReasoningModelDeployment.name
11531208
model: {
@@ -1564,11 +1619,11 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15641619
}
15651620
{
15661621
name: 'MCP_SERVER_NAME'
1567-
value: 'MACAE MCP Server'
1622+
value: 'MacaeMcpServer'
15681623
}
15691624
{
15701625
name: 'MCP_SERVER_DESCRIPTION'
1571-
value: 'MACAE MCP Server Description'
1626+
value: 'MCP server with greeting, HR, and planning tools'
15721627
}
15731628
{
15741629
name: 'AZURE_TENANT_ID'
@@ -1678,43 +1733,43 @@ module containerAppMcp 'br/public:avm/res/app/container-app:0.18.1' = {
16781733
}
16791734
env: [
16801735
{
1681-
name: 'MCP_HOST'
1736+
name: 'HOST'
16821737
value: '0.0.0.0'
16831738
}
16841739
{
1685-
name: 'MCP_PORT'
1740+
name: 'PORT'
16861741
value: '9000'
16871742
}
16881743
{
1689-
name: 'MCP_DEBUG'
1744+
name: 'DEBUG'
16901745
value: 'false'
16911746
}
16921747
{
1693-
name: 'MCP_SERVER_NAME'
1694-
value: 'MACAE MCP Server'
1748+
name: 'SERVER_NAME'
1749+
value: 'MacaeMcpServer'
16951750
}
16961751
{
1697-
name: 'MCP_ENABLE_AUTH'
1698-
value: 'true'
1752+
name: 'ENABLE_AUTH'
1753+
value: 'false'
16991754
}
17001755
{
1701-
name: 'AZURE_TENANT_ID'
1756+
name: 'TENANT_ID'
17021757
value: tenant().tenantId
17031758
}
17041759
{
1705-
name: 'AZURE_CLIENT_ID'
1760+
name: 'CLIENT_ID'
17061761
value: userAssignedIdentity!.outputs.clientId
17071762
}
17081763
{
1709-
name: 'AZURE_JWKS_URI'
1764+
name: 'JWKS_URI'
17101765
value: 'https://login.microsoftonline.com/${tenant().tenantId}/discovery/v2.0/keys'
17111766
}
17121767
{
1713-
name: 'AZURE_ISSUER'
1768+
name: 'ISSUER'
17141769
value: 'https://sts.windows.net/${tenant().tenantId}/'
17151770
}
17161771
{
1717-
name: 'AZURE_AUDIENCE'
1772+
name: 'AUDIENCE'
17181773
value: 'api://${userAssignedIdentity!.outputs.clientId}'
17191774
}
17201775
{
@@ -2051,8 +2106,8 @@ output AZURE_TENANT_ID string = tenant().tenantId
20512106
output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
20522107
output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
20532108
output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment.name
2054-
output MCP_SERVER_NAME string = 'MACAE MCP Server'
2055-
output MCP_SERVER_DESCRIPTION string = 'MACAE MCP Server Description'
2109+
output MCP_SERVER_NAME string = 'MacaeMcpServer'
2110+
output MCP_SERVER_DESCRIPTION string = 'MCP server with greeting, HR, and planning tools'
20562111
output SUPPORTED_MODELS string = '["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'
20572112
output AZURE_AI_SEARCH_API_KEY string = '<Deployed-Search-ApiKey>'
20582113
output BACKEND_URL string = 'https://${containerApp.outputs.fqdn}'

infra/main_custom.bicep

Lines changed: 73 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ var deployingUserPrincipalId = deployerInfo.objectId
4040
azd: {
4141
type: 'location'
4242
usageName: [
43+
'OpenAI.GlobalStandard.gpt4.1, 150'
4344
'OpenAI.GlobalStandard.o4-mini, 50'
4445
'OpenAI.GlobalStandard.gpt4.1-mini, 50'
4546
]
@@ -59,12 +60,28 @@ param gptModelVersion string = '2025-04-14'
5960
@description('Optional. Name of the GPT Reasoning model to deploy:')
6061
param gptReasoningModelName string = 'o4-mini'
6162

63+
@minLength(1)
64+
@description('Optional. Name of the GPT model to deploy:')
65+
param gpt4_1ModelName string = 'gpt-4.1'
66+
67+
@description('Optional. Version of the GPT model to deploy. Defaults to 2025-04-14.')
68+
param gpt4_1ModelVersion string = '2025-04-14'
69+
6270
@description('Optional. Version of the GPT Reasoning model to deploy. Defaults to 2025-04-14.')
6371
param gptReasoningModelVersion string = '2025-04-16'
6472

6573
@description('Optional. Version of the Azure OpenAI service to deploy. Defaults to 2025-01-01-preview.')
6674
param azureopenaiVersion string = '2024-12-01-preview'
6775

76+
77+
@minLength(1)
78+
@allowed([
79+
'Standard'
80+
'GlobalStandard'
81+
])
82+
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
83+
param gpt4_1ModelDeploymentType string = 'GlobalStandard'
84+
6885
@minLength(1)
6986
@allowed([
7087
'Standard'
@@ -81,10 +98,13 @@ param gptModelDeploymentType string = 'GlobalStandard'
8198
@description('Optional. GPT model deployment type. Defaults to GlobalStandard.')
8299
param gptReasoningModelDeploymentType string = 'GlobalStandard'
83100

84-
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
101+
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
85102
param gptModelCapacity int = 50
86103

87104
@description('Optional. AI model deployment token capacity. Defaults to 150 for optimal performance.')
105+
param gpt4_1ModelCapacity int = 150
106+
107+
@description('Optional. AI model deployment token capacity. Defaults to 50 for optimal performance.')
88108
param gptReasoningModelCapacity int = 50
89109

90110
@description('Optional. The tags to apply to all deployed Azure resources.')
@@ -1048,6 +1068,16 @@ var aiFoundryAiServicesModelDeployment = {
10481068
}
10491069
raiPolicyName: 'Microsoft.Default'
10501070
}
1071+
var aiFoundryAiServices4_1ModelDeployment = {
1072+
format: 'OpenAI'
1073+
name: gpt4_1ModelName
1074+
version: gpt4_1ModelVersion
1075+
sku: {
1076+
name: gpt4_1ModelDeploymentType
1077+
capacity: gpt4_1ModelCapacity
1078+
}
1079+
raiPolicyName: 'Microsoft.Default'
1080+
}
10511081
var aiFoundryAiServicesReasoningModelDeployment = {
10521082
format: 'OpenAI'
10531083
name: gptReasoningModelName
@@ -1084,6 +1114,19 @@ module existingAiFoundryAiServicesDeployments 'modules/ai-services-deployments.b
10841114
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
10851115
}
10861116
}
1117+
{
1118+
name: aiFoundryAiServices4_1ModelDeployment.name
1119+
model: {
1120+
format: aiFoundryAiServices4_1ModelDeployment.format
1121+
name: aiFoundryAiServices4_1ModelDeployment.name
1122+
version: aiFoundryAiServices4_1ModelDeployment.version
1123+
}
1124+
raiPolicyName: aiFoundryAiServices4_1ModelDeployment.raiPolicyName
1125+
sku: {
1126+
name: aiFoundryAiServices4_1ModelDeployment.sku.name
1127+
capacity: aiFoundryAiServices4_1ModelDeployment.sku.capacity
1128+
}
1129+
}
10871130
{
10881131
name: aiFoundryAiServicesReasoningModelDeployment.name
10891132
model: {
@@ -1146,6 +1189,19 @@ module aiFoundryAiServices 'br:mcr.microsoft.com/bicep/avm/res/cognitive-service
11461189
capacity: aiFoundryAiServicesModelDeployment.sku.capacity
11471190
}
11481191
}
1192+
{
1193+
name: aiFoundryAiServices4_1ModelDeployment.name
1194+
model: {
1195+
format: aiFoundryAiServices4_1ModelDeployment.format
1196+
name: aiFoundryAiServices4_1ModelDeployment.name
1197+
version: aiFoundryAiServices4_1ModelDeployment.version
1198+
}
1199+
raiPolicyName: aiFoundryAiServices4_1ModelDeployment.raiPolicyName
1200+
sku: {
1201+
name: aiFoundryAiServices4_1ModelDeployment.sku.name
1202+
capacity: aiFoundryAiServices4_1ModelDeployment.sku.capacity
1203+
}
1204+
}
11491205
{
11501206
name: aiFoundryAiServicesReasoningModelDeployment.name
11511207
model: {
@@ -1595,11 +1651,11 @@ module containerApp 'br/public:avm/res/app/container-app:0.18.1' = {
15951651
}
15961652
{
15971653
name: 'MCP_SERVER_NAME'
1598-
value: 'MACAE MCP Server'
1654+
value: 'MacaeMcpServer'
15991655
}
16001656
{
16011657
name: 'MCP_SERVER_DESCRIPTION'
1602-
value: 'MACAE MCP Server Description'
1658+
value: 'MCP server with greeting, HR, and planning tools'
16031659
}
16041660
{
16051661
name: 'AZURE_TENANT_ID'
@@ -1714,43 +1770,43 @@ module containerAppMcp 'br/public:avm/res/app/container-app:0.18.1' = {
17141770
}
17151771
env: [
17161772
{
1717-
name: 'MCP_HOST'
1773+
name: 'HOST'
17181774
value: '0.0.0.0'
17191775
}
17201776
{
1721-
name: 'MCP_PORT'
1777+
name: 'PORT'
17221778
value: '9000'
17231779
}
17241780
{
1725-
name: 'MCP_DEBUG'
1781+
name: 'DEBUG'
17261782
value: 'false'
17271783
}
17281784
{
1729-
name: 'MCP_SERVER_NAME'
1730-
value: 'MACAE MCP Server'
1785+
name: 'SERVER_NAME'
1786+
value: 'MacaeMcpServer'
17311787
}
17321788
{
1733-
name: 'MCP_ENABLE_AUTH'
1734-
value: 'true'
1789+
name: 'ENABLE_AUTH'
1790+
value: 'false'
17351791
}
17361792
{
1737-
name: 'AZURE_TENANT_ID'
1793+
name: 'TENANT_ID'
17381794
value: tenant().tenantId
17391795
}
17401796
{
1741-
name: 'AZURE_CLIENT_ID'
1797+
name: 'CLIENT_ID'
17421798
value: userAssignedIdentity!.outputs.clientId
17431799
}
17441800
{
1745-
name: 'AZURE_JWKS_URI'
1801+
name: 'JWKS_URI'
17461802
value: 'https://login.microsoftonline.com/${tenant().tenantId}/discovery/v2.0/keys'
17471803
}
17481804
{
1749-
name: 'AZURE_ISSUER'
1805+
name: 'ISSUER'
17501806
value: 'https://sts.windows.net/${tenant().tenantId}/'
17511807
}
17521808
{
1753-
name: 'AZURE_AUDIENCE'
1809+
name: 'AUDIENCE'
17541810
value: 'api://${userAssignedIdentity!.outputs.clientId}'
17551811
}
17561812
{
@@ -2106,8 +2162,8 @@ output AZURE_TENANT_ID string = tenant().tenantId
21062162
output AZURE_AI_SEARCH_CONNECTION_NAME string = aiSearchConnectionName
21072163
output AZURE_COGNITIVE_SERVICES string = 'https://cognitiveservices.azure.com/.default'
21082164
output REASONING_MODEL_NAME string = aiFoundryAiServicesReasoningModelDeployment.name
2109-
output MCP_SERVER_NAME string = 'MACAE MCP Server'
2110-
output MCP_SERVER_DESCRIPTION string = 'MACAE MCP Server Description'
2165+
output MCP_SERVER_NAME string = 'MacaeMcpServer'
2166+
output MCP_SERVER_DESCRIPTION string = 'MCP server with greeting, HR, and planning tools'
21112167
output SUPPORTED_MODELS string = '["o3","o4-mini","gpt-4.1","gpt-4.1-mini"]'
21122168
output AZURE_AI_SEARCH_API_KEY string = '<Deployed-Search-ApiKey>'
21132169
output BACKEND_URL string = 'https://${containerApp.outputs.fqdn}'

0 commit comments

Comments
 (0)