Skip to content

feat(08-agents): 08-10b hosted Copilot SDK agent on the 1:N multi account (APIM-direct)#19

Merged
corticalstack merged 1 commit into
mainfrom
feat/08-10b-hosted-copilot-sdk-apim-direct
Jun 2, 2026
Merged

feat(08-agents): 08-10b hosted Copilot SDK agent on the 1:N multi account (APIM-direct)#19
corticalstack merged 1 commit into
mainfrom
feat/08-10b-hosted-copilot-sdk-apim-direct

Conversation

@corticalstack

Copy link
Copy Markdown
Owner

Summary

Adds 08-10b-hosted-copilot-sdk-agent-multi (release 0.8.12): the self-contained "B" variant of 08-10. The GitHub Copilot SDK container is hosted on the existing shared aif-spoke-multi (1:N) account and takes its inference from the APIM core gateway.

The key finding

The container points directly at the APIM gateway (provider base_url = <apim>/openai, gateway subscription key in the api-key header, bare reasoning model gpt-5-mini) rather than through a Foundry project connection.

  • Foundry's connection model-gateway (BYO model via an ApiManagement connection) is supported only for prompt agents. A hosted agent calling the Responses API through a connection/deployment model string forwards the qualified name upstream and fails with DeploymentNotFound.
  • A reasoning model is required: the Copilot CLI's Responses protocol carries encrypted reasoning content, which gpt-4.1-mini rejects (Encrypted content is not supported). gpt-5-mini is deployed on the gateway backend (aif-core).
  • Validated end to end against a live deployment (smoke test + tool use + the M365 analytics demo with a rendered chart).

What's in it

  • main.py: additive, env-driven APIM-direct provider branch (active only when APIM_BASE_URL + APIM_KEY are set). The standalone 08-10 path is unchanged.
  • infra/main.bicep: project + ACR on the existing shared account. No connection, no local model deployment, so the rg-foundry-multi deny-model-deployments policy is untouched. Agent RBAC is AcrPull + Foundry User only.
  • Self-contained: ships its own src/ and data/, no dependency on 08-10.
  • Tutorial notebook keeps redacted outputs (rendered Markdown tables + downloaded chart).

Repo tooling (also added)

  • scripts/scrub_notebooks.py + .githooks/pre-commit: scrub Azure secrets/identifiers from notebook outputs on commit, following the CONTRIBUTING.md notebook-output policy (keep the canonical demo suffix and resource names; map subscription/tenant/principal UUIDs to the all-zeros placeholder; redact keys, UPNs, and session ids). Enable with git config core.hooksPath .githooks.

Tradeoff

The gateway subscription key is injected as a container env var. The 08-10b-00 doc notes Key Vault and managed-identity-to-APIM as hardening paths.

Notes

  • The Claude Agent SDK lab (08-11) is intentionally held out of this release (no Claude quota in the target subscription to validate it end to end).

… account

Self-contained "B" variant of 08-10: the GitHub Copilot SDK container hosted on
the shared aif-spoke-multi account, taking inference from the APIM core gateway.

The container points DIRECTLY at the gateway (api-key auth, bare reasoning model
gpt-5-mini) rather than through a Foundry project connection. Foundry's connection
model-gateway (BYO model via an ApiManagement connection) is supported only for
prompt agents, so a hosted agent's Responses call through a connection/deployment
model string fails with DeploymentNotFound. A reasoning model is required because
the Copilot CLI's Responses protocol carries encrypted reasoning content that
gpt-4.1-mini rejects.

- main.py: additive, env-driven APIM-direct provider branch (active only when
  APIM_BASE_URL + APIM_KEY are set); the standalone 08-10 path is unchanged.
- infra: project + ACR on the existing shared account, no connection, no local
  model deployment, so the rg-foundry-multi deny-model-deployments policy holds.
- self-contained: own src/ and data/, no dependency on 08-10.
- tutorial notebook keeps redacted outputs, with rendered Markdown tables and chart.

Adds repo notebook-output scrubbing tooling: scripts/scrub_notebooks.py and a
.githooks/pre-commit hook that keeps the canonical demo suffix and resource names,
maps subscription/tenant/principal UUIDs to the all-zeros placeholder, and redacts
keys, UPNs, and session ids per the CONTRIBUTING.md notebook-output policy.

Release 0.8.12.
@corticalstack corticalstack merged commit a7345da into main Jun 2, 2026
1 of 2 checks passed
@corticalstack corticalstack deleted the feat/08-10b-hosted-copilot-sdk-apim-direct branch June 2, 2026 20:07
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.

1 participant