Repository navigation
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 nullInstall 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.0b33/aigateway-1.0.0b33-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.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