Repository navigation
Python: [BREAKING] Make Foundry host configuration explicit - #10269
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoNov 11, 2026
Conversation
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
github-app-auth
November 11, 2026 16:47 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
github-app-auth
November 11, 2026 17:05 — with
GitHub Actions
Active
Contributor
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: No findings
Scope: full PR (1 commit(s)): 6f06ce6c8fa4
Model: gpt-5.6-sol
Overview
The PR replaces the broad SDK options surface with explicit, validated host settings while retaining a clearly documented passthrough for SDK-specific arguments. Constructor tests, state-scoping checks, bounded workflow snapshots, and cancellation-shielded cleanup preserve the existing protocol and lifecycle contracts across all four hosts. No publishable Critical, High, or Medium defect was established.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
No publishable findings remained after source verification for this scope.
Darren Cohen (dargilco)
approved these changes
Nov 11, 2026
Eduard van Valkenburg (eavanvalkenburg)
marked this pull request as ready for review
November 11, 2026 18:21
Eduard van Valkenburg (eavanvalkenburg)
merged commit Nov 11, 2026
8d72801
into
microsoft:python-foundry-hosting-rc
9 checks passed
Eduard van Valkenburg (eavanvalkenburg)
deployed
to
github-app-auth
November 11, 2026 18:21 — with
GitHub Actions
Active
Eduard van Valkenburg (eavanvalkenburg)
added a commit
that referenced
this pull request
Nov 11, 2026
Eduard van Valkenburg (eavanvalkenburg)
added a commit
that referenced
this pull request
Nov 12, 2026
This branch was successfully deployed
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.
Motivation & Context
Make the Foundry hosting configuration boundary explicit instead of exposing the upstream Responses options bag or accepting arbitrary constructor keywords.
This is the focused configuration follow-up for #10012, targeting
python-foundry-hosting-rc. It builds on the split hosts already in that branch and complements the broader RC preparation in #10260.Description & Review Guide
Replace public
ResponsesServerOptionsarguments with supported history, heartbeat, shutdown, andresilient_backgroundparameters. Keeplog_levelon all four public constructors, using the SDK's five canonical levels asLiteralvalues.All four hosts accept an explicit
agent_server_kwargsmapping. Its contents go to AgentServer unchanged, without framework validation or mutation. Unknown top-level keywords now fail through Python argument binding.Remove
_InvocationsHostServer. Both public Invocations hosts inherit directly from the SDK host and own their agent/session or workflow/checkpoint execution paths. Small identity, wire-conversion, and streaming-cleanup helpers remain shared.This is an intentional breaking constructor migration. For an existing
Agentnamedagent:max_history_items=Nonesupplies no SDK override; it does not promise unlimited history. Explicit caps apply only to regular host-managed agent history. Explicit heartbeat intervals must be positive, whileNoneretains environment inheritance. No dependency floor or lockfile changes are needed.Keep caller model-option handling, option-hook timing, state ownership, JSON/SSE wire formats, and supported recovery behavior unchanged. Outer background execution, provider background, and recovery remain separate; regular-agent recovery still requires a saved provider continuation, while native workflows use checkpoints. Framework-generated SDK options keep steering disabled and do not supply host model defaults, span callbacks, or custom version stamping.
The constructor/SDK boundary, history-default preservation, and lifecycle, cancellation, and persistence behavior moved out of the combined Invocations base. Tests cover SDK passthrough, early validation, history caps, heartbeat inheritance, logging, and the existing agent/workflow execution paths.
uv run --directory python --no-sync poe check -P foundry_hostingpassed, including Ruff, source typing, all five test type checkers, and 1,243 unit tests.uv run --directory python --no-sync --with 'azure-ai-agentserver-responses==2.2.0b1' python -m pytest -q --tb=short packages/foundry_hosting/tests/foundry_hosting/test_host_options.pypassed all 76 cases against the minimum supported Responses SDK. The locked SDK is 2.3.0. Checks for the four changed samples, changed README code blocks, and wheel/source-distribution builds also passed. Live Foundry integration tests were not run.Related Issue
Fixes #10012
The issue's November 9 maintainer decisions authorize the explicit configuration work. Follow-up review keeps the upstream
resilient_backgroundname and adds the explicit SDK mapping, direct Invocations inheritance, and literal logging levels.#10260 is the parent RC-preparation PR, not a competing implementation. This PR contributes the focused configuration changes to its
python-foundry-hosting-rcbranch rather than replacing that PR.AI Assistance
AI assistance details: GitHub Copilot assisted with implementation, tests, documentation, and this PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.