Skip to content

Commit bd0aff5

Browse files
fix: update environment variable references for image model in documentation and scripts
1 parent 947ae2d commit bd0aff5

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

docs/CustomizingAzdParameters.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ By default this template will use the environment name as the prefix to prevent
1717
| `AZURE_ENV_GPT_MODEL_CAPACITY` | integer | `150` | Sets the GPT model token capacity (minimum: `10`). |
1818
| `AZURE_ENV_IMAGE_MODEL_NAME` | string | `gpt-image-1-mini` | Image model to deploy (allowed: `gpt-image-1-mini`, `gpt-image-1.5`, `none`). |
1919
| `AZURE_ENV_IMAGE_MODEL_CAPACITY` | integer | `1` | Sets the image model deployment capacity in RPM (minimum: `1`). |
20-
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI service. |
20+
| `AZURE_ENV_OPENAI_API_VERSION` | string | `2025-01-01-preview` | Specifies the API version for Azure OpenAI service. |
2121
| `AZURE_ENV_AI_SERVICE_LOCATION` | string | `<User selects during deployment>` | Sets the Azure region for OpenAI resource deployment. |
22-
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID` | string | `""` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
23-
| `AZURE_ENV_FOUNDRY_PROJECT_RID`| string | `""` | Reuses an existing AI Foundry Project instead of creating a new one. |
24-
| `AZURE_ENV_CONTAINER_REGISTRY_NAME` | string | `contentgencontainerreg` | Sets the existing Azure Container Registry name (without `.azurecr.io`). |
25-
| `AZURE_ENV_IMAGE_TAG` | string | `latest` | Sets the container image tag (e.g., `latest`, `dev`, `hotfix`). |
22+
| `AZURE_ENV_LOG_ANALYTICS_WORKSPACE_RID` | string | `""` | Reuses an existing Log Analytics Workspace instead of creating a new one. |
23+
| `AZURE_ENV_FOUNDRY_PROJECT_RID` | string | `""` | Reuses an existing AI Foundry Project instead of creating a new one. |
24+
| `AZURE_ENV_CONTAINER_REGISTRY_NAME` | string | `contentgencontainerreg` | Sets the existing Azure Container Registry name (without `.azurecr.io`). |
25+
| `AZURE_ENV_IMAGE_TAG` | string | `latest` | Sets the container image tag (e.g., `latest`, `dev`, `hotfix`). |
2626

2727
## How to Set a Parameter
2828

scripts/checkquota.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# bash checkquota.sh none
1515
#
1616
# Usage (CI - via env vars):
17-
# Set AZURE_SUBSCRIPTION_ID, GPT_MIN_CAPACITY, AZURE_REGIONS, IMAGE_MODEL_CHOICE
17+
# Set AZURE_SUBSCRIPTION_ID, GPT_MIN_CAPACITY, AZURE_REGIONS, AZURE_ENV_IMAGE_MODEL_NAME
1818
# Authentication is handled externally via OIDC (az login already done before this script runs)
1919
# =============================================================================
2020

@@ -28,9 +28,9 @@ fi
2828
# ---- Configuration ----
2929
# In local mode, image model can be passed as first argument
3030
if [[ "$RUN_MODE" == "local" ]]; then
31-
IMAGE_MODEL_CHOICE="${1:-${IMAGE_MODEL_CHOICE:-gpt-image-1-mini}}"
31+
AZURE_ENV_IMAGE_MODEL_NAME="${1:-${AZURE_ENV_IMAGE_MODEL_NAME:-gpt-image-1-mini}}"
3232
else
33-
IMAGE_MODEL_CHOICE="${IMAGE_MODEL_CHOICE:-gpt-image-1-mini}"
33+
AZURE_ENV_IMAGE_MODEL_NAME="${AZURE_ENV_IMAGE_MODEL_NAME:-gpt-image-1-mini}"
3434
fi
3535

3636
GPT_MIN_CAPACITY="${GPT_MIN_CAPACITY:-150}"
@@ -53,8 +53,8 @@ IMAGE_MODEL_QUOTA_NAME=(
5353

5454
# ---- Validate image model choice ----
5555
ALLOWED_MODELS=("gpt-image-1-mini" "gpt-image-1.5" "none")
56-
if [[ ! " ${ALLOWED_MODELS[@]} " =~ " ${IMAGE_MODEL_CHOICE} " ]]; then
57-
echo "❌ ERROR: Invalid image model choice: '$IMAGE_MODEL_CHOICE'"
56+
if [[ ! " ${ALLOWED_MODELS[@]} " =~ " ${AZURE_ENV_IMAGE_MODEL_NAME} " ]]; then
57+
echo "❌ ERROR: Invalid image model choice: '$AZURE_ENV_IMAGE_MODEL_NAME'"
5858
echo " Allowed values: ${ALLOWED_MODELS[*]}"
5959
exit 1
6060
fi
@@ -91,7 +91,7 @@ fi
9191
echo ""
9292
echo "📋 Configuration:"
9393
echo " Mode: $RUN_MODE"
94-
echo " Image Model Choice: $IMAGE_MODEL_CHOICE"
94+
echo " Image Model Choice: $AZURE_ENV_IMAGE_MODEL_NAME"
9595
echo " GPT Min Capacity: $GPT_MIN_CAPACITY"
9696
echo " Image Model Min Capacity: $IMAGE_MODEL_MIN_CAPACITY"
9797
echo " Regions to check: ${REGIONS[*]}"
@@ -104,10 +104,10 @@ MIN_CAPACITY=(
104104
)
105105

106106
# Add image model to quota check if not 'none'
107-
IMAGE_QUOTA_NAME="${IMAGE_MODEL_QUOTA_NAME[$IMAGE_MODEL_CHOICE]}"
107+
IMAGE_QUOTA_NAME="${IMAGE_MODEL_QUOTA_NAME[$AZURE_ENV_IMAGE_MODEL_NAME]}"
108108
if [[ -n "$IMAGE_QUOTA_NAME" ]]; then
109109
MIN_CAPACITY["$IMAGE_QUOTA_NAME"]=$IMAGE_MODEL_MIN_CAPACITY
110-
echo "🖼️ Image model '$IMAGE_MODEL_CHOICE' added to quota check (key: $IMAGE_QUOTA_NAME, min capacity: $IMAGE_MODEL_MIN_CAPACITY)"
110+
echo "🖼️ Image model '$AZURE_ENV_IMAGE_MODEL_NAME' added to quota check (key: $IMAGE_QUOTA_NAME, min capacity: $IMAGE_MODEL_MIN_CAPACITY)"
111111
else
112112
echo "ℹ️ Image model set to 'none' — skipping image model quota check."
113113
fi
@@ -170,7 +170,7 @@ echo ""
170170
echo "========================================"
171171
if [ -z "$VALID_REGION" ]; then
172172
echo "❌ No region with sufficient quota found!"
173-
echo " Image Model: $IMAGE_MODEL_CHOICE"
173+
echo " Image Model: $AZURE_ENV_IMAGE_MODEL_NAME"
174174
echo " Checked regions: ${REGIONS[*]}"
175175

176176
# In CI mode, set GITHUB_ENV variable instead of exiting with error

0 commit comments

Comments
 (0)