Fix AI Gateway model registration and runtime routing - #13
Open
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Open
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Paul Yuknewicz (paulyuk) wants to merge 2 commits into
Conversation
Use the current token-limit counter key shape and allow the runtime model route enough time to become available after ARM provisioning completes.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Yuknewicz (paulyuk)
marked this pull request as ready for review
September 22, 2026 00:50
Facundo Santiago (santiagxf)
self-requested a review
September 22, 2026 13:24
Create the default-workspace aliases required for runtime model routing and keep route readiness validation bounded.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Member
Author
|
test verified. and caught cause when model alias not set: |
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
azd upfails ARM validation withInvalid field 'counterKey' specifiedfor both registered models.Root cause
Two AI Gateway control-plane contracts had changed or were missing from the sample:
counterKeyis represented as an array containing lowercaseidentity, not the older scalarIdentityvalue./default/models/...route. Each model also requires a default-workspace alias atMicrosoft.ApiManagement/service/workspaces/aliasesthat targets the provider model resource. The current AI Gateway portal creates this alias after importing a model; the sample Bicep did not.Without the alias, the provider and model resources report
Succeeded, but runtime inference returns404 Resource not foundindefinitely.Fix
counterKey: ['identity']in the token-limit policy.Validation
bash tests/test-ai-gateway-model-registration.shPYTHONPATH=. uv run --with pytest pytest -q— 11 passed, 3 subtests passedgit diff --checkazd provision -e aigw-quickstart-fix1 --no-promptcompleted successfully from the updated Bicepgpt-latestandgpt-mini-latest