Skip to content

Commit 0a5ebd2

Browse files
authored
Howie/use azd quota validation (#148)
* use bicep quota validation * update
1 parent 9ca448f commit 0a5ebd2

File tree

4 files changed

+17
-29
lines changed

4 files changed

+17
-29
lines changed

azure.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,6 @@ hooks:
1818
run: ./scripts/validate_env_vars.ps1
1919
interactive: true
2020
continueOnError: false
21-
preprovision:
22-
posix:
23-
shell: sh
24-
run: chmod u+r+x ./scripts/set_default_models.sh; chmod u+r+x ./scripts/resolve_model_quota.sh; ./scripts/set_default_models.sh
25-
interactive: true
26-
continueOnError: false
27-
windows:
28-
shell: pwsh
29-
run: ./scripts/set_default_models.ps1
30-
interactive: true
31-
continueOnError: false
3221
postprovision:
3322
windows:
3423
shell: pwsh

docs/deploy_customization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ Set the version of the agent model:
6666
azd env set AZURE_AI_AGENT_MODEL_VERSION 2024-07-18
6767
```
6868

69-
### Setting capacity and deployment SKU
69+
### Setting models, capacity, and deployment SKU
7070

71-
For quota regions, you may find yourself needing to modify the default capacity and deployment SKU using environment variables as below. The default tokens per minute deployed in this template is 80,000 for agent model and 50,000 for the embedding model that is enough for all operations. If the region has quota less the these numbers, you will be prompt to input a lower capacity up to the available limit.
71+
By default, this template sets the agent model deployment capacity to 80,000 tokens per minute. For AI Search, the embedding model requires a capacity of 50,000 tokens per minute. Due to current Bicep limitations, only the chat model quota is validated when you select a location during `azd up`. If you want to change these defaults, set the desired region using `azd env set AZURE_LOCATION <region>` (for example, `eastus`) to bypass quota validation. Follow the instructions below to update the model settings before running `azd up`.
7272

7373
Change the default capacity (in thousands of tokens per minute) of the agent deployment:
7474

infra/main.bicep

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,9 @@ param environmentName string
2020
@metadata({
2121
azd: {
2222
type: 'location'
23-
// quota-validation for ai models: gpt-4o-mini & text-embedding-3-small
23+
// quota-validation for ai models: gpt-4o-mini
2424
usageName: [
25-
'OpenAI.GlobalStandard.gpt-4o-mini,30'
26-
'OpenAI.GlobalStandard.text-embedding-3-small,30'
25+
'OpenAI.GlobalStandard.gpt-4o-mini,80'
2726
]
2827
}
2928
})

infra/main.parameters.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,42 +60,42 @@
6060
"value": "${AZURE_EXISTING_AGENT_ID}"
6161
},
6262
"agentDeploymentName": {
63-
"value": "${AZURE_AI_AGENT_MODEL_NAME}"
63+
"value": "${AZURE_AI_AGENT_MODEL_NAME=gpt-4o-mini}"
6464
},
6565
"agentModelFormat": {
66-
"value": "${AZURE_AI_AGENT_MODEL_FORMAT}"
66+
"value": "${AZURE_AI_AGENT_MODEL_FORMAT=OpenAI}"
6767
},
6868
"agentModelName": {
69-
"value": "${AZURE_AI_AGENT_MODEL_NAME}"
69+
"value": "${AZURE_AI_AGENT_MODEL_NAME=gpt-4o-mini}"
7070
},
7171
"agentModelVersion": {
72-
"value": "${AZURE_AI_AGENT_MODEL_VERSION}"
72+
"value": "${AZURE_AI_AGENT_MODEL_VERSION=2024-07-18}"
7373
},
7474
"agentDeploymentSku": {
75-
"value": "${AZURE_AI_AGENT_DEPLOYMENT_SKU}"
75+
"value": "${AZURE_AI_AGENT_DEPLOYMENT_SKU=GlobalStandard}"
7676
},
7777
"agentDeploymentCapacity": {
78-
"value": "${AZURE_AI_AGENT_DEPLOYMENT_CAPACITY}"
78+
"value": "${AZURE_AI_AGENT_DEPLOYMENT_CAPACITY=80}"
7979
},
8080
"embeddingDeploymentName": {
81-
"value": "${AZURE_AI_EMBED_DEPLOYMENT_NAME}"
81+
"value": "${AZURE_AI_EMBED_DEPLOYMENT_NAME=text-embedding-3-small}"
8282
},
8383
"embedModelFormat": {
84-
"value": "${AZURE_AI_EMBED_MODEL_FORMAT}"
84+
"value": "${AZURE_AI_EMBED_MODEL_FORMAT=OpenAI}"
8585
},
8686
"embedModelName": {
87-
"value": "${AZURE_AI_EMBED_MODEL_NAME}"
87+
"value": "${AZURE_AI_EMBED_MODEL_NAME=text-embedding-3-small}"
8888
},
8989
"embedModelVersion": {
90-
"value": "${AZURE_AI_EMBED_MODEL_VERSION}"
90+
"value": "${AZURE_AI_EMBED_MODEL_VERSION=1}"
9191
},
9292
"embedDeploymentSku": {
93-
"value": "${AZURE_AI_EMBED_DEPLOYMENT_SKU}"
93+
"value": "${AZURE_AI_EMBED_DEPLOYMENT_SKU=Standard}"
9494
},
9595
"embedDeploymentCapacity": {
96-
"value": "${AZURE_AI_EMBED_DEPLOYMENT_CAPACITY}"
96+
"value": "${AZURE_AI_EMBED_DEPLOYMENT_CAPACITY=50}"
9797
},
98-
"embeddingDeploymentDimensions": {
98+
"embeddingDeploymentDimensions": {
9999
"value": "${AZURE_AI_EMBED_DIMENSIONS=100}"
100100
},
101101
"apiAppExists": {

0 commit comments

Comments
 (0)