Skip to content

Commit 4751e0c

Browse files
Add documentation for deploying with limited Azure OpenAI quota
1 parent b17a9c4 commit 4751e0c

File tree

1 file changed

+99
-0
lines changed

1 file changed

+99
-0
lines changed

docs/DeployWithLimitedQuota.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Deploying with Limited OpenAI Quota
2+
3+
This document provides guidance on deploying the Document Generation Solution Accelerator when you have limited Azure OpenAI model quota available.
4+
5+
## Overview
6+
7+
By default, the solution requires:
8+
- **GPT model**: 200,000 Tokens Per Minute (TPM)
9+
- **Embedding model**: 80,000 TPM
10+
11+
If your Azure OpenAI service has lower quota limits, you can modify the deployment to work with reduced capacity.
12+
13+
## Prerequisites
14+
15+
Before proceeding, ensure you have:
16+
- Azure Developer CLI (azd) installed
17+
- Access to your Azure OpenAI service quota settings
18+
- Knowledge of your current TPM limits
19+
20+
## Deployment Options
21+
22+
You have two approaches to deploy with less quota:
23+
24+
### Option 1: Remove Quota Validation
25+
26+
Remove the metadata section (lines 73-81) from the [`infra/main.bicep`](../infra/main.bicep) file:
27+
28+
```bicep
29+
@metadata({
30+
azd: {
31+
type: 'location'
32+
usageName: [
33+
'OpenAI.GlobalStandard.gpt-4o-mini,200'
34+
'OpenAI.GlobalStandard.text-embedding-ada-002,80'
35+
]
36+
}
37+
})
38+
```
39+
40+
### Option 2: Modify Quota Thresholds (Recommended)
41+
42+
Update the values on lines 77-78 in [`infra/main.bicep`](../infra/main.bicep) to match your available quota:
43+
44+
```bicep
45+
@metadata({
46+
azd: {
47+
type: 'location'
48+
usageName: [
49+
'OpenAI.GlobalStandard.gpt4.1, 50' // Changed from 200
50+
'OpenAI.GlobalStandard.text-embedding-ada-002, 50' // Changed from 80
51+
]
52+
}
53+
})
54+
```
55+
56+
## Configuration Steps
57+
58+
After modifying the Bicep file, configure your deployment capacity:
59+
60+
```powershell
61+
azd env set AZURE_ENV_MODEL_CAPACITY="50"
62+
azd env set AZURE_ENV_EMBEDDING_MODEL_CAPACITY="50"
63+
```
64+
65+
> **Note**: Adjust the values (50) to match your actual available quota.
66+
67+
## Deploy the Solution
68+
69+
Once configured, proceed with deployment:
70+
71+
```powershell
72+
azd up
73+
```
74+
75+
## Performance Considerations
76+
77+
⚠️ **Important**: Using reduced TPM limits may impact application performance:
78+
79+
For optimal performance, we recommend maintaining at least 150,000 TPM for GPT models when possible.
80+
81+
## Additional Resources
82+
83+
For more detailed information, refer to:
84+
85+
- [Deployment Guide](DeploymentGuide.md) - Complete deployment instructions
86+
- [Customizing azd Parameters](CustomizingAzdParameters.md) - Advanced configuration options
87+
- [Check or update Quota](AzureGPTQuotaSettings.md) - Check or update quota from Azure Portal
88+
- [Quota Check](QuotaCheck.md) - Script for checking Azure OpenAI quota limits
89+
90+
## Why we need to do this?
91+
- The solution uses built-in Azure Developer CLI (azd) quota validation to prevent deployment failures. Specifically, azd performs pre-deployment checks to ensure sufficient quota is available i.e. 200k TPM for gpt model and 80k TPM for embedding model.
92+
93+
- These quota thresholds are hardcoded in the infrastructure file because azd's quota checking mechanism doesn't currently support parameterized values. If your Azure OpenAI service has quota below these thresholds, the deployment will fail during the validation phase rather than proceeding and failing later in the process.
94+
95+
- By following the steps above, you can either:
96+
1. **Bypass quota validation entirely** by removing the metadata block
97+
2. **Lower the validation thresholds** to match your available quota (e.g., 50,000 TPM)
98+
99+
- This ensures successful deployment while working within your quota constraints.

0 commit comments

Comments
 (0)