Skip to content

Releases

AI Gateway CLI 1.0.0b34 (Public Preview)

Choose a tag to compare

@paulyuk paulyuk released this 17 Nov 06:32
ea30225

Quickstart | CLI Reference | Documentation

Highlights

  • Default control-plane API version 2026-11-01 with 1-line fallback to 2025-09-01-preview: Switches the default Microsoft.ApiManagement/aigateways ARM api-version to 2026-11-01 and adapts model-provider, model, mcp (including re-fetching ETag after listSecrets before If-Match PATCH writes), telemetry-exporter, and inline requestRateLimit / costLimit policy wire shapes transparently. Standard 1-line fallback to 2025-09-01-preview is supported via export 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-01 alignment: Removes unsupported Content Safety policy setters and flags from az aigateway policy and az aigateway model policy while preserving unrecognized server-side policy entries unchanged during read-modify-write policy updates.
  • Multi-target model-alias table output: az aigateway model-alias list -o table and az aigateway model-alias show -o table now render one row per backend target (Name, Gateway, ModelName, Target, Priority, Weight) instead of truncating multi-backend pools to the first target.
  • Actionable @file JSON diagnostics and idempotent policy removal: Malformed @file.json arguments now report the file path, line, column, and JSON parse error directly instead of cascading into shorthand syntax errors, and az aigateway [model] policy remove warns and skips no-op PATCH writes 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-preview

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.0b34/aigateway-1.0.0b34-py3-none-any.whl --yes

Documentation URLs

Release Asset & Checksum

AI Gateway CLI 1.0.0b33 (Public Preview)

Choose a tag to compare

@paulyuk paulyuk released this 16 Nov 17:10
a80e1c5

Quickstart | CLI Reference | Documentation

Highlights

  • Foundry & Azure OpenAI model endpoint defaults and deployment safety: az aigateway model create on Foundry and Azure OpenAI providers now defaults --supported-endpoints to /openai/v1/chat/completions, /openai/v1/responses, and /anthropic/v1/messages instead of /v1/... (preventing HTTP 404 routes on inference). Both model create and model update infer omitted deployment.modelName from /deployments/<name> resource IDs and reject mismatched modelName vs /deployments/<name> values client-side.
  • Model-alias shorthand, piping, and routing validation: az aigateway model-alias create, set, and update accept <provider>/models/<model> shorthand, piped JSON from az aigateway model create -o json (with clear -o json guidance on empty or table stdin), and validate backend pool bounds (1..30) plus integer priority (0..100) and weight (1..100) client-side.
  • MCP OAuth2 grant types, tool-filter semantics, and source helpers: az aigateway mcp create and update support clientCredentials and tokenExchange (entraOnBehalfOf / tokenExchange.federatedClientApplication) OAuth2 credentials without requiring interactive authorizationUrl/tokenUrl/clientId fields; mcp source add supports --url; mcp import reports skipped servers cleanly; mcp authorize validates OAuth2 endpoints cleanly; and mcp update --allow-list null clears an allow-list ("[]" exposes zero tools).
  • Gateway identity, API keys, pagination, and provider cleanup: Enables az aigateway create --mi-user-assigned, adds az aigateway api-key update, wires --max-items / --next-token pagination across child list commands, prevents accidental telemetry-exporter create overwrites, and paginates all alias pages during model-provider delete cleanup.

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

Release Asset & Checksum

AI Gateway CLI 1.0.0b31 (Public Preview)

Choose a tag to compare

@paulyuk paulyuk released this 15 Nov 06:15
d3172ac

Quickstart | CLI Reference | Documentation

Highlights

  • MCP single-source create fix: az aigateway mcp create no longer incorrectly reports a conflict with --endpoints when using a single-source flag such as --url, --mcp, or --open-api. Supplying both --endpoints and 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/mcp

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.0b31/aigateway-1.0.0b31-py3-none-any.whl --yes

Documentation URLs

Release Asset & Checksum

AI Gateway CLI 1.0.0b30 (Public Preview)

Choose a tag to compare

@paulyuk paulyuk released this 13 Nov 16:59
30719d6

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-models to import deployments during create).
    • 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 create and model-provider import accept piped JSON from az cognitiveservices account show or az cognitiveservices account list.
  • First-class MCP --url, --transport, and --namespace flags + GA bug-bash fixes:
    • az aigateway mcp create and az aigateway mcp update now accept --url, --transport (streamableHttp default or sse), and --namespace directly without requiring raw --endpoints JSON.
    • Added pre-flight MCP reachability probing (including HTTP 200, 401, 403, 405, and 421 Misdirected Request), --yes confirmation prompts on destructive commands, and validation improvements.
  • Subscription precedence layering (--subscription):
    • All az aigateway commands now consistently honor --subscription and Azure CLI subscription resolution precedence.
  • MCP OAuth getLoginLinks contract update:
    • Updated MCP OAuth login-link requests to the new scopes + providers contract with automatic fallback for regions still rolling out.

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/mcp

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.0b30/aigateway-1.0.0b30-py3-none-any.whl --yes

Documentation URLs

Release Asset & Checksum

AI Gateway CLI 1.0.0b26 (Preview)

Choose a tag to compare

@paulyuk paulyuk released this 10 Nov 21:50
3a76a19

Quickstart | CLI Reference | AI Gateway Docs

Public preview release of the aigateway Azure CLI extension (1.0.0b26).

Highlights

  • Native az aig shorthand alias: Every az aigateway command and subgroup (model-provider, model, model-alias, mcp, policy, api-key, identity, network, telemetry-exporter), --help entry, and --ids resource target works under both az aigateway and az aig (for example, az aig version, az aig list, az aig model-alias create).
  • Standard SKU validation on gateway create and update: az aigateway create and az aigateway update now restrict --sku choices to Standard (matching the Microsoft.ApiManagement/aigateways resource provider contract) and reject unsupported Premium and Consumption SKU values during CLI argument parsing. Omitting --sku on create continues to default to Standard.

Install or Upgrade

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex

Verify the installed version:

az aigateway version
az aig version

Documentation

Release Asset & Checksum

  • Wheel: aigateway-1.0.0b26-py3-none-any.whl
  • SHA-256: 6cc6a91a3345f558896a2a3f127451faf88096d4456d5c88e81630ce35840e25

AI Gateway CLI 1.0.0b22

Choose a tag to compare

@paulyuk paulyuk released this 04 Nov 17:47
b2204cf

Quickstart | CLI Command Reference | AI Gateway Documentation

Highlights

  • Service-assigned default Standard SKU on az aigateway create: az aigateway create now omits sku from the request payload when --sku is not explicitly provided, letting the Microsoft.ApiManagement/aigateways resource provider apply its default Standard SKU automatically.
  • New-RP networking support (az aigateway network update): Enabled az aigateway network update on Microsoft.ApiManagement/aigateways resources, sending PATCH with properties.publicNetworkAccess and properties.virtualNetworkConfiguration without resending sku or clobbering existing network properties.
  • New-RP private endpoint connections (az aigateway network private-endpoint-connection): Enabled list, show, approve, reject, delete, and wait on Microsoft.ApiManagement/aigateways/privateEndpointConnections, including long-running operation polling on 202 Accepted PUT (approve/reject) and DELETE responses.

Install or Upgrade

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway version

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway version

Documentation

Release Asset & Checksum

  • Wheel: aigateway-1.0.0b22-py3-none-any.whl
  • SHA-256: 3363ee0efde6ec22f445fd11f2b6b625867c1ab49b8ab76108f6e1bfa920060a

AI Gateway CLI 1.0.0b20

Choose a tag to compare

@paulyuk paulyuk released this 30 Oct 23:44
3d2974a

Quickstart | CLI Command Reference | AI Gateway Documentation

Highlights

  • Default Premium SKU on az aigateway create: az aigateway create now defaults --sku to Premium to match the live Microsoft.ApiManagement/aigateways resource provider requirement (--sku Consumption|Premium remains configurable on create and update).
  • Model aliases with priority & weighted routing (az aigateway model-alias): Added az aigateway model-alias (create, show, list, update, delete) to route a stable alias name (--routing-name) across multiple backend models with explicit priority and weight failover/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 live GET responses omit ETag.
  • Gateway-wide default policies (az aigateway policy): Added az 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, plus az aigateway model policy set-cost-limit for per-model spending limits.
  • Application Insights telemetry exporters (az aigateway telemetry-exporter): Added az 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 fixed api-key create when live RP responses omit properties.state.
    • Added az aigateway mcp update --versions and non-destructive --endpoints merge so updating MCP versions or endpoints preserves existing fields.
  • Live 2025-09-01-preview wire compatibility:
    • Added client-side provider filtering for az aigateway model list --model-provider and az aigateway model-provider sync.
    • Restored root api-version query parameter on nextLink pagination URLs when omitted by the service.
    • Added Azure Resource Graph fallback for subscription-level az aigateway list when the RP returns 400 MissingLocation.

Install or Upgrade

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway version

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway version

Documentation

Release Asset & Checksum

  • Wheel: aigateway-1.0.0b20-py3-none-any.whl
  • SHA-256: 5ead91ed79836cc14162ef5354e38bcfc1d2a468560f2fb5560cbe9b98c5a9f4

AI Gateway CLI 1.0.0b18

Pre-release

Choose a tag to compare

@paulyuk paulyuk released this 30 Oct 20:17
c7aff2e

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 live GET responses omit ETag.
  • Gateway-wide default policies (az aigateway policy): Added az 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, plus az aigateway model policy set-cost-limit for per-model spending limits.
  • Application Insights telemetry exporters (az aigateway telemetry-exporter): Added az 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 fixed api-key create when live RP responses omit properties.state.
    • Added az aigateway mcp update --versions and non-destructive --endpoints merge so updating MCP versions or endpoints preserves existing fields.
  • Live 2025-09-01-preview wire compatibility:
    • Added client-side provider filtering for az aigateway model list --model-provider and az aigateway model-provider sync.
    • Restored root api-version query parameter on nextLink pagination URLs when omitted by the service.
    • Added Azure Resource Graph fallback for subscription-level az aigateway list when the RP returns 400 MissingLocation.

Install or Upgrade

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway version

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway version

Documentation

Release Asset & Checksum

  • Wheel: aigateway-1.0.0b18-py3-none-any.whl
  • SHA-256: 6905918904aa821e0f26098f8fee99082fc73a771f253a33ea58f83e6d47a961

AI Gateway CLI 1.0.0b15

Pre-release

Choose a tag to compare

@paulyuk paulyuk released this 28 Oct 18:22
c299347

Highlights

  • Gateway SKU selection (--sku): az aigateway create and az aigateway update now accept --sku Consumption|Premium (defaults to Consumption on create), and az aigateway list/show -o table includes the Sku column.
  • 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 on Microsoft.ApiManagement/aigateways without 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 --overwrite to az aigateway model-alias create for idempotent script re-runs, and suppressed the non-atomic alias creation warning unless --verbose is passed.
  • API key & model ergonomics:
    • az aigateway api-key create makes --display-name optional (defaults to --name).
    • az aigateway model create defaults --backend-model to --name and infers --api-format from the provider kind (AzureOpenAI for foundry, OpenAI for openai).
    • az aigateway model policy set allows updating --token-period or --token-counter-key on an existing token-limit policy without repeating --token-limit.
  • New-RP-first resolution & redacted --debug logging:
    • Commands now probe Microsoft.ApiManagement/aigateways first before falling back to legacy Microsoft.ApiManagement/service, eliminating unnecessary 404 probes in --debug.
    • --debug now logs the HTTP method, URL, and secret-redacted request body for all child write operations (PUT/PATCH/POST/DELETE).

Install or Upgrade

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash
az aigateway version

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex
az aigateway version

Documentation

Release Asset & Checksum

  • Wheel: aigateway-1.0.0b15-py3-none-any.whl
  • SHA-256: 8d059b7c5e006631ba843f3c4f6e41840d89c71312b13217796da16125a04a6d

AI Gateway CLI 1.0.0b14

Pre-release

Choose a tag to compare

@paulyuk paulyuk released this 27 Oct 20:04
eee3f39

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/aigateways model & policy lifecycle: Unblocks az aigateway model create, az aigateway model update, az aigateway model policy set, set-token-limit, set-content-safety, remove, az aigateway update --tags, and az aigateway api-key regenerate --key-type secondary on standalone aigateways resources with If-Match ETag 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-run to preview, --create-default-aliases to create 1:1 callable model aliases for newly synced models).
  • Composable CLI piping (--ids & JSON stdin): Pipe output from az cognitiveservices account show/list, az aigateway show/list, or az aigateway model show/list directly into az aigateway commands, and configure session defaults with az configure --defaults group=<rg> aigateway=<gw>.
  • ARM-aligned CLI surface: Standardized Foundry onboarding on --foundry-resource-id (with --deployment for single-deployment onboarding), replaced sample-only MCP flags (--learn, --github) with explicit --endpoints, and required explicit --location on az aigateway create.

Install or Upgrade

Requires Azure CLI (2.75.0 or later).

Bash (macOS / Linux)

curl -fsSL https://aka.ms/aigateway-cli-install | bash

PowerShell (Windows / macOS / Linux)

irm https://aka.ms/aigateway-cli-install-ps | iex

Direct 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.whl

Verify

az aigateway version
az aigateway --help

Quick 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 --yes

2. 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=1

Rebalance 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=25

Release Assets

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