Python: Add Foundry Hosted Agent history provider#6593
Open
eavanvalkenburg wants to merge 3 commits into
Open
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 18, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a minimal public helper in the agent_framework_foundry_hosting Python package to mint Foundry-hosted-agent-compatible response IDs, so upcoming hosting/channel samples can generate accepted IDs without reaching into Azure SDK implementation details at call sites.
Changes:
- Added a new
agent_framework_foundry_hosting.hosted_agentshelper module providingfoundry_response_id()andfoundry_response_id_factory(). - Added unit tests validating response ID shape, partition-key reuse across chained responses, and the factory hook behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/packages/foundry_hosting/agent_framework_foundry_hosting/hosted_agents.py | Adds the Foundry response ID helper functions and factory type alias. |
| python/packages/foundry_hosting/tests/foundry_hosting/test_hosted_agents.py | Adds focused tests for ID shape, partition key reuse, and factory behavior. |
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Adds the smallest Foundry Hosted Agent history-provider slice needed by the broader hosting/channel work. On its own this is not especially useful: it becomes meaningful together with the new
agent-framework-hostingpackages, where it provides the persistence piece for building Foundry Hosted Agents using the new host/channel model.This gives apps an alternative path to the existing
ResponsesHostServersetup: use the new hosting packages for route/channel composition, while this provider handles Foundry-compatible response history. This PR intentionally avoids the broader Foundry hosting rewrites from the original feature branch. See ADR-0027 and ADR-0028 for the purpose, intended use, and follow-up boundaries of the hosting work.Description & Review Guide
FoundryHostedAgentHistoryProviderinagent_framework_foundry_hosting.foundry_response_idhelpers used by the provider/channel response-id flow.ExperimentalFeature.HOSTING.ResponsesHostServerandInvocationsHostServerbehavior is unchanged.Related Issue
Fixes #6586
Refs #6265
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.