Skip to content

[Cognitive Services] az cognitiveservices account: Add support for AI Foundry accounts in create and update subcommands#32089

Merged
kairu-ms merged 6 commits intoAzure:devfrom
CarlOchs:cogsvc_20250601_new_acct_args
Sep 22, 2025
Merged

[Cognitive Services] az cognitiveservices account: Add support for AI Foundry accounts in create and update subcommands#32089
kairu-ms merged 6 commits intoAzure:devfrom
CarlOchs:cogsvc_20250601_new_acct_args

Conversation

@CarlOchs
Copy link
Member

@CarlOchs CarlOchs commented Sep 9, 2025

Related command
az cognitiveservices account create
az cognitiveservices account update

Description
This PR adds initial support for AI Foundry Service account management:

  • Bumps azure-mgmt-cognitiveservices package to 13.7.0, mapping to 2025-06-01 API
  • Adds a --allow-project-management argument (default true for AIServices kind), which is required for creating an AI Foundry account
  • Adds support for updating the account kind during an update
    • This is only supported for upgrading Azure OpenAI account kinds to Azure AI Foundry (AIServices kind) or rolling back to an Azure OpenAI account.
  • Updated all but one test to use new api-version. Existing test will be updated once an API bug fix is published

Testing Guide

  • Creating AI Foundry Service account
    az cognitiveservices account create -g testazcli -n testaifoundry--kind AIServices --allow-project-management true --sku S0 --assign-identity -l eastus --yes

  • Upgrade Azure OpenAI account to AI Foundry/Rollback to Azure OpenAI

# Create Azure OpenAI Account
az cognitiveservices account create -g testazcli -n testaoai01 --kind OpenAI --sku S0 --assign-identity -l eastus --yes
# Now Upgrade to AI Foundry
az cognitiveservices account update -g testazcli -n testaoai01 --kind AIServices
# Now Test rollback to OpenAI
az cognitiveservices account update -g testazcli -n testaoai01 --kind OpenAI

History Notes

[Cognitive Services] az cognitiveservices account create: Add --allow-project-management argument
[Cognitive Services] az cognitiveservices account update: Add --kind argument for OpenAI<->AIServices account


This checklist is used to make sure that common guidelines for a pull request are followed.

Copilot AI review requested due to automatic review settings September 9, 2025 20:58
@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Sep 9, 2025

🔄AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
🔄cognitiveservices
🔄latest
🔄3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
🔄consumption
🔄latest
🔄3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
🔄dms
🔄latest
🔄3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
🔄maps
🔄latest
🔄3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
🔄telemetry
🔄latest
🔄3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
🔄vm
🔄latest
🔄3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link

azure-client-tools-bot-prd bot commented Sep 9, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️cognitiveservices
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd cognitiveservices account create cmd cognitiveservices account create added parameter allow_project_management
⚠️ 1006 - ParaAdd cognitiveservices account update cmd cognitiveservices account update added parameter allow_project_management
⚠️ 1006 - ParaAdd cognitiveservices account update cmd cognitiveservices account update added parameter kind

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 9, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link

github-actions bot commented Sep 9, 2025

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for Azure AI Foundry accounts in the Azure CLI Cognitive Services module by upgrading to the 2025-06-01 API version and implementing new functionality for AI Foundry account management.

  • Upgrades azure-mgmt-cognitiveservices package from 13.5.0 to 13.7.0
  • Adds --allow-project-management parameter for creating AI Foundry accounts
  • Enables --kind parameter updates for converting between OpenAI and AIServices account types
  • Updates all tests to use the new API version and improves test reliability

Reviewed Changes

Copilot reviewed 23 out of 37 changed files in this pull request and generated no comments.

File Description
setup.py Bumps azure-mgmt-cognitiveservices dependency to version 13.7.0
requirements.py3.*.txt Updates package version in all platform-specific requirement files
test files Adds decorator imports, updates API versions, and improves test implementations with better resource management

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

kairu-ms
kairu-ms previously approved these changes Sep 17, 2025
@kairu-ms
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@CarlOchs CarlOchs changed the title [Cognitive Services] az cognitiveservices account: Add support for AI Foundry accounts in create and update subcommands [Cognitive Services] az cognitiveservices account:Add support for AI Foundry accounts in create and update subcommands Sep 18, 2025
@CarlOchs
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 32089 in repo Azure/azure-cli

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 19, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@CarlOchs CarlOchs changed the title [Cognitive Services] az cognitiveservices account:Add support for AI Foundry accounts in create and update subcommands [Cognitive Services] az cognitiveservices account: Add support for AI Foundry accounts in create and update subcommands Sep 19, 2025
@CarlOchs
Copy link
Member Author

Thanks @yonzhan @kairu-ms! I believe I fixed up the PR title issues. Can I get another /azp run, then re-approval if that passes?

@yonzhan
Copy link
Collaborator

yonzhan commented Sep 19, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@kairu-ms kairu-ms merged commit 8cdf07e into Azure:dev Sep 22, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Cognitive Services az cognitiveservices

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants