Python: fix(orchestrations): preserve multimodal content during agent handoff - #7823
Open
Manideep Malyala (manideep-malyala) wants to merge 4 commits into
Open
Conversation
Manideep Malyala (manideep-malyala)
requested review from
Tao Chen (TaoChenOSU),
chetantoshniwal,
Giles Odigwe (giles17) and
Evan Mattson (moonbox3)
as code owners
August 22, 2026 20:00
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:00 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:00 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:00 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:01 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Manideep Malyala (manideep-malyala)
August 22, 2026 20:01
View session
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:02 — with
GitHub Actions
Inactive
Contributor
There was a problem hiding this comment.
Pull request overview
Preserves multimodal content during orchestration handoffs, while also adding an unrelated AG-UI snapshot option.
Changes:
- Adds a handoff content allowlist.
- Tests URI preservation and tool-content removal.
- Adds configurable AG-UI snapshot suppression.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/orchestrations/agent_framework_orchestrations/_orchestrator_helpers.py |
Retains allowlisted content during handoffs. |
python/packages/orchestrations/tests/test_handoff.py |
Tests URI retention. |
python/packages/ag-ui/agent_framework_ag_ui/_agent.py |
Adds snapshot emission configuration. |
python/packages/ag-ui/agent_framework_ag_ui/_agent_run.py |
Applies snapshot suppression. |
python/packages/ag-ui/tests/ag_ui/test_run.py |
Tests snapshot suppression. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:09 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
force-pushed
the
fix-multimodal-handoff
branch
from
August 22, 2026 20:11
cf7afaa to
a3a23c6
Compare
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:11 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:16 — with
GitHub Actions
Inactive
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:21 — with
GitHub Actions
Inactive
Copilot started reviewing on behalf of
Manideep Malyala (manideep-malyala)
August 22, 2026 20:26
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
python/packages/orchestrations/agent_framework_orchestrations/_orchestrator_helpers.py:31
- The updated return description still conflicts with the function summary and bullets above, which say the helper is text-only and drops every non-text item. Update the complete contract to describe retained multimodal content and removed tool-control payloads.
Cleaned conversation history with semantic multimodal content preserved, suitable for handoff routing
Manideep Malyala (manideep-malyala)
temporarily deployed
to
github-app-auth
August 22, 2026 20:32 — with
GitHub Actions
Inactive
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
Multi-modal workflows (like
GroupChatandHandoffAgentExecutor) were silently dropping image and file attachments during agent handoffs. This prevented downstream Vision models from receiving the necessary context to complete their tasks. This fix ensures that multi-modal data is properly preserved across handoffs.Description & Review Guide
I updated the filtering logic in
clean_conversation_for_handoff. The previous logic aggressively dropped all non-text content. I replaced this with a safer allowlist (text,data,uri,hosted_file, etc.) that preserves multi-modal context while still successfully stripping out tool-control payloads. I updated thetest_handoff.pytests to cover this behavior, and added a regression test totest_sequential.pyto explicitly confirmSequentialBuildernatively preserves this data.Vision models will now correctly receive image context and file attachments from prior steps during sequential handoffs.
Please take a quick look at the
ALLOWED_CONTENT_TYPESset to ensure you agree with the types I allowed through. Thank you for your time and review!Related Issue
Fixes #7822
Contribution Checklist