Skip to content

Python: fix(orchestrations): preserve multimodal content during agent handoff - #8083

Open
Manideep Malyala (manideep-malyala) wants to merge 8 commits into
microsoft:mainfrom
manideep-malyala:fix-multimodal-handoff
Open

Python: fix(orchestrations): preserve multimodal content during agent handoff#8083
Manideep Malyala (manideep-malyala) wants to merge 8 commits into
microsoft:mainfrom
manideep-malyala:fix-multimodal-handoff

Conversation

@manideep-malyala

Copy link
Copy Markdown

Fixes #7822 (replaces #7823)

Summary

  • Preserves semantic multimodal content (uri, data, hosted_file, hosted_vector_store) for user messages during orchestrator handoffs.
  • Keeps assistant and other non-user messages text-only to prevent OpenAI API serialization failures.
  • Strips runtime-only tool-control payloads (function_call, function_result, approval_response).
  • Added unit tests in test_handoff.py covering all multimodal variants and regression test in test_sequential.py.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The sequential regression test iterates an input type that may be non-iterable, causing type-checking failure.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Preserves supported multimodal user content during orchestrator handoffs while removing runtime-only control payloads.

Changes:

  • Adds role-aware semantic content filtering.
  • Expands multimodal handoff tests.
  • Adds sequential URI propagation coverage.
File summaries
File Review
python/packages/orchestrations/tests/test_sequential.py Requires narrowing AgentRunInputs before iteration to satisfy type checking.
python/packages/orchestrations/tests/test_handoff.py Covers multimodal preservation and control-content filtering.
python/packages/orchestrations/agent_framework_orchestrations/_orchestrator_helpers.py Preserves allowed user multimodal content during cleanup.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread python/packages/orchestrations/tests/test_sequential.py

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The role-sensitive serialization changes require final human review.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Usage: [Issues, PRs], Target: Python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: Bug: Multimodal content is dropped during agent handoff in orchestrator

2 participants