Skip to content

Add the Azure AI Gateway hands-on labs site - #25

Merged
anishtallapureddy merged 63 commits into
mainfrom
vieiraae-ai-gateway-labs-site
Nov 6, 2026
Merged

anishtallapureddy merged 63 commits into
mainfrom
vieiraae-ai-gateway-labs-site

Conversation

@vieiraae

@vieiraae Alex Vieira (vieiraae) commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

What this adds

Azure AI Gateway Labs has 26 hands-on labs: a 5-minute quick start, plus labs 00–24. Each lab has portal, Azure CLI, and Bicep + azd tracks, and some also have a notebook. The site is published to GitHub Pages at https://azure.github.io/aigateway/ once this merges. You can preview it now on the Static Web App: https://orange-ocean-02a07940f.5.azurestaticapps.net/

  • labs/: one folder per lab. Each lab's README.md is the single source of truth for the site, for GitHub, and for the azure-ai-gateway-labs agent skill. The folder also holds:

    • the site engine (build.mjs, site/) and its tools;
    • the shared assets: 46 portal screenshots and 20 diagrams;
    • the Setup guide, Troubleshooting, and labs release notes.
  • docs/: the generated site, which git ignores. npm run build writes it locally, and the workflow builds it for Pages, so the repo has no generated files or duplicate media.

  • .github/workflows/labs-pages.yml: the Publish labs site workflow. On pushes to main that touch labs/ or the workflow, or when run manually, it:

    • builds the site into docs/ with the strict check (npm run check);
    • uploads docs/ with actions/upload-pages-artifact;
    • deploys with actions/deploy-pages, using pages: write and id-token: write.

    The actions are pinned to commit SHAs.

  • Root README.md gets:

    • a new Hands-on labs section;
    • the product name "Azure AI Gateway";
    • the Azure/aigateway repo links.
  • AGENTS.md, samples/README.md, and the plugin manifests now use the Azure/aigateway repo links.

The labs

Area Labs
Get started Quick start, 00 How AI Gateway works, 01 Provision a gateway, 02 First model call
Models and tools 03 Multi-provider aliases, 04 Federate MCP tools, 05 MCP tool controls, 22 Model routing, 23 Streaming responses
Cost and safety 06 Token limits, 07 Cost budgets, 08 Content safety, 09 Gateway baselines, 19 Tool threat protection
Identity and access 10 API keys, 11 Entra RBAC, 12 Backend identity, 18 Private networking
Observability 13 Monitoring, 14 OpenTelemetry chargeback
Agents and enterprise 15 Agent frameworks, 16 Foundry hosted agent, 17 Coding-agent plugin, 20 Agent 365 governance, 21 Enterprise reference, 24 GitHub Copilot BYOK

The Azure CLI tracks were retested end to end on az aigateway 1.0.0b22.

Review follow-ups

Fixes #26, fixes #27, fixes #28, fixes #29, fixes #30, and fixes #31, from Paul Yuknewicz (@paulyuk)'s review. Each fix is verified on live gateways:

Before the first publish

  • Settings › Pages › Source is set to GitHub Actions.
  • The github-pages environment allows deployments from main.
  • After merging, check that the Publish labs site run succeeds and that https://azure.github.io/aigateway/ loads.

Validation

  • npm run sync && npm run build && npm run check: zero warnings.
  • npm run releases -- --check: exits 0.
  • actionlint .github/workflows/labs-pages.yml: clean.
  • A clean clone builds the same site. Each lab's Updated date comes from git log, so the workflow checks out the full history.
  • The branch is up to date with main and has no conflicts.

Alex Vieira (vieiraae) and others added 30 commits October 14, 2026 15:15
22 labs across foundations, models, tools, governance, security,
observability, agents, and production, each with portal, CLI, Bicep,
and code tracks. A Node build renders labs/*/README.md into a static
site in docs/ for GitHub Pages (main, /docs), with learning paths,
interactive simulators, themable SVG diagrams, and portal screenshots.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- build.mjs: LABS_OUT and LABS_SITE_URL build a copy for another host.
- tools/deploy-swa.sh (npm run deploy:swa): builds into labs/.swa and
  deploys with the Static Web Apps CLI, with a 404 rewrite and MIME types.
- Code-tab IDs are now deterministic, so rebuilds don't churn docs/.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
A 1200x630 preview card (GPT Image artwork with the site's title and
brand gradient) plus og:image, og:url, og:site_name, and
twitter:card summary_large_image on every page, so links unfurl with a
large preview in Teams, LinkedIn, X, and Slack.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Provision and manage gateways as the dedicated aigateways type (with its
  connectorGateways resource) in every lab, Bicep template, and script.
- Rewrite CLI tracks with az rest against the ARM API (2025-09-01-preview),
  using GET-modify-PATCH for policy arrays and array counterKey values.
- Fix SDK auth guidance: pass the runtime key as the API key for model calls,
  and use only the api-key header for MCP calls (both headers return 400).
- Use single-underscore federated tool names (learn_microsoft_docs_search).
- Rewrite lab 16 around a lab-owned azd hosted agent (Agent Framework,
  pinned requirements.txt) that calls models and Learn MCP through the
  gateway, with a per-key token cap.
- Update diagrams, the labs index, AUTHORING, and the rebuilt docs site.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Wrap lab metadata in an HTML comment so READMEs render cleanly on GitHub
- Add labs/site/github.mjs: npm run sync generates breadcrumbs, intro,
  collapsible tracks, inlined lab files and prev/next footers; the site
  renderer strips them so both views come from the same markdown
- Rewrite labs/README.md as a GitHub landing page with generated badges,
  learning paths, catalog and notebooks table
- Add live-validated Jupyter notebooks for labs 01, 02, 04, 06 and 11,
  with a Notebook button on the site
- Fix README details found during live validation (404 on empty gateway,
  Bearer key header, counter labels, token-limit verify output and scripts)
- Remove the nonexistent remaining-tokens header from diagram and widget
- Document the GitHub view and notebook conventions in AUTHORING.md

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The two illustrations copied from the portal were empty-state dot icons
that rendered as large meaningless shapes. Replace them with a
"what provisioning creates" diagram and a "what to choose in Create AI
gateway" diagram generated by the diagram toolkit, and remove the unused
illustrations folder.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
… skill

Add labs/skills/azure-ai-gateway-labs/SKILL.md, an agent skill that teaches coding
agents how to use the labs: where to read them, how to follow one track, the
placeholders, and the AI Gateway runtime facts. npm run sync regenerates its lab
catalog, learning paths, and use-case map from the lab metadata, and the build
publishes it to docs/skills/. llms.txt still exists and now links to the skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Add a `<!-- video: media/x.mp4 | Title -->` directive. The site renders a
captioned player with a poster and a "Watch video" header button; the GitHub
sync adds a poster that links to the site player, plus MP4 and caption links.

Lab 01 gets a 3-minute narrated walkthrough (TTS narration, live portal
capture with highlighted UI sections, WebVTT captions).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Edge's scareware blocker scans full-screen pages and flagged the narrated
portal walkthrough as a scam. The player now hides native full screen and
opens an in-page theater view from Expand, double-click, or F; if a browser
still enters full screen, the page leaves it and uses the theater view.

Drop the WebVTT track from the player: captions are burned into the video,
so turning on CC showed them twice. The .vtt stays as a download.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Edge and Chrome don't toggle playback when the video surface is clicked, so
the play button drawn on the poster did nothing. Clicks on the picture now
play or pause (only when the browser didn't already), clicks on the native
controls bar are ignored, and double-click expands without changing play state.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Add labs/shared/utils.py: Lab settings, az login sign-in, Bicep deployments, ARM reads and deletes, keys,
  retries, and MCP helpers, so notebook cells stay short.
- Regenerate notebooks 01, 02, 04, 06, and 11 to deploy the lab's infra/*.bicep instead of hand-written ARM
  bodies; 06 now uses the limited-alias template.
- Add 11-entra-rbac/infra/role-assignment.bicep and a Bicep track for granting data-plane roles.
- Clarify that a token-limit burst can overshoot the budget slightly before the first 429.
- Document the notebook approach in README, AUTHORING, and the agent skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- gpt-4.1-mini and gpt-5.4-mini -> gpt-6-luna (2026-09-22); gpt-4.1 -> gpt-6.1-sol;
  o4-mini -> gpt-6-astra; gpt-4o -> gpt-6-sol; Claude Haiku/Sonnet 4.5 -> 5.5.
- Scripts and notebooks send max_completion_tokens with reasoning_effort none so
  token-limit and cost exercises stay predictable on reasoning models.
- Lab 03 parses Claude text blocks (adaptive thinking) and raises max_tokens to 1024.
- Refresh expected outputs from live runs, troubleshooting, diagrams, widgets and skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Lab 00 gets a 3-minute narrated walkthrough (MP4, poster, captions)
  with live portal footage and UI highlights, embedded via the video
  directive on the site and as a poster link on GitHub.
- The portal nav item Discover is now Catalog: update labs 00, 01, 02, 11
  and the rail order in lab 00.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
…erage

- labs/RELEASE-NOTES.md is the source of truth for the labs release notes,
  aligned with the product releases and rendered at /release-notes/.
- npm run releases lists product releases and checks note coverage.
- AGENTS.md describes how to update the labs from new product releases.
- New lab 22: route an alias across models by priority and weight.
- Lab 04 adds supported MCP versions; lab 03 follows the new alias wizard.
- Fix code-tab grouping that hid sections in labs 19 and 20.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Teams and other chat apps crop link previews to a centered square or
4:3 thumbnail, which cut the left-aligned title and left only small,
unreadable text. The new card centers a large "AI Gateway Labs" title
inside the square safe zone, drops the small text and lab counts, and
keeps the artwork on the sides. The image URL now carries a content
hash so link-preview caches fetch the new image.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Covers usage for streamed Chat Completions responses (September 24, 2026
release): raw SSE with curl and PowerShell, Python and TypeScript SDKs,
Responses API events, and a token limit that counts streams with or without
include_usage. Adds a notebook, a diagram, a streaming usage simulator, and
updates the catalog, release notes, skill, and authoring lists.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- New unnumbered labs/quickstart lab: one Bicep deployment (reusing the lab 01 and
  lab 02 modules) creates a gateway, a Foundry gpt-6-luna deployment, the model
  provider, an alias, and a runtime key; then the first call and a 401 check.
- One-command scripts (quickstart.sh, quickstart.ps1) and a notebook, all
  verified live (about 2 min 20 s end to end).
- Home page: hero CTA and a "Start here" band with real script output.
- Learning path "quickstart" renamed to "essentials" (30-minute essentials).
- Build, templates, search, and sidebar support the unnumbered slug.
- References updated: README, labs/README, SKILL, AGENTS, AUTHORING, release notes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Rewrite the 5-minute quick start as a Portal track and a paste-ready Azure
CLI track (Bash and PowerShell) for Cloud Shell. Remove the notebook, the
Bicep template, and the scripts. Both CLI shells verified live end to end.
Redraw the diagram, refresh the home band with output from a real CLI run,
and update the release notes, AUTHORING, AGENTS, README, and the skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Capture 14 scrubbed screenshots of the live AI Gateway portal (keys masked,
highlighted controls) and embed one under each portal-track step. Align
wording with the current UI: Create new gateway, Resource groups filter,
Copy & done, Continue in code snippets, Runtime URL on All gateways, and
the Models › Add menu in labs 02, 03, 18 and 22.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- New Bicep + azd track: download the azd template from the labs site (no clone),
  azd up, read the URL, alias, and key; azd down --purge --force to clean up
- Each track now starts with the tools it needs
- build.mjs packs a lab's root azure.yaml + infra/ into a reproducible
  <name>.tar.gz and points it at LABS_SITE_URL for other hosts
- Diagram, intro, How it works, Verify, Clean up, Troubleshooting, skill,
  AUTHORING, AGENTS, and release notes cover the third track

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Portal: the playground call is the last step, with an optional cURL run
  from Continue in code; drop the terminal step and screenshot 14
- Azure CLI and Bicep + azd: each ends with its own first call
- Remove the shared Make your first call and Verify sections, and the
  no-key call from the home page terminal

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Portal: delete the gateway from All gateways (More actions > Delete),
  with two new screenshots, then optionally the Cloud Shell resource group
- Azure CLI: delete the resource group and purge the Foundry account
- Bicep + azd: azd down --purge --force
- Remove the shared Clean up section; update AUTHORING and the agent skill
- Fix the third objective, which YAML parsed as a mapping, and make the
  build warn when a front matter list item isn't plain text

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The Bicep + azd track now fetches azure.yaml and infra/ file by file from
raw.githubusercontent.com/Azure/ai-gateway/main/labs/quickstart (curl in
Bash, Invoke-WebRequest in PowerShell) instead of a tarball that the labs
site served. azd init can't start from a repo subfolder, and this still
needs no clone.

- Drop the tarball packer from the build
- Warn when a lab with an azure.yaml has no download block from the repo,
  or a block misses a template file or lists one that doesn't exist
- Update AUTHORING and AGENTS

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Publish gpt-6-astra through AI Gateway with a per-caller token limit and a
runtime key, then connect GitHub Copilot in VS Code, the Copilot CLI, the
Copilot SDK (Python and TypeScript), and the GitHub Copilot app with bring
your own key. Includes portal, Azure CLI, and Bicep tracks, screenshots,
two diagrams, a key-suspension check, catalog and release-notes entries.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Publish the Learn MCP server on the gateway (portal, Azure CLI, Bicep) and
add its tools to VS Code, the Copilot CLI, the Copilot SDK, and the GitHub
Copilot app with the same runtime key. Adds screenshots, SDK MCP support,
an updated diagram, release notes, and skill facts.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The Azure CLI tracks, Verify and Clean up steps, and lab scripts now use the
aigateway extension (1.0.0b1, API 2025-09-01-preview) for gateways, identity,
model providers, aliases, API keys, and MCP servers. Lab 01 installs it. az rest
stays only where the extension can't do the job yet (model registration, policy
writes, key state, telemetry, MCP versions, network update, the connector
gateway), with a reason each time. Labs 03 and 05 switch their REST track to an
Azure CLI track. Lab 18 now delegates the integration subnet to
Microsoft.App/environments, which the service requires. Lab 21's workflow
installs the extension. The quick start CLI track is verified end to end.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Follow Azure-Samples/simple-foundry-hosted-agent-python-aigateway infra/ai-gateway/main.bicep:
create the gateway in the Consumption SKU (a template without sku creates Premium), create the
connector gateway after it, and silence BCP081 for the preview resource types so every template
builds clean. The quick start model and alias now set displayName, modelVersion, and aliasName.
Lab 01 adds troubleshooting for InvalidSkuName and the five-gateways-per-region limit, and the
provisioning diagram, authoring guide, skill facts, and release notes are updated.

Verified on live gateways: labs 01, 02, 18 (VNet integration), 21, and the quick start (azd up).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
…otation

The aigateway CLI extension 1.0.0b14 can now register models, set and remove
model policies, and regenerate the secondary key value, so the CLI tracks no
longer call az rest for those steps:

- Labs 02, 03, 18, 22, 24 and the quick start register models with
  az aigateway model create --deployment-config.
- Labs 06, 08, 09, 24 set and remove token limits and content safety with
  az aigateway model policy.
- Lab 10 rotates both key values with az aigateway api-key regenerate.
- Lab 01 requires extension 1.0.0b14 or later; AUTHORING, the agent skill,
  and the release notes describe what still needs az rest.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
…dates, multi-value counter keys, --sku)

- Publish aliases with az aigateway model-alias set (quick start, labs 02, 03, 18, 22, 23, 24, and lab 03's
  alias.sh/alias.ps1), so the steps can run again.
- Lab 01 creates the gateway with --sku Consumption and shows the SKU.
- Lab 06 notes that --token-counter-key takes Identity, IPAddress, or both.
- Lab 12 switches the provider identity with a partial model-provider update --foundry.
- Setup guide, Authoring, and the labs skill require 1.0.0b15; release notes updated.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
…, media)

- Contrast: solid brand/success/gradient tokens, darker fg-4 and cyan, code colors, search highlight
- Keyboard: focusable named scroll regions, inert page behind mobile nav, lightbox focus, no "/" shortcut
- Motion: persistent Pause animations control that also freezes widget clocks
- Reflow and text spacing at 320 px; widget control contrast and 2 px focus rings
- ARIA states, copy announcements, label-in-name, hidden decorative SVGs
- Video caption tracks and transcripts

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Call the product Azure AI Gateway in titles, summaries, the site brand, and
  first mentions, instead of "AI Gateway tier of Azure API Management".
- Point Microsoft Learn links at the new azure/ai-gateway docs (overview,
  comparison with API Management service, tool threat protection).
- Explain in lab 00 how Azure AI Gateway relates to API Management service.
- Update the sample questions in labs 04, 05, and 15.
- Add the naming rule to AUTHORING.md.
- Keep verbatim portal labels, role names, error messages, and changelog titles.
- Topbar: "Azure AI Gateway Labs" brand; shrinkable search, no wrapping nav,
  Documentation link hidden at 1280px or less; clip the home anatomy glow that
  caused horizontal scroll from 520px to 1100px.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- CLI tracks need 1.0.0b22: labs 07, 09, and 14 move from REST to CLI tracks, lab 13
  gets a CLI track with telemetry-exporter, labs 10 and 24 use api-key update --state,
  lab 04 uses mcp update --versions, and api-key create drops --display-name.
- Gateways are Standard; lab 01 explains the runtime host format. The Your values
  panel fills <gateway-url>, and <model-name> replaces <model-alias>.
- Lab 15 uses the Responses API, lab 16 runs azd env new --subscription, lab 11's
  cleanup tolerates a removed role assignment, and lab 18 drops the private-routing
  "only at create" claims.
- Troubleshooting: the Entra-only 401 message, Key Vault public-access policy, azd
  subscription prompt, and steps renamed by the CLI tracks. Lab 24's Test the MCP
  endpoint is now a step.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The repo moved from Azure/ai-gateway to Azure/aigateway, so the GitHub Pages
site moves to azure.github.io/aigateway. Update the repo, Pages, raw, and
release URLs, clone into ~/aigateway, serve the local preview under
/aigateway/ (forwarding old /ai-gateway/ links), and note the move in the
labs release notes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The Pages source for Azure/aigateway is GitHub Actions, so Pages no longer
serves main /docs directly. The Publish labs site workflow runs on pushes to
main that touch labs/ or docs/ (or on demand): it rebuilds the site with the
strict check, uploads docs/ as the Pages artifact, and deploys it to the
github-pages environment. It checks out the full history because each lab's
"Updated" date comes from git log. Actions are pinned to commit SHAs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Take main's 1.0.0b22 installers, installer tests, and CLI README, then reapply
this branch's changes: the Azure/aigateway release URLs (the wheels match the
pinned SHA-256 hashes at the new URLs) and the CLI README without the public
preview banner and preview pricing text.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The CLI team owns cli/, so this branch no longer changes it: restore main's
README, installers, and installer tests. The old Azure/ai-gateway release URLs
in the installers still redirect to Azure/aigateway.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The preview server’s prefix-only path check allows requests to escape docs/ and exposes sibling-directory files to network clients.

3 open issues
What changed in this PR

Adds the Azure AI Gateway hands-on learning site with 26 labs, deployment templates, runnable examples, and GitHub Pages publishing.

Changes:

  • Adds Bicep and azd infrastructure plus model, MCP, streaming, and agent examples.
  • Adds interactive site features, setup guidance, troubleshooting, and preview/deployment tooling.
  • Configures site publishing and discovery files, and updates product and repository links.

This pull request requires changes. The following issues block approval:

  • Critical — labs/tools/serve.mjs:28: The path-prefix check permits access to sibling directories such as docs-private. Enforce the directory boundary before serving files.
  • Moderate — labs/tools/serve.mjs:27: Malformed URL encoding throws an uncaught URIError, terminating the preview server. Catch decoding failures and return HTTP 400.
  • Moderate — labs/site/js/99-init.js:27: Tabs displaying different tracks of the same lab can repeatedly overwrite progress totals, causing a storage-event feedback loop. Make storage-triggered refreshes read-only or store totals per track.
File Description
samples/​README.md Updates product naming and documentation links.
labs/​tools/​staticwebapp.config.json Configures Static Web Apps responses, MIME types, and headers.
labs/​tools/​serve.mjs Serves local previews under the GitHub Pages path.
labs/​tools/​diagrams.mjs Generates shared SVG diagrams.
labs/​tools/​deploy-swa.sh Builds and deploys a Static Web Apps preview.
labs/​site/​setup.mjs Defines and parses reusable setup tasks.
labs/​site/​js/​99-init.js Initializes site features and cross-tab synchronization.
labs/​site/​js/​07-troubleshooting.js Filters troubleshooting entries.
labs/​quickstart/​infra/​main.parameters.json Maps quick-start deployment parameters.
labs/​quickstart/​infra/​main.bicep Orchestrates the quick-start deployment.
labs/​quickstart/​azure.yaml Defines the quick-start azd project.
labs/​package.json Declares site dependencies and development commands.
labs/​24-github-copilot-byok/​infra/​requirements.txt Declares the Python Copilot SDK dependency.
labs/​24-github-copilot-byok/​infra/​package.json Configures the TypeScript Copilot SDK sample.
labs/​24-github-copilot-byok/​infra/​main.parameters.json Maps BYOK model and quota settings.
labs/​24-github-copilot-byok/​infra/​deployment.bicep Deploys a model into an existing Foundry account.
labs/​24-github-copilot-byok/​infra/​copilot-sdk.ts Runs a TypeScript Copilot session through the gateway.
labs/​24-github-copilot-byok/​infra/​copilot_sdk.py Runs a Python Copilot session through the gateway.
labs/​24-github-copilot-byok/​azure.yaml Defines the Copilot BYOK azd project.
labs/​23-streaming-responses/​infra/​stream.ts Demonstrates streaming with the TypeScript OpenAI SDK.
labs/​23-streaming-responses/​infra/​stream.py Demonstrates streaming with the Python OpenAI SDK.
labs/​23-streaming-responses/​infra/​stream-burst.sh Exercises streamed token limits from Bash.
labs/​23-streaming-responses/​infra/​stream-burst.ps1 Exercises streamed token limits from PowerShell.
labs/​23-streaming-responses/​infra/​requirements.txt Declares Python streaming dependencies.
labs/​23-streaming-responses/​infra/​package.json Configures the TypeScript streaming sample.
labs/​23-streaming-responses/​infra/​main.parameters.json Maps streaming deployment parameters.
labs/​23-streaming-responses/​infra/​main.bicep Deploys the gateway and a streaming-test alias.
labs/​23-streaming-responses/​azure.yaml Defines the streaming azd project.
labs/​22-model-routing/​infra/​main.parameters.json Maps candidate-model and routing settings.
labs/​22-model-routing/​infra/​count-models.sh Counts routing outcomes from Bash.
labs/​22-model-routing/​infra/​count-models.ps1 Counts routing outcomes from PowerShell.
labs/​22-model-routing/​infra/​candidate-deployment.bicep Deploys the candidate backend model.
labs/​22-model-routing/​azure.yaml Defines the model-routing azd project.
labs/​21-enterprise-reference/​infra/​scripts/​apply-baselines.sh Merges gateway-wide baseline policies.
labs/​21-enterprise-reference/​infra/​prod.bicepparam Supplies production deployment settings.
labs/​21-enterprise-reference/​infra/​modules/​types.bicep Defines a shared principal type.
labs/​21-enterprise-reference/​infra/​modules/​tools.bicep Publishes MCP tools and optional access assignments.
labs/​21-enterprise-reference/​infra/​modules/​telemetry.bicep Defines the optional legacy telemetry exporter.
labs/​21-enterprise-reference/​infra/​modules/​monitoring.bicep Creates monitoring destinations.
labs/​21-enterprise-reference/​infra/​modules/​keys.bicep Creates per-application runtime keys.
labs/​21-enterprise-reference/​infra/​modules/​gateway.bicep Creates the gateway and backend-access assignments.
labs/​21-enterprise-reference/​infra/​modules/​foundry-user-role.bicep Grants the gateway access to Foundry.
labs/​21-enterprise-reference/​infra/​main.bicepparam Supplies development deployment settings.
labs/​21-enterprise-reference/​infra/​baselines.json Defines enterprise rate and cost limits.
labs/​19-tool-threat-protection/​infra/​protected-tool-server.bicep Defines MCP threat protection and caller access.
labs/​19-tool-threat-protection/​infra/​main.parameters.json Maps threat-protection settings.
labs/​19-tool-threat-protection/​infra/​main.bicep Orchestrates the protected-tools deployment.
labs/​19-tool-threat-protection/​azure.yaml Defines the threat-protection azd project.
labs/​18-private-networking/​infra/​main.parameters.json Maps Foundry public-access settings.
labs/​18-private-networking/​infra/​foundry.bicep Creates the dedicated networking-lab backend.
labs/​18-private-networking/​azure.yaml Defines the private-networking azd project.
labs/​17-coding-agent-plugin/​infra/​mcp.json Configures an editor MCP connection.
labs/​16-foundry-hosted-agent/​infra/​src/​gateway-agent/​requirements.in Declares hosted-agent dependencies.
labs/​16-foundry-hosted-agent/​infra/​src/​gateway-agent/​main.py Routes hosted-agent models and tools through the gateway.
labs/​16-foundry-hosted-agent/​infra/​src/​gateway-agent/​.env.example Documents local agent settings.
labs/​16-foundry-hosted-agent/​infra/​src/​gateway-agent/​.azdignore Excludes local files from agent packaging.
labs/​16-foundry-hosted-agent/​infra/​azure.yaml Configures Foundry hosted-agent deployment.
labs/​16-foundry-hosted-agent/​infra/​.gitignore Excludes local agent environment files.
labs/​15-agent-frameworks/​infra/​requirements.txt Declares agent-framework dependencies.
labs/​15-agent-frameworks/​infra/​openai_agents_agent.py Demonstrates OpenAI Agents SDK integration.
labs/​15-agent-frameworks/​infra/​langgraph_agent.py Demonstrates LangChain/LangGraph integration.
labs/​15-agent-frameworks/​infra/​agent_framework_agent.py Demonstrates Microsoft Agent Framework integration.
labs/​15-agent-frameworks/​infra/​.env.example Documents shared agent settings.
labs/​14-otel-chargeback/​infra/​show_claims.py Displays chargeback-related token claims locally.
labs/​14-otel-chargeback/​infra/​send-attributed-traffic.sh Generates attributed traffic from Bash.
labs/​14-otel-chargeback/​infra/​send-attributed-traffic.ps1 Generates attributed traffic from PowerShell.
labs/​14-otel-chargeback/​infra/​prices.example.json Provides placeholder chargeback pricing.
labs/​14-otel-chargeback/​infra/​main.parameters.json Maps identity and telemetry settings.
labs/​14-otel-chargeback/​infra/​chargeback.kql Aggregates token usage by caller and model.
labs/​14-otel-chargeback/​azure.yaml Defines chargeback deployment and telemetry access hooks.
labs/​13-monitoring/​infra/​main.parameters.json Maps monitoring deployment parameters.
labs/​13-monitoring/​infra/​main.bicep Deploys monitoring resources and gateway telemetry.
labs/​13-monitoring/​infra/​generate-traffic.sh Generates dashboard traffic from Bash.
labs/​13-monitoring/​infra/​generate-traffic.ps1 Generates dashboard traffic from PowerShell.
labs/​13-monitoring/​azure.yaml Defines monitoring deployment and access hooks.
labs/​12-backend-identity/​infra/​provider.bicep Configures provider managed-identity authentication.
labs/​12-backend-identity/​infra/​main.parameters.json Maps backend-identity settings.
labs/​12-backend-identity/​infra/​gateway-identity.bicep Attaches a user-assigned gateway identity.
labs/​12-backend-identity/​infra/​foundry-user-role.bicep Grants a managed identity Foundry access.
labs/​12-backend-identity/​infra/​backend-identity.bicep Creates the backend identity and role assignment.
labs/​12-backend-identity/​azure.yaml Defines the backend-identity azd project.
labs/​11-entra-rbac/​infra/​requirements.txt Declares Python authentication dependencies.
labs/​11-entra-rbac/​infra/​package.json Configures the TypeScript authentication sample.
labs/​11-entra-rbac/​infra/​main.parameters.json Maps principal, role, and scope settings.
labs/​11-entra-rbac/​infra/​main.bicep Deploys the gateway and caller role assignment.
labs/​11-entra-rbac/​infra/​CallWithEntra.csproj Configures the .NET authentication sample.
labs/​11-entra-rbac/​infra/​CallWithEntra.cs Calls a model using an Entra token in .NET.
labs/​11-entra-rbac/​infra/​call-with-entra.ts Calls a model using an Entra token in TypeScript.
labs/​11-entra-rbac/​infra/​call_with_entra.py Calls a model using an Entra token in Python.
labs/​11-entra-rbac/​infra/​assign-roles.sh Assigns data-plane roles from Bash.
labs/​11-entra-rbac/​infra/​assign-roles.ps1 Assigns data-plane roles from PowerShell.
labs/​11-entra-rbac/​azure.yaml Defines the Entra RBAC azd project.
labs/​10-api-keys/​infra/​rotate-key.sh Rotates runtime keys from Bash.
labs/​10-api-keys/​infra/​rotate-key.ps1 Rotates runtime keys from PowerShell.
labs/​10-api-keys/​infra/​main.parameters.json Maps runtime-key names.
labs/​10-api-keys/​infra/​main.bicep Deploys the gateway and per-caller keys.
labs/​10-api-keys/​infra/​check-key.sh Checks runtime-key acceptance from Bash.
labs/​10-api-keys/​infra/​check-key.ps1 Checks runtime-key acceptance from PowerShell.
labs/​10-api-keys/​infra/​api-keys.bicep Declares runtime API-key resources.
labs/​10-api-keys/​azure.yaml Defines the API-keys azd project.
labs/​09-gateway-baselines/​infra/​check-call.sh Checks baseline-policy responses from Bash.
labs/​09-gateway-baselines/​infra/​check-call.ps1 Checks baseline-policy responses from PowerShell.
labs/​09-gateway-baselines/​infra/​baseline-policies.json Supplies example gateway-wide policies.
labs/​08-content-safety/​infra/​test-content-safety.sh Exercises content filtering from Bash.
labs/​08-content-safety/​infra/​test-content-safety.ps1 Exercises content filtering from PowerShell.
labs/​08-content-safety/​infra/​safe-alias.bicep Publishes an alias with content-safety thresholds.
labs/​08-content-safety/​infra/​main.parameters.json Maps content-safety thresholds.
labs/​08-content-safety/​infra/​main.bicep Orchestrates the content-safety deployment.
labs/​08-content-safety/​azure.yaml Defines the content-safety azd project.
labs/​07-cost-budgets/​infra/​trigger-cost-limit.sh Exercises budget enforcement from Bash.
labs/​07-cost-budgets/​infra/​trigger-cost-limit.ps1 Exercises budget enforcement from PowerShell.
labs/​07-cost-budgets/​infra/​main.parameters.json Maps budgets and caller overrides.
labs/​07-cost-budgets/​infra/​main.bicep Deploys the gateway and budget-controlled alias.
labs/​07-cost-budgets/​azure.yaml Defines the cost-budgets azd project.
labs/​06-token-limits/​infra/​trigger-token-limit.sh Exercises token throttling from Bash.
labs/​06-token-limits/​infra/​trigger-token-limit.ps1 Exercises token throttling from PowerShell.
labs/​06-token-limits/​infra/​main.parameters.json Maps token-limit settings.
labs/​06-token-limits/​infra/​main.bicep Deploys the gateway and token-limited alias.
labs/​06-token-limits/​infra/​limited-alias.bicep Declares the token-limited alias.
labs/​06-token-limits/​azure.yaml Defines the token-limits azd project.
labs/​05-mcp-tool-controls/​infra/​main.parameters.json Maps tool filters and rate limits.
labs/​05-mcp-tool-controls/​infra/​main.bicep Deploys the gateway and controlled MCP server.
labs/​05-mcp-tool-controls/​azure.yaml Defines the MCP-controls azd project.
labs/​04-federate-mcp-tools/​infra/​requirements.txt Declares Python MCP-client dependencies.
labs/​04-federate-mcp-tools/​infra/​mcp.json Configures the editor MCP client.
labs/​04-federate-mcp-tools/​infra/​main.parameters.json Maps federation and protocol-version settings.
labs/​04-federate-mcp-tools/​infra/​main.bicep Deploys the gateway and federated MCP server.
labs/​04-federate-mcp-tools/​infra/​list_tools.py Lists and optionally invokes gateway tools.
labs/​04-federate-mcp-tools/​azure.yaml Defines the MCP-federation azd project.
labs/​03-multi-provider-aliases/​infra/​main.parameters.json Maps Anthropic models, credentials, and limits.
labs/​03-multi-provider-aliases/​infra/​call-anthropic.sh Calls the native Anthropic endpoint from Bash.
labs/​03-multi-provider-aliases/​infra/​call-anthropic.ps1 Calls the native Anthropic endpoint from PowerShell.
labs/​03-multi-provider-aliases/​azure.yaml Defines the multi-provider azd project.
labs/​02-first-model-call/​infra/​requirements.txt Declares the Python OpenAI dependency.
labs/​02-first-model-call/​infra/​package.json Configures the TypeScript first-call sample.
labs/​02-first-model-call/​infra/​main.parameters.json Maps first-call deployment parameters.
labs/​02-first-model-call/​infra/​main.bicep Orchestrates model deployment and gateway publication.
labs/​02-first-model-call/​infra/​foundry.bicep Creates the Foundry account and model deployment.
labs/​02-first-model-call/​infra/​foundry-user-role.bicep Grants the gateway access to the backend.
labs/​02-first-model-call/​infra/​first-call.ts Demonstrates model calls with TypeScript.
labs/​02-first-model-call/​infra/​first-call.py Demonstrates model calls with Python.
labs/​02-first-model-call/​infra/​dotnet/​Program.cs Demonstrates model calls with .NET HttpClient.
labs/​02-first-model-call/​infra/​dotnet/​FirstCall.csproj Configures the .NET first-call project.
labs/​02-first-model-call/​infra/​call-model.sh Demonstrates both model APIs from Bash.
labs/​02-first-model-call/​infra/​call-model.ps1 Demonstrates both model APIs from PowerShell.
labs/​02-first-model-call/​azure.yaml Defines the first-model-call azd project.
labs/​01-provision-gateway/​infra/​main.parameters.json Maps gateway provisioning parameters.
labs/​01-provision-gateway/​infra/​main.bicep Creates the resource group and invokes gateway provisioning.
labs/​01-provision-gateway/​infra/​gateway.bicep Creates the gateway and companion connector gateway.
labs/​01-provision-gateway/​azure.yaml Defines the gateway-provisioning azd project.
labs/​.gitignore Excludes local dependencies, environments, and preview output.
docs/​sitemap.xml Lists generated site pages for search engines.
docs/​robots.txt Advertises the sitemap to crawlers.
docs/​.nojekyll Disables Jekyll processing for the generated site.
.github/​workflows/​labs-pages.yml Builds and publishes the labs to GitHub Pages.
.github/​plugin/​plugin.json Updates the plugin repository URL.
.claude-plugin/​plugin.json Updates plugin homepage and repository URLs.

Review effort: Balanced

Comment thread labs/tools/serve.mjs Resolved
Comment thread labs/site/js/99-init.js Resolved
Comment thread labs/tools/serve.mjs Resolved

@paulyuk Paul Yuknewicz (paulyuk) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving to unblock landing the hands-on labs site! Logged 6 follow-up issues (#26, #27, #28, #29, #30, #31) assigned to Alex Vieira (@vieiraae) to address in a follow-up PR — see inline comments for details.

Comment thread labs/quickstart/infra/resources.bicep Resolved
Comment thread labs/16-foundry-hosted-agent/README.md Resolved
Comment thread .github/workflows/labs-pages.yml Resolved
…gress loop

- serve.mjs: require a path separator after docs/, so requests such as
  /aigateway/..%2fdocs-private/x can't read a sibling folder (403), and return
  400 instead of crashing when the path has invalid percent-encoding.
- Progress: refreshes triggered by another tab's storage event no longer write
  the step total back, so two tabs on tracks with different step counts stop
  overwriting each other (about 19,600 writes per tab in 3 s before, 0 after).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
Fixes #26, #27, #28, #29, #30, #31

- Build docs/ in the Pages workflow instead of committing it (#31).
- Drop the connectorGateways resource, failureMode, and the explicit sku from
  templates and CLI steps, including lab 12's gateway-identity.bicep, and use
  Microsoft.ApiManagement/aigateways resource IDs (#26, #29).
- Use gpt-5-mini and gpt-6.1-sol across the labs (#27).
- Make lab 16 keyless with Entra ID roles (#28).
- Labs 13, 14, and 21 create an OpenTelemetry exporter like the portal's
  Configure telemetry wizard; lab 21's script replaces a legacy
  applicationInsights exporter, detected by its missing kind (#30).
- Match the current portal: Access > API keys, the playground's
  authentication Method, and the lab 11 and lab 19 wizards, with new
  quick start screenshots.
- Add troubleshooting rows and release notes for the changes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94

@paulyuk Paul Yuknewicz (paulyuk) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for updated. LGTM!

… charts

- Add labs/shared/brand.py, which renders notebook results as cards in the site's
  style (light, dark, and plain-text fallbacks), and use it in notebooks 01, 02,
  04, 06, 11, and 23, committed without outputs.
- Add the lab 07 notebook: deploy a per-caller cost limit, spend the budget, chart
  it, inspect the blocked response, and prove the support-bot override.
- Chart the token-limit burst in lab 06 with brand.usage_chart.
- Fix lab 01's runtime hostname check, and correct lab 07's cost per call and
  cost headers from a live probe.
- Warn in the build when a notebook is committed with outputs, and document the
  helpers in AUTHORING.md and the release notes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
The What's new page now lists only product releases and the labs that cover
them. Remove both "Labs changes" lists, the page header's mention of them, and
the authoring and agent instructions to add them.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
- Add notebooks for labs 15, 16, 17, and 24, each verified live, so every lab
  with a code track runs its code in a branded Jupyter notebook.
- Add a Notebook track chip and catalog filter, and make npm run check warn
  when a lab with code has no notebook.
- Lab 16: open the toolbox MCP connection with the initialize handshake. With
  MCP 2026-07-28, the toolbox reaches the gateway's learn server with
  server/discover, and the gateway answers 403. Ask the agent to answer from
  search results, so whole articles don't exhaust a 10K TPM deployment.
- Document both in the lab, its notebook, and TROUBLESHOOTING.md, and the
  notebook conventions in AUTHORING.md.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d05b6670-abba-4799-9d8e-3b2580e7bf94
@anishtallapureddy
anishtallapureddy merged commit 3d154fa into main Nov 6, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants