Azure / azure-cli

Azure Command-Line Interface
MIT License
3.97k stars 2.95k forks source link

Azure CLI Bug | az cognitiveservices account deployment create #27348

Open bowman-david opened 1 year ago

bowman-david commented 1 year ago

Describe the bug

Azure CLI Version: $ az --version azure-cli 2.49.0

API Docs: https://learn.microsoft.com/en-us/cli/azure/cognitiveservices/account/deployment?view=azure-cli-latest#az-cognitiveservices-account-deployment-create

The capacity and sku-capacity parameters do not properly work as expected with Azure CLI v2.49.0

Related command

az cognitiveservices account deployment create -

Errors

Command: az cognitiveservices account deployment create --resource-group $AZURE_RESOURCE_GROUP_DEV --name $AOAI_INSTANCE_NAME_DEV --deployment-name $AOAI_DEPLOYMENT_NAME --model-format $AOAI_MODEL_FORMAT --model-name $AOAI_MODEL_NAME --model-version $AOAI_MODEL_VERSION --scale-type $AOAI_SCALE_TYPE --capacity 59

Error: ←[91munrecognized arguments: --capacity 59←[0m Examples from AI knowledge base: ←[96mhttps://aka.ms/cli_ref←[0m ←[90mRead more about the command in reference docs←[0m

Command: az cognitiveservices account deployment create --resource-group $AZURE_RESOURCE_GROUP_DEV --name $AOAI_INSTANCE_NAME_DEV --deployment-name $AOAI_DEPLOYMENT_NAME --model-format $AOAI_MODEL_FORMAT --model-name $AOAI_MODEL_NAME --model-version $AOAI_MODEL_VERSION --scale-type $AOAI_SCALE_TYPE --sku-capacity 59

Error: ←[91munrecognized arguments: --sku-capacity 59←[0m Examples from AI knowledge base: ←[96mhttps://aka.ms/cli_ref←[0m ←[90mRead more about the command in reference docs←[0m

Issue script & Debug output

az cognitiveservices account deployment create --resource-group $AZURE_RESOURCE_GROUP_DEV --name $AOAI_INSTANCE_NAME_DEV --deployment-name $AOAI_DEPLOYMENT_NAME --model-format $AOAI_MODEL_FORMAT --model-name $AOAI_MODEL_NAME --model-version $AOAI_MODEL_VERSION --scale-type $AOAI_SCALE_TYPE --capacity 59

Expected behavior

This should work like it does in the portal UI

Environment Summary

azure-cli 2.49.0

Additional context

No response

azure-client-tools-bot-prd[bot] commented 1 year ago

Hi @bowman-david,

2.49.0 is not the latest Azure CLI(2.52.0).

If you haven't already attempted to do so, please upgrade to the latest Azure CLI version by following https://learn.microsoft.com/en-us/cli/azure/update-azure-cli.

yonzhan commented 1 year ago

Thank you for opening this issue, we will look into it.

bowman-david commented 1 year ago

Thanks-- meanwhile I will upgrade to latest CLI to see if those changes help-- based on release notes on, it might!

ark-msft commented 11 months ago

I was facing the same issue. Upgrade AZ Cli to 2.53.0 and this resolved the issue. Hope that helps.