Azure / Azure/azure-cli

Non-terminating errors returned for Azure service creation

Open
#30,086 3 comments 0 reactions 0 assignees View on GitHub
act-codegen-extensibility-squad act-observability-squad API Management Auto-Assign Auto-Resolve bug Cognitive Services customer-reported Service Attention
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

### Describe the bug

The following services do not return a terminating error when attempting to execute any of the below CLI commands. This makes error handling rather cumbersome, and it also makes the behavior inconsistent with all of the other `az create` commands.

### API Management Service

> ` az apim api create --api-id apiManagementService.ApiId --service-name $apiManagementServiceName --display-name $apiManagementService.Display --resource-group $resourceGroupName --path $apiManagementService.Path`

### Document Intelligence

> `az cognitiveservices account create --name $documentIntelligenceName --resource-group $resourceGroupName --location $($location.ToUpper() -replace '\s', '') --kind FormRecognizer --sku S0 --output none`

### AI Model

> ` az cognitiveservices account deployment create --name $cognitiveServiceName --resource-group $resourceGroupName --deployment-name chat --model-name gpt-4o --model-version "2024-05-13" --model-format OpenAI --sku-capacity 1 --sku-name "B1" 2>&1`

Note: In addition to the poor error handling, the documentation is quite sparse when trying to create a new AI model using CLI. The only message I get is "_The account deployments are not supported by the current SKU"_. There is no additional information. It would be extremely helpful if I were told which SKUs **_WERE_** supported for the account deployment, so I don't have to guess. Also, what exactly am I supposed to change? Is there a list of supported SKUs or is the issue that my Azure AI service deployment will **_NEVER_** be compatible with the SKUs required to deploy the AI model? If it's the latter, then the error details should state this explicitly.

Here are some of the links I've found that dance around the issue but still don't provide a complete picture:

[Resolve errors for SKU not available](https://learn.microsoft.com/en-us/answers/questions/1408623/problem-creating-a-deployment-with-gpt4-model-curr)

[Problem creating a deployment with GPT4 model. Current subscription does not have feature required by this model](https://learn.microsoft.com/en-us/azure/azure-resource-manager/troubleshooting/error-sku-not-available?tabs=azure-cli)

[The specified scale type 'Standard' of account deployment is not supported by the model 'gpt-4'.](https://learn.microsoft.com/en-us/answers/questions/1510175/the-specified-scale-type-standard-of-account-deplo)

The workaround is to check the output for the error message, but this is clearly not ideal.

### Related command

az cognitiveservices account deployment create

az apim api create

az cognitiveservices account create

### Errors

The account deployments are not supported by the current SKU

### Issue script & Debug output

The account deployments are not supported by the current SKU

### Expected behavior

For the commands to return an actual error message. Since they do not return a terminating error, I can't even debug with `Write-Error`.

### Environment Summary

azure-cli 2.62.0 *

core 2.62.0 *
telemetry 1.1.0

Extensions:
application-insights 1.2.2
init 0.1.0
ml 2.30.1
portal 0.1.3

Dependencies:
msal 1.28.1
azure-mgmt-resource 23.1.1

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.