Repository navigation
Adopt AVM AI Gateway module (avm/res/api-management/aigateway) in infra/main.bicep - #32
Draft
Paul Yuknewicz (paulyuk) wants to merge 1 commit into
Draft
Paul Yuknewicz (paulyuk) wants to merge 1 commit into
Paul Yuknewicz (paulyuk) wants to merge 1 commit into
Conversation
Paul Yuknewicz (paulyuk)
changed the base branch from
copilot/configure-token-limit-content-safety
to
main
November 1, 2026 21:33
…and cross-RG Foundry RBAC Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 4448b1aa-1ea5-4c5f-af63-7ec98b7acb9e
Paul Yuknewicz (paulyuk)
force-pushed
the
copilot/adopt-avm-aigateway-module
branch
from
November 1, 2026 21:36
42512a8 to
4901964
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
infra/main.bicepcurrently invokes a custominfra/ai-gateway/main.bicepwrapper with bespoke parameter arrays (foundryModels,modelAliasesConfig,toolServerConfigs) instead of the standard Azure Verified Module (avm/res/api-management/aigateway). Running a logical test of switching this sample to the new AVM module also surfaced four concrete integration requirements for multi-resource-group Foundry + GitHub MCP samples (all fixed inpaulyuk/bicep-registry-modules@ad26c1a):assignUpstreamRole: true): When AI Gateway uses a system-assigned managed identity (managedIdentities: { systemAssigned: true }),gateway.identity.principalIdmust be granted Azure AI User (53ca6127-db72-4b80-b1b0-d745d6d5456d) on the upstreamfoundryModelsRgaccount beforeworkspaces/default/modelProviders/foundryis provisioned.toolServers/github+ Foundry ProjectRemoteToolconnection):workspaces/default/toolServers/github): RequiresfailureMode: 'failClosed', inlinepolicies(tokenLimit,costLimit,contentSafety), and dictionaryheaderssupporting both plain values (X-MCP-Readonly: 'true',X-MCP-Tools: 'list_pull_requests,list_issues,actions_list') and optional@secure()secret references (Authorizationviasecrets.githubMcpAuth, or injected inpostprovisionfromgh auth token).Microsoft.CognitiveServices/accounts/projects/connections@2025-04-01-preview):infra/ai-gateway/github-connection.bicepreadsexistingapiKeys/default.listSecrets().keyingatewayRgand provisions thegithubRemoteToolproject connection infoundryAgentsRgpointing tohttps://${aiGateway.outputs.defaultHostname}/mcp/github.telemetryExporters(kind: 'ApplicationInsights') to resolveconnectionStringdirectly fromapplicationInsights.resourceIdso subscription-scopedinfra/main.bicepdoes not need to export a secret connection string from a child module.Stack Order
Stacked on top of the active Bicep PRs so those land first and this PR can switch its module path from
./avm/res/api-management/aigateway/main.biceptobr/public:avm/res/api-management/aigateway:0.1.0once the upstream AVM PR is approved:Microsoft.Web/connectorGatewaysmodule aiGatewayininfra/main.biceptoavm/res/api-management/aigatewaySolution & Canonical DX in
infra/main.bicepValidation
az bicep build --file infra/main.bicepcompiles cleanly with zero errors.bash tests/test-ai-gateway-model-registration.shpasses end-to-end.