Repository navigation
v0.9.0
Three new labs plus repo-wide fixes. Two labs were broken on main: the Foundry IQ knowledge bases stopped answering after Azure AI Search began rejecting APIM endpoints for knowledge base models, and the hosted Copilot SDK containers no longer started when rebuilt. Both are fixed and re-verified end to end against Azure.
Added
- New
07-model-inference/07-02-migrate-gpt-4o-to-gpt-5.ipynb: a live migration of a GPT-4o workload to thegpt-5-minireasoning model through the same APIM gateway as 07-01. Walks the six gotchas the model-class change introduces - sampling parameters rejected with HTTP 400,max_tokensrenamed tomax_completion_tokens, hidden reasoning tokens inside the output budget, the empty-answer trap, reasoning effort versus latency, andsystemversusdeveloperrole - then the Chat Completions to Responses shift withprevious_response_id, verbosity and typed streaming events.docs/gpt-4o-to-gpt-5.1-migration-research.mdcarries the source research. The README already linked this lab; the notebook it pointed at was missing. - New
08-agents/08-11-hosted-claude-agent-sdk-agentsection: the Claude counterpart to 08-10. A Claude Agent SDK container (ClaudeSDKClientbehindazure-ai-agentserver-invocations) deployed as a Foundry hosted agent, with inference from a Foundry-deployedclaude-sonnet-4-6over/anthropic/v1/messagesusing the per-agent managed identity (CLAUDE_CODE_USE_FOUNDRY=1+ANTHROPIC_FOUNDRY_RESOURCE). Not validated end to end: the notebook has no outputs because Claude deployments subscribe to an Anthropic Marketplace offer, which the lab subscription's tenant policy blocks (Marketplace Subscription purchase eligibility check failed) even with Claude quota available. The overview lists that as a prerequisite. - New
08-agents/08-10c-hosted-copilot-sdk-agent-runtime-modelsection: answers whether a chat UI can switch a hosted agent's model or reasoning effort mid-conversation, and what telemetry a hosted agent produces out of the box. Runtime switching belongs to the container, not the platform: an agent version is immutable, but the invocations protocol hands the request body over untouched, somain.pyreads optionalmodel/reasoning_effortfields, validates them againstAZURE_AI_ALLOWED_MODELS, and callssession.set_model()on the live Copilot session, which preserves the conversation history. Verified both with a logging proxy on the outgoing/openai/v1/responsescalls and hosted: all model calls matched the UI selection,gpt-5.4used 163 reasoning tokens athighversus 26 atlow, and the agent kept one version with the same image digest. Self-contained: its own Bicep provisions the resource group, Foundry account and project, capability host, registry, Application Insights and the three model deployments the UI switches between. - Telemetry walk-through in 08-10c separating the three layers: the platform's
invoke_agentrecord (no code), the injectedFOUNDRY_*environment variables plus the per-session container log stream and exported Python logs (no code), and the per-model-callchat <model>spans with reasoning effort and token usage (tracing.py). Notes that the platform marks an invocation successful even when the container returns HTTP 400.
Changed
- Every notebook now declares the repo's own
.venvkernel. 29 of the 51 notebooks named afoundry-sampleskernel that runs the interpreter of an olderfoundry-nextgencheckout; the rest used mixed display names. Metadata only. 08-agents/08-00-what-is-an-agent.mdchapter index: added the rows missing for08-09,08-10and08-10b, then08-11and08-10c. The README agents row said "eleven sub-labs" while its table listed thirteen; it now reads fifteen.presentation.htmlis no longer tracked. The talk deck is personal presentation material rather than lab content, and nothing in the repo linked to it.13-guardrails/13-03-demo-guardrails.ipynbgained amodel_refusalcategory: the harmful-content and protected-material prompts sit below the content filters' severity thresholds, so the request reaches the model and the model declines it. That is defence in depth rather than a guardrail block, and the notebook now says so instead of scoring it as a failure..lycheeignoreexcludesapi.applicationinsights.io, used as an auth scope and REST endpoint in 08-10c rather than a browseable page.
Fixed
10-foundry-iq: Azure AI Search now rejects APIM and custom domain endpoints in knowledge base model configurations (InvalidRequestParameter), on create and on retrieve, soarxiv-nlp-kbfailed on every query and took 10-05'skb_standardtool with it. The knowledge base model now points at the core account with no API key, and a newcore-search-rbac.bicepmodule grants the search service managed identity Cognitive Services User onaif-core-{suffix}frommain.bicep. Query-time embeddings (the integrated vectorizer) and the agent's own model calls still go through APIM; both were verified working. 10-03 and 10-05 rerun end to end.08-10and08-10bcontainer images failed to start when rebuilt, for two independent reasons:azure-ai-agentserver-invocations==1.0.0b4declaredazure-ai-agentserver-core>=2.0.0b4with no upper bound and now resolves core2.2.0b1, which removedCHAT_ISOLATION_KEY; andgithub-copilot-sdk>=0.2.0now resolves1.0.14, which removedSubprocessConfig. Pinned toazure-ai-agentserver-invocations==1.1.0(caps core below 2.2.0) andgithub-copilot-sdk==0.3.0(the version the deployed images run). Both notebooks rerun end to end on rebuilt images.13-guardrails:13-01leftcustomBlocklistsempty because attaching a blocklist used to break the Responses API with HTTP 500 on happy-path calls. That service bug is fixed, and the notebook had drifted from the live policy, so re-running it would have detached the blocklist, deleted the portal-added financial-data protection filters and cut the deployment from 1306K to 30K TPM. The RAI policy now attachesbank-demo-blockliston prompt and completion, includes the financial-data filters, and the deployment cell keeps a higher existing capacity. 13-03 scores 24/24.07-model-inference/07-01: the committed outputs showed Teams Beta, Delta and Gamma failing withConnection 'core-<team>' not found. Their APIM connections had been deleted from the projects onaif-spoke-multi(the 05-04 redeploy troubleshooting cell removes them). Recreated with each team'sfoundry-gateway-<team>key and the notebook rerun, so all four teams answer through the gateway.