[BREAKING] Python: add Responses conversation ID helper - #7234
Merged
eavanvalkenburg merged 7 commits intoJul 21, 2026
Merged
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Python agent-framework-hosting-responses helpers to provide a supported way for hosting apps to mint Responses-shaped conversation IDs and to reliably distinguish conversation_id continuation from previous_response_id continuation without re-parsing the request body.
Changes:
- Added public
create_conversation_id()helper (conv_+ UUID hex). - Changed
responses_session_id()to return(session_id, is_conversation_id)and updated tests, docs, and samples accordingly. - Updated sample route logic to use the new tuple semantics.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| python/samples/04-hosting/af-hosting/local_responses/app.py | Updates sample route to unpack responses_session_id() and branch using is_conversation_id. |
| python/samples/04-hosting/af-hosting/local_responses_workflow/app.py | Updates workflow sample to unpack the tuple and reject conversation_id continuations. |
| python/packages/hosting-responses/tests/hosting_responses/test_parsing.py | Adds tests for create_conversation_id() and updates responses_session_id() assertions to the tuple return. |
| python/packages/hosting-responses/tests/hosting_responses/test_http_round_trip.py | Updates test server route to unpack the tuple and compute conversation_id via the flag. |
| python/packages/hosting-responses/README.md | Updates documentation and example code to reflect tuple return and new helper. |
| python/packages/hosting-responses/agent_framework_hosting_responses/_parsing.py | Implements create_conversation_id() and updates responses_session_id() signature/behavior to return (id, flag). |
| python/packages/hosting-responses/agent_framework_hosting_responses/init.py | Re-exports create_conversation_id as part of the public package surface. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
eavanvalkenburg
enabled auto-merge
July 21, 2026 12:09
westey-m
approved these changes
Jul 21, 2026
rogerbarreto
approved these changes
Jul 21, 2026
eavanvalkenburg
added a commit
to eavanvalkenburg/agent-framework
that referenced
this pull request
Jul 21, 2026
Include the breaking Hosting Responses conversation ID helper changes from microsoft#7234 in the Python 1.12.0 changelog. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
kartikmadan11
pushed a commit
to kartikmadan11/agent-framework
that referenced
this pull request
Jul 21, 2026
* Bump Python package versions for 1.12.0 release Bump packages represented in the 1.12.0 changelog, promote Foundry Hosting, Azure Content Understanding, Gemini, Mistral, Monty, and Tools to beta, and apply the requested beta cohort date stamp. Root and core move to 1.12.0, released and RC packages use their selected increments, alpha packages including Hosting MCP use the 260721 stamp, and core floors are raised only for proven consumers. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf * fix version in readme * Add Responses conversation ID changes to release notes Include the breaking Hosting Responses conversation ID helper changes from microsoft#7234 in the Python 1.12.0 changelog. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
This was referenced Jul 21, 2026
This was referenced Jul 24, 2026
Merged
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
App-owned Responses hosting needs a supported way to mint conversation IDs and distinguish stable conversation continuations from previous-response continuations without re-inspecting the request body.
Description & Review Guide
create_conversation_id()helper, returningconv_plus a UUID hex value; changesresponses_session_id()to return(session_id, is_conversation_id); and renames the optionalsession_idkeyword on both response converters to the clearerconversation_id. The session flag isTruefor a conversation ID,Falsefor a previous response ID, andNonewhen no session ID is present. Updates package documentation, tests, and affected samples.responses_session_id()must unpack the new tuple return value, and callers supplying a conversation to either response converter must use the renamed keyword.previous_response_idprecedence when both request fields are present, and the narrower conversation-only parameters on the response converters.Related Issue
No issue was created for this small change, as requested. No duplicate open PR was found.
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.