Repository navigation
Releases
AI Gateway CLI 1.0.0b34 (Public Preview)
Quickstart | CLI Reference | Documentation
Highlights
- Default control-plane API version
2026-11-01with 1-line fallback to2025-09-01-preview: Switches the defaultMicrosoft.ApiManagement/aigatewaysARMapi-versionto2026-11-01and adaptsmodel-provider,model,mcp(including re-fetchingETagafterlistSecretsbeforeIf-MatchPATCHwrites),telemetry-exporter, and inlinerequestRateLimit/costLimitpolicy wire shapes transparently. Standard 1-line fallback to2025-09-01-previewis supported viaexport AZURE_AIGATEWAY_API_VERSION=2025-09-01-preview,az config set aigateway.api_version=2025-09-01-preview, or per-command--api-version 2025-09-01-preview. - Content Safety policy CLI commands and flags disabled pending
2026-11-01alignment: Removes unsupported Content Safety policy setters and flags fromaz aigateway policyandaz aigateway model policywhile preserving unrecognized server-side policy entries unchanged during read-modify-write policy updates. - Multi-target
model-aliastable output:az aigateway model-alias list -o tableandaz aigateway model-alias show -o tablenow render one row per backend target (Name,Gateway,ModelName,Target,Priority,Weight) instead of truncating multi-backend pools to the first target. - Actionable
@fileJSON diagnostics and idempotent policy removal: Malformed@file.jsonarguments now report the file path, line, column, and JSON parse error directly instead of cascading into shorthand syntax errors, andaz aigateway [model] policy removewarns and skips no-opPATCHwrites when a requested policy type is not configured on the resource.
Canonical DX
# 1. Create a gateway and configure model policies against 2026-11-01 (default)
az aigateway create -g rg-ai -n gw-01 -l eastus2
az aigateway model policy set \
-g rg-ai \
--gateway-name gw-01 \
--provider-name foundry-eastus2 \
-n gpt-5-mini \
--token-limit 50000 --token-period minute \
--cost-limit 100.50 --cost-period month
# 2. Inspect multi-target alias priorities and weights in table view
az aigateway model-alias list -g rg-ai --gateway-name gw-01 -o table
# 3. Optional 1-line fallback to 2025-09-01-preview
export AZURE_AIGATEWAY_API_VERSION=2025-09-01-preview
# Or persistent CLI config / single-command override:
az config set aigateway.api_version=2025-09-01-preview
az aigateway show -g rg-ai -n gw-01 --api-version 2025-09-01-previewInstall or Upgrade
macOS / Linux / WSL / Cloud Shell (Bash)
curl -fsSL https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.ps1 | iexDirect Wheel Install
az extension remove --name aigateway 2>/dev/null || true
az extension add --upgrade --source https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b34/aigateway-1.0.0b34-py3-none-any.whl --yesDocumentation URLs
- Quickstart & Overview: https://github.com/Azure/aigateway/blob/main/cli/README.md
- Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Labs Quickstart: https://github.com/Azure/aigateway/blob/main/labs/quickstart/README.md
Release Asset & Checksum
- Asset:
aigateway-1.0.0b34-py3-none-any.whl - Download URL: https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b34/aigateway-1.0.0b34-py3-none-any.whl
- SHA-256:
f4f1c509ccf0e8c5f135604f318bc60077eb14b4cef9036456f266874b9c5c86 - Checksum file:
SHA256SUMS
AI Gateway CLI 1.0.0b33 (Public Preview)
Quickstart | CLI Reference | Documentation
Highlights
- Foundry & Azure OpenAI model endpoint defaults and deployment safety:
az aigateway model createon Foundry and Azure OpenAI providers now defaults--supported-endpointsto/openai/v1/chat/completions,/openai/v1/responses, and/anthropic/v1/messagesinstead of/v1/...(preventing HTTP 404 routes on inference). Bothmodel createandmodel updateinfer omitteddeployment.modelNamefrom/deployments/<name>resource IDs and reject mismatchedmodelNamevs/deployments/<name>values client-side. - Model-alias shorthand, piping, and routing validation:
az aigateway model-alias create,set, andupdateaccept<provider>/models/<model>shorthand, piped JSON fromaz aigateway model create -o json(with clear-o jsonguidance on empty or table stdin), and validate backend pool bounds (1..30) plus integerpriority(0..100) andweight(1..100) client-side. - MCP OAuth2 grant types, tool-filter semantics, and source helpers:
az aigateway mcp createandupdatesupportclientCredentialsandtokenExchange(entraOnBehalfOf/tokenExchange.federatedClientApplication) OAuth2 credentials without requiring interactiveauthorizationUrl/tokenUrl/clientIdfields;mcp source addsupports--url;mcp importreports skipped servers cleanly;mcp authorizevalidates OAuth2 endpoints cleanly; andmcp update --allow-list nullclears an allow-list ("[]"exposes zero tools). - Gateway identity, API keys, pagination, and provider cleanup: Enables
az aigateway create --mi-user-assigned, addsaz aigateway api-key update, wires--max-items/--next-tokenpagination across childlistcommands, prevents accidentaltelemetry-exporter createoverwrites, and paginates all alias pages duringmodel-provider deletecleanup.
Canonical DX
# 1. Register a Foundry model (defaults to /openai/v1/chat/completions and infers modelName)
az aigateway model create \
-g rg-ai \
--gateway-name gw-01 \
--provider-name foundry-eastus \
-n gpt-5-mini \
--api-format OpenAIChatCompletions \
--deployment-config '{"resourceId":"/subscriptions/.../accounts/my-foundry/deployments/gpt-5-mini"}'
# 2. Route an alias across two backend models with explicit priority and weights
az aigateway model-alias create \
-g rg-ai \
--gateway-name gw-01 \
-n prod-chat \
--models '[
{"model":"foundry-eastus/models/gpt-5-mini","priority":1,"weight":80},
{"model":"foundry-westus2/models/gpt-5-mini","priority":2,"weight":20}
]'
# 3. Clear an MCP tool allow-list to expose all tools again
az aigateway mcp update \
-g rg-ai \
--gateway-name gw-01 \
-n learn \
--allow-list null
Install or Upgrade
macOS / Linux / WSL / Cloud Shell (Bash)
curl -fsSL https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.sh | bash
Windows (PowerShell)
irm https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.ps1 | iex
Direct Wheel Install
az extension remove --name aigateway 2>/dev/null || true
az extension add --upgrade --source https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b33/aigateway-1.0.0b33-py3-none-any.whl --yes
Documentation URLs
- Quickstart & Overview: https://github.com/Azure/aigateway/blob/main/cli/README.md
- Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Labs Quickstart: https://github.com/Azure/aigateway/blob/main/labs/quickstart/README.md
Release Asset & Checksum
- Asset:
aigateway-1.0.0b33-py3-none-any.whl - Download URL: https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b33/aigateway-1.0.0b33-py3-none-any.whl
- SHA-256:
49909014681c150da8b64ccdc2a9822f7fe062afee692c3696b5126687262a4c - Checksum file:
SHA256SUMS
AI Gateway CLI 1.0.0b31 (Public Preview)
Quickstart | CLI Reference | Documentation
Highlights
- MCP single-source create fix:
az aigateway mcp createno longer incorrectly reports a conflict with--endpointswhen using a single-source flag such as--url,--mcp, or--open-api. Supplying both--endpointsand single-source flags is still rejected.
Canonical DX
az aigateway mcp create \
-g my-rg \
--gateway-name my-gw \
-n learn \
--url https://learn.microsoft.com/api/mcpInstall or Upgrade
macOS / Linux / WSL / Cloud Shell (Bash)
curl -fsSL https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.ps1 | iexDirect Wheel Install
az extension remove --name aigateway 2>/dev/null || true
az extension add --upgrade --source https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b31/aigateway-1.0.0b31-py3-none-any.whl --yesDocumentation URLs
- Quickstart & Overview: https://github.com/Azure/aigateway/blob/main/cli/README.md
- Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Labs Quickstart: https://github.com/Azure/aigateway/blob/main/labs/quickstart/README.md
Release Asset & Checksum
- Asset:
aigateway-1.0.0b31-py3-none-any.whl - Download URL: https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b31/aigateway-1.0.0b31-py3-none-any.whl
- SHA-256:
f8f13bfb1f5ca44b97675096e0e5361e09c7e62e74a73401e39ac1acafa3b4d4 - Checksum file:
SHA256SUMS
AI Gateway CLI 1.0.0b30 (Public Preview)
Quickstart | CLI Reference | Documentation
Highlights
- Explicit Foundry provider vs. bulk model import split:
az aigateway model-provider create -g <rg> --gateway-name <gw> [-n <provider-name>] --foundry-resource-id <foundry-arm-id>registers the Foundry model provider resource and configures RBAC without importing model deployments (pass--import-modelsto import deployments duringcreate).az aigateway model-provider import -g <rg> --gateway-name <gw> [-n <provider-name>] --foundry-resource-id <foundry-arm-id>runs the full one-step Foundry onboarding workflow (RBAC role assignment, provider creation/update, and bulk import of all deployed models).- Both
model-provider createandmodel-provider importaccept piped JSON fromaz cognitiveservices account showoraz cognitiveservices account list.
- First-class MCP
--url,--transport, and--namespaceflags + GA bug-bash fixes:az aigateway mcp createandaz aigateway mcp updatenow accept--url,--transport(streamableHttpdefault orsse), and--namespacedirectly without requiring raw--endpointsJSON.- Added pre-flight MCP reachability probing (including HTTP
200,401,403,405, and421 Misdirected Request),--yesconfirmation prompts on destructive commands, and validation improvements.
- Subscription precedence layering (
--subscription):- All
az aigatewaycommands now consistently honor--subscriptionand Azure CLI subscription resolution precedence.
- All
- MCP OAuth
getLoginLinkscontract update:- Updated MCP OAuth login-link requests to the new
scopes+providerscontract with automatic fallback for regions still rolling out.
- Updated MCP OAuth login-link requests to the new
Canonical DX
# Register only the Foundry model-provider resource (no model import)
az aigateway model-provider create \
-g my-rg \
--gateway-name my-gw \
-n foundry-eastus \
--foundry-resource-id "$FOUNDRY_RESOURCE_ID"
# Full Foundry onboarding: RBAC + provider + bulk model import
az aigateway model-provider import \
-g my-rg \
--gateway-name my-gw \
-n foundry-eastus \
--foundry-resource-id "$FOUNDRY_RESOURCE_ID"
# Register a streamable HTTP MCP server with first-class flags
az aigateway mcp create \
-g my-rg \
--gateway-name my-gw \
-n learn \
--url https://learn.microsoft.com/api/mcpInstall or Upgrade
macOS / Linux / WSL / Cloud Shell (Bash)
curl -fsSL https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.sh | bashWindows (PowerShell)
irm https://raw.githubusercontent.com/Azure/aigateway/main/cli/install.ps1 | iexDirect Wheel Install
az extension remove --name aigateway 2>/dev/null || true
az extension add --upgrade --source https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b30/aigateway-1.0.0b30-py3-none-any.whl --yesDocumentation URLs
- Quickstart & Overview: https://github.com/Azure/aigateway/blob/main/cli/README.md
- Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Labs Quickstart: https://github.com/Azure/aigateway/blob/main/labs/quickstart/README.md
Release Asset & Checksum
- Asset:
aigateway-1.0.0b30-py3-none-any.whl - Download URL: https://github.com/Azure/aigateway/releases/download/cli-v1.0.0b30/aigateway-1.0.0b30-py3-none-any.whl
- SHA-256:
b62000e4bdcb99bd812e9da574bb0e44711960d7657a3c4aa16c63455586fd16
AI Gateway CLI 1.0.0b26 (Preview)
Quickstart | CLI Reference | AI Gateway Docs
Public preview release of the aigateway Azure CLI extension (1.0.0b26).
Highlights
- Native
az aigshorthand alias: Everyaz aigatewaycommand and subgroup (model-provider,model,model-alias,mcp,policy,api-key,identity,network,telemetry-exporter),--helpentry, and--idsresource target works under bothaz aigatewayandaz aig(for example,az aig version,az aig list,az aig model-alias create). - Standard SKU validation on gateway create and update:
az aigateway createandaz aigateway updatenow restrict--skuchoices toStandard(matching theMicrosoft.ApiManagement/aigatewaysresource provider contract) and reject unsupportedPremiumandConsumptionSKU values during CLI argument parsing. Omitting--skuoncreatecontinues to default toStandard.
Install or Upgrade
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bashPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iexVerify the installed version:
az aigateway version
az aig versionDocumentation
- Quickstart & Installation Guide: https://github.com/Azure/aigateway/blob/main/cli/README.md
- CLI Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Product Documentation: https://aka.ms/aigateway/docs
Release Asset & Checksum
- Wheel:
aigateway-1.0.0b26-py3-none-any.whl - SHA-256:
6cc6a91a3345f558896a2a3f127451faf88096d4456d5c88e81630ce35840e25
AI Gateway CLI 1.0.0b22
Quickstart | CLI Command Reference | AI Gateway Documentation
Highlights
- Service-assigned default
StandardSKU onaz aigateway create:az aigateway createnow omitsskufrom the request payload when--skuis not explicitly provided, letting theMicrosoft.ApiManagement/aigatewaysresource provider apply its defaultStandardSKU automatically. - New-RP networking support (
az aigateway network update): Enabledaz aigateway network updateonMicrosoft.ApiManagement/aigatewaysresources, sendingPATCHwithproperties.publicNetworkAccessandproperties.virtualNetworkConfigurationwithout resendingskuor clobbering existing network properties. - New-RP private endpoint connections (
az aigateway network private-endpoint-connection): Enabledlist,show,approve,reject,delete, andwaitonMicrosoft.ApiManagement/aigateways/privateEndpointConnections, including long-running operation polling on202 AcceptedPUT(approve/reject) andDELETEresponses.
Install or Upgrade
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway versionPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway versionDocumentation
- Quickstart: https://github.com/Azure/aigateway/blob/main/cli/README.md#quickstart
- CLI Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Documentation: https://aka.ms/aigateway/docs
Release Asset & Checksum
- Wheel:
aigateway-1.0.0b22-py3-none-any.whl - SHA-256:
3363ee0efde6ec22f445fd11f2b6b625867c1ab49b8ab76108f6e1bfa920060a
AI Gateway CLI 1.0.0b20
Quickstart | CLI Command Reference | AI Gateway Documentation
Highlights
- Default
PremiumSKU onaz aigateway create:az aigateway createnow defaults--skutoPremiumto match the liveMicrosoft.ApiManagement/aigatewaysresource provider requirement (--sku Consumption|Premiumremains configurable oncreateandupdate). - Model aliases with priority & weighted routing (
az aigateway model-alias): Addedaz aigateway model-alias(create,show,list,update,delete) to route a stable alias name (--routing-name) across multiple backend models with explicitpriorityandweightfailover/load-balancing settings. - Non-destructive model & gateway policy updates (
model policy&policy): Updating token limits, content safety, or cost limits preserves sibling policies on the model or workspace instead of overwriting them, and falls back gracefully when liveGETresponses omitETag. - Gateway-wide default policies (
az aigateway policy): Addedaz aigateway policy(set,set-token-limit,set-content-safety,set-cost-limit,show/list,remove) to configure default token, content-safety, and cost limits across the gateway's default workspace, plusaz aigateway model policy set-cost-limitfor per-model spending limits. - Application Insights telemetry exporters (
az aigateway telemetry-exporter): Addedaz aigateway telemetry-exporter(create,show,list,update,delete,wait) to manage gateway telemetry exporters. - API key & MCP updates:
- Added
az aigateway api-key update(--display-name,--state) to rename or toggle keys without regenerating secrets, and fixedapi-key createwhen live RP responses omitproperties.state. - Added
az aigateway mcp update --versionsand non-destructive--endpointsmerge so updating MCP versions or endpoints preserves existing fields.
- Added
- Live
2025-09-01-previewwire compatibility:- Added client-side provider filtering for
az aigateway model list --model-providerandaz aigateway model-provider sync. - Restored root
api-versionquery parameter onnextLinkpagination URLs when omitted by the service. - Added Azure Resource Graph fallback for subscription-level
az aigateway listwhen the RP returns400 MissingLocation.
- Added client-side provider filtering for
Install or Upgrade
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway versionPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway versionDocumentation
- Quickstart: https://github.com/Azure/aigateway/blob/main/cli/README.md#quickstart
- CLI Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Documentation: https://aka.ms/aigateway/docs
Release Asset & Checksum
- Wheel:
aigateway-1.0.0b20-py3-none-any.whl - SHA-256:
5ead91ed79836cc14162ef5354e38bcfc1d2a468560f2fb5560cbe9b98c5a9f4
AI Gateway CLI 1.0.0b18
Quickstart | CLI Command Reference | AI Gateway Documentation
Highlights
- Non-destructive model & gateway policy updates (
model policy&policy): Updating token limits, content safety, or cost limits preserves sibling policies on the model or workspace instead of overwriting them, and falls back gracefully when liveGETresponses omitETag. - Gateway-wide default policies (
az aigateway policy): Addedaz aigateway policy(set,set-token-limit,set-content-safety,set-cost-limit,show/list,remove) to configure default token, content-safety, and cost limits across the gateway's default workspace, plusaz aigateway model policy set-cost-limitfor per-model spending limits. - Application Insights telemetry exporters (
az aigateway telemetry-exporter): Addedaz aigateway telemetry-exporter(create,show,list,update,delete,wait) to manage gateway telemetry exporters. - API key & MCP updates:
- Added
az aigateway api-key update(--display-name,--state) to rename or toggle keys without regenerating secrets, and fixedapi-key createwhen live RP responses omitproperties.state. - Added
az aigateway mcp update --versionsand non-destructive--endpointsmerge so updating MCP versions or endpoints preserves existing fields.
- Added
- Live
2025-09-01-previewwire compatibility:- Added client-side provider filtering for
az aigateway model list --model-providerandaz aigateway model-provider sync. - Restored root
api-versionquery parameter onnextLinkpagination URLs when omitted by the service. - Added Azure Resource Graph fallback for subscription-level
az aigateway listwhen the RP returns400 MissingLocation.
- Added client-side provider filtering for
Install or Upgrade
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway versionPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway versionDocumentation
- Quickstart: https://github.com/Azure/aigateway/blob/main/cli/README.md#quickstart
- CLI Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Documentation: https://aka.ms/aigateway/docs
Release Asset & Checksum
- Wheel:
aigateway-1.0.0b18-py3-none-any.whl - SHA-256:
6905918904aa821e0f26098f8fee99082fc73a771f253a33ea58f83e6d47a961
AI Gateway CLI 1.0.0b15
Highlights
- Gateway SKU selection (
--sku):az aigateway createandaz aigateway updatenow accept--sku Consumption|Premium(defaults toConsumptiononcreate), andaz aigateway list/show -o tableincludes theSkucolumn. - Partial provider configuration updates (
model-provider update):az aigateway model-provider update --foundry ...and--custom ...deep-merge partial JSON updates with the existing provider configuration onMicrosoft.ApiManagement/aigatewayswithout requiring unchanged fields or existing API keys. - Multi-provider Foundry bulk import:
az aigateway model-provider create --foundry-resource-id <id>scopes duplicate-deployment checks per provider so multiple Foundry providers can register models with the same deployment name, and automatically cleans up an empty provider if onboarding fails before any model is created. - Idempotent model alias creation (
model-alias create --overwrite): Added--overwritetoaz aigateway model-alias createfor idempotent script re-runs, and suppressed the non-atomic alias creation warning unless--verboseis passed. - API key & model ergonomics:
az aigateway api-key createmakes--display-nameoptional (defaults to--name).az aigateway model createdefaults--backend-modelto--nameand infers--api-formatfrom the provider kind (AzureOpenAIforfoundry,OpenAIforopenai).az aigateway model policy setallows updating--token-periodor--token-counter-keyon an existing token-limit policy without repeating--token-limit.
- New-RP-first resolution & redacted
--debuglogging:- Commands now probe
Microsoft.ApiManagement/aigatewaysfirst before falling back to legacyMicrosoft.ApiManagement/service, eliminating unnecessary404probes in--debug. --debugnow logs the HTTP method, URL, and secret-redacted request body for all child write operations (PUT/PATCH/POST/DELETE).
- Commands now probe
Install or Upgrade
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway versionPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway versionDocumentation
- Quickstart: https://github.com/Azure/aigateway/blob/main/cli/README.md#quickstart
- CLI Command Reference: https://github.com/Azure/aigateway/blob/main/cli/command-reference.md
- AI Gateway Documentation: https://aka.ms/aigateway/docs
Release Asset & Checksum
- Wheel:
aigateway-1.0.0b15-py3-none-any.whl - SHA-256:
8d059b7c5e006631ba843f3c4f6e41840d89c71312b13217796da16125a04a6d
AI Gateway CLI 1.0.0b14
AI Gateway CLI 1.0.0b14 — Public Preview
Azure CLI extension for creating and managing Azure AI Gateway resources, model providers, callable model aliases, MCP tool servers, policies, API keys, identities, and networking with az aigateway.
Targets Microsoft.ApiManagement/aigateways@2025-09-01-preview (while continuing to support existing Microsoft.ApiManagement/service@2025-09-01-preview AI Gateway resources).
What's New in 1.0.0b14
Following 1.0.0b12 (1.0.0b13 was an internal CI build serial), 1.0.0b14 completes the standalone Microsoft.ApiManagement/aigateways management surface and adds provider synchronization and pipeline ergonomics:
- Complete
Microsoft.ApiManagement/aigatewaysmodel & policy lifecycle: Unblocksaz aigateway model create,az aigateway model update,az aigateway model policy set,set-token-limit,set-content-safety,remove,az aigateway update --tags, andaz aigateway api-key regenerate --key-type secondaryon standaloneaigatewaysresources withIf-MatchETag concurrency protection. - Foundry provider synchronization (
az aigateway model-provider sync): Reconciles registered gateway models against an existing Foundry AI Services or Azure OpenAI account's current deployments (--dry-runto preview,--create-default-aliasesto create 1:1 callable model aliases for newly synced models). - Composable CLI piping (
--ids& JSON stdin): Pipe output fromaz cognitiveservices account show/list,az aigateway show/list, oraz aigateway model show/listdirectly intoaz aigatewaycommands, and configure session defaults withaz configure --defaults group=<rg> aigateway=<gw>. - ARM-aligned CLI surface: Standardized Foundry onboarding on
--foundry-resource-id(with--deploymentfor single-deployment onboarding), replaced sample-only MCP flags (--learn,--github) with explicit--endpoints, and required explicit--locationonaz aigateway create.
Install or Upgrade
Requires Azure CLI (2.75.0 or later).
Bash (macOS / Linux)
curl -fsSL https://aka.ms/aigateway-cli-install | bashPowerShell (Windows / macOS / Linux)
irm https://aka.ms/aigateway-cli-install-ps | iexDirect wheel install
az extension add --upgrade --yes --source https://github.com/Azure/ai-gateway/releases/download/cli-v1.0.0b14/aigateway-1.0.0b14-py3-none-any.whlVerify
az aigateway version
az aigateway --helpQuick Examples
1. Onboard & synchronize a Foundry account with default callable aliases
FOUNDRY_RESOURCE_ID="$(az cognitiveservices account show -g "$FOUNDRY_RG" -n "$FOUNDRY_ACCOUNT" --query id -o tsv)"
az aigateway model-provider create \
-g "$RG" --gateway-name "$GATEWAY" --name "$PROVIDER" \
--foundry-resource-id "$FOUNDRY_RESOURCE_ID"
az aigateway model-provider sync \
-g "$RG" --gateway-name "$GATEWAY" --name "$PROVIDER" \
--create-default-aliases --yes2. Weighted & priority model alias routing
Create an alias (chat-production, callable by clients as contoso/chat) that splits traffic 50/50 across two registered backend models at priority=0, weight=1:
az aigateway model-alias create \
-g "$RG" --gateway-name "$GATEWAY" -n chat-production --routing-name contoso/chat \
--backend-model resource-id="$MODEL_A_ID" priority=0 weight=1 \
--backend-model resource-id="$MODEL_B_ID" priority=0 weight=1Rebalance traffic to a 75/25 weighted split or promote a fallback tier:
az aigateway model-alias update \
-g "$RG" --gateway-name "$GATEWAY" -n chat-production \
--backend-model resource-id="$MODEL_A_ID" priority=0 weight=75 \
--backend-model resource-id="$MODEL_B_ID" priority=0 weight=25Release Assets
aigateway-1.0.0b14-py3-none-any.whl— Azure CLI extension package (SHA-256: 1b7a576b6828e317832700617c73a7d409cc96a3c208b3fd906fa65e9daaa0c8)SHA256SUMS— SHA-256 checksum manifest
Full documentation: CLI Quickstart · Command Reference
Public preview: Commands and behavior may change before general availability.
Full Changelog: cli-v1.0.0b12...cli-v1.0.0b14