Skip to content

azd up still fails on free subscriptions after fix #8537 — is OpenAI.S0.AccountCount limit=1 the blocker? #8563

Description

@Prachig-Microsoft

Problem

After upgrading to azd 1.25.5 (which includes the fix from PR #8537 (https://github.com/microsoft/customer-chatbot-solution-accelerator/issues/8537) for #8533 (https://github.com/microsoft/customer-chatbot-solution-accelerator/issues/8533)), azd up still fails on free Azure subscriptions with the same quota error when deploying templates with @metadata usageName.

Error

ERROR: prompting for value: getting locations with quota: no location found with enough quota for
OpenAI.GlobalStandard.gpt4.1-mini ( Cap: 1 ) and OpenAI.GlobalStandard.gpt-realtime-mini ( Cap: 1 )

Environment

What we observed

We ran azd up --debug and noticed the /usages API is no longer returning empty — it returns 200 OK with 212 items of real quota data. So the empty-response fix from #8537 (https://github.com/microsoft/customer-chatbot-solution-accelerator/issues/8537) is not the code path being hit.

We then called the API directly to check model quota:

$token = azd auth token --scope https://management.azure.com/.default
$headers = @{Authorization="Bearer $token"}
$response = Invoke-RestMethod -Uri "https://management.azure.com/subscriptions/{subId}/providers/Microsoft.CognitiveServices/locations/eastus2/usages?api-version=2025-06-01" -Headers $headers
$response.value | Where-Object { $.name.value -like "gpt" -or $.name.value -eq "OpenAI.S0.AccountCount" }

Results:

  • OpenAI.GlobalStandard.gpt4.1-mini → Limit: 5000, Current: 100, Remaining: 4900
  • OpenAI.GlobalStandard.gpt-realtime-mini → Limit: 20, Current: 2, Remaining: 18
  • OpenAI.S0.AccountCount → Limit: 1, Current: 0, Remaining: 1

Model quota is clearly sufficient. However, we noticed that OpenAI.S0.AccountCount has a limit of only 1 on this free subscription (same across all regions — eastus2, francecentral, swedencentral).

Question

We see in prompt.go (https://github.com/Azure/azure-dev/blob/main/cli/azd/pkg/infra/provisioning/bicep/prompt.go) that locationsWithQuotaFor() injects a hardcoded requirement:

requirements := []ai.QuotaRequirement{
{UsageName: "OpenAI.S0.AccountCount", MinCapacity: 2},
}

Is this MinCapacity: 2 the reason free subscriptions are being rejected? Since the API reports OpenAI.S0.AccountCount remaining=1 and the code requires 2, every location would fail the check — even though the actual model quota is more than enough.

How can free-tier users verify this is their blocker? We couldn't find OpenAI.S0.AccountCount in the Azure Portal Quotas page . The only way we found to check is via the REST API call above.

Should MinCapacity be reduced to 1? Our deployment only creates 1 AI Services account and succeeds when we remove the usageName metadata (bypassing the quota check entirely).

Workaround

Commenting out the usageName array from the @metadata block bypasses the quota pre-check and deployment succeeds:

Before (fails):

@metadata({
azd:{
type: 'location'
usageName: [
'OpenAI.GlobalStandard.gpt4.1-mini,50'
'OpenAI.GlobalStandard.gpt-realtime-mini,1'
]
}
})

After (works — deployment completes successfully):

@metadata({
azd:{
type: 'location'
// usageName: [
// 'OpenAI.GlobalStandard.gpt4.1-mini,50'
// 'OpenAI.GlobalStandard.gpt-realtime-mini,1'
// ]
}
})

This confirms the model quota is actually available and only the azd pre-check is blocking the deployment.

Related

Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions