Skip to content

Update AI Gateway sample to standalone aigateways resources - #1157

Open
ayushhgarg-work wants to merge 1 commit into
mainfrom
ayushhgarg-work/ai-gateway-standalone-resource
Open

ayushhgarg-work wants to merge 1 commit into
mainfrom
ayushhgarg-work/ai-gateway-standalone-resource

Conversation

@ayushhgarg-work

Copy link
Copy Markdown

What changed

Update the existing AI Gateway tier Bicep sample to use the standalone Microsoft.ApiManagement/aigateways resource instead of the legacy API Management service representation.

  • Use 2026-11-01 and SKU Standard for the parent gateway, with compatible 2026-09-01-preview workspace/provider/model/alias/key operations and payloads.
  • Publish a callable model alias while preserving the <connectionName>/<modelName> reference and managed-identity backend access.
  • Derive the runtime URL from properties.frontend.defaultHostname, remove obsolete publisher parameters, and update runtime-key retrieval.
  • Regenerate azuredeploy.json and update the sample's parameters, metadata, README, and scoped RBAC prerequisites.

Scope: seven files under infrastructure/infrastructure-setup-bicep/01-connections/ai-gateway-tier/ only. No shared workflows, other samples, or higher-level infrastructure are changed.

Compatibility: this creates a different Azure resource type; it is not an in-place upgrade of an existing Microsoft.ApiManagement/service. Existing APIM resources are not removed. Custom parameter files must remove publisherEmail and publisherName.

Verification

Local checks, run from the sample directory:

Command / check Result
az bicep build --file .\main.bicep --stdout PASS, with six BCP081 warnings for resource schemas missing from the installed type catalog.
az bicep build --file .\connection.bicep --stdout PASS.
Fresh compiled ARM compared with azuredeploy.json, excluding only compiler generator metadata PASS.
git diff --check PASS.
Sample parameter and metadata JSON parsing PASS.

Use the Standard SKU, compatible preview child operations and payloads, a callable model alias, returned runtime hostname, and scoped permission guidance. Regenerate the sample ARM template and update its parameters and documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 11, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Missing preview child-resource schemas, omitted default-deployment checks, and quota-blocked inference leave deployment-name compatibility and the end-to-end Foundry connection path unverified, requiring validation in an enabled Azure tenant.

No open issues 🎉

What changed in this PR

Updates the Foundry golden-path AI Gateway sample to deploy standalone Microsoft.ApiManagement/aigateways resources instead of the legacy API Management service. This creates a new resource type rather than upgrading or removing existing APIM resources.

Changes:

  • Uses the standalone Standard SKU gateway with compatible preview child operations and a callable model alias, preserving managed-identity backend access.
  • Derives the runtime URL from the returned hostname, updates key retrieval, and removes obsolete publisher parameters.
  • Regenerates the ARM template and documents compatibility, scoped permissions, and live-validation limits.

All paths are under infrastructure/infrastructure-setup-bicep/01-connections/ai-gateway-tier/.

File Description
samples/​parameters.json Removes obsolete publisher parameters.
samples/​connection.parameters.json Updates the example URL to use the returned gateway hostname.
README.md Documents standalone deployment, permissions, compatibility, and validation results.
metadata.json Updates the sample description and publication date.
main.bicep Migrates gateway resources, adds a callable alias, and updates outputs.
connection.bicep Updates key-retrieval guidance and the URL parameter description; connection logic is unchanged.
azuredeploy.json Reflects the Bicep changes in the generated ARM template.

Review effort: Balanced

This branch was successfully deployed

1 active deployment
L4-validation — 3284fb3f Deployed Nov 11, 2026 by ayushhgarg-work via trusted #946
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants