Python: quiet A2AExecutor logging for unmapped content types#7034
Open
giles17 wants to merge 2 commits into
Open
Python: quiet A2AExecutor logging for unmapped content types#7034giles17 wants to merge 2 commits into
giles17 wants to merge 2 commits into
Conversation
Tool-use responses include function_call/function_result content that the A2A executor does not surface, causing a WARNING per tool call. Log these at DEBUG and skip instead, matching the outbound content-conversion convention used across the Python chat clients. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ee74cc55-44df-4fcf-b38f-1f79f2600dfc
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces noisy, misleading WARNING logs emitted by the Python A2A server when it encounters content types that are intentionally omitted from A2A output (notably intermediate tool function_call / function_result parts), aligning A2A’s outbound content-conversion logging behavior with other Python chat clients.
Changes:
- Downgrade the “unmapped content type” log in
A2AExecutor.handle_eventsfromWARNINGtoDEBUGwith a clearer message. - Update/extend unit tests to assert unsupported/intermediate content is skipped with
DEBUGlogging (and notWARNING), including a new test forfunction_call.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| python/packages/a2a/agent_framework_a2a/_a2a_executor.py | Changes the fall-through logging for unmapped content types to DEBUG and clarifies intent in comments. |
| python/packages/a2a/tests/test_a2a_executor.py | Updates assertions for log level and adds coverage for intermediate tool content types being skipped quietly. |
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
moonbox3
approved these changes
Jul 10, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: ee74cc55-44df-4fcf-b38f-1f79f2600dfc
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
When an Agent Framework agent that uses tools (e.g. an MCP tool) is served via the A2A protocol, its response messages contain intermediate
function_callandfunction_resultcontent parts. TheA2AExecutoronly surfaces final user-facing output (text/data/uri), so these intermediate parts are correctly omitted — but it logged each omission at WARNING level with a misleading "does not yet support content type: … Omitted." message. This fires on every tool call, producing noisy, alarming output even though nothing is wrong and the final answer still reaches the client.Description & Review Guide
What are the major changes?
A2AExecutor.handle_events, the fall-through for unmapped content types now logs atDEBUG("Skipping unsupported content type for A2A: %s") and skips, instead of emitting aWARNING. This matches the outbound content-conversion convention already used across the Python chat clients (Gemini, Anthropic, Bedrock, OpenAI, AG-UI), which uniformlylogger.debug(...)and skip unmapped content.DEBUGand notWARNING, and added a test covering intermediate tool content (function_call).What is the impact of these changes?
WARNINGs on every tool call. Content-conversion behavior is unchanged (the same content is still omitted); only the log level and message change. No public API changes.What do you want reviewers to focus on?
DEBUG+ skip is the right consistency target (it aligns with the other Python chat clients' outbound conversion paths).Related Issue
Fixes #6982
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.