diff --git a/python/packages/a2a/agent_framework_a2a/_a2a_executor.py b/python/packages/a2a/agent_framework_a2a/_a2a_executor.py index e8cf8ee38d9..55a7b620cdd 100644 --- a/python/packages/a2a/agent_framework_a2a/_a2a_executor.py +++ b/python/packages/a2a/agent_framework_a2a/_a2a_executor.py @@ -273,8 +273,10 @@ async def handle_events( elif content.type == "uri" and content.uri: parts.append(Part(url=content.uri, media_type=content.media_type or "")) else: - # Silently skip unsupported content types - logger.warning("A2AExecutor does not yet support content type: %s. Omitted.", content.type) + # Content that doesn't map to an A2A part (e.g. intermediate function_call / + # function_result from tool use) is skipped; only final user-facing output + # (text/data/uri) is surfaced. + logger.debug("Skipping unsupported content type for A2A: %s", content.type) if parts: if isinstance(item, AgentResponseUpdate): diff --git a/python/packages/a2a/tests/test_a2a_executor.py b/python/packages/a2a/tests/test_a2a_executor.py index 368d0918bed..062cb40b851 100644 --- a/python/packages/a2a/tests/test_a2a_executor.py +++ b/python/packages/a2a/tests/test_a2a_executor.py @@ -842,7 +842,7 @@ async def test_handle_agent_response_update_subsequent_time( assert call_kwargs["append"] is True async def test_handle_unsupported_content_type(self, executor: A2AExecutor, mock_updater: MagicMock) -> None: - """Test handling messages with unsupported content types.""" + """Test that unsupported content types are skipped quietly (debug, not warning).""" # Arrange message = Message( contents=[Content(type=cast(Any, "unknown"), text="Some text")], # type: ignore[arg-type] @@ -854,7 +854,25 @@ async def test_handle_unsupported_content_type(self, executor: A2AExecutor, mock await executor.handle_events(message, mock_updater) # Assert - mock_logger.warning.assert_called_once() + mock_logger.warning.assert_not_called() + mock_logger.debug.assert_called_once_with("Skipping unsupported content type for A2A: %s", "unknown") + mock_updater.update_status.assert_not_called() + + async def test_handle_intermediate_content_type(self, executor: A2AExecutor, mock_updater: MagicMock) -> None: + """Test that intermediate tool content (e.g. function_call) is skipped quietly (debug, not warning).""" + # Arrange + message = Message( + contents=[Content(type="function_call")], + role="assistant", + ) + + # Act + with patch("agent_framework_a2a._a2a_executor.logger") as mock_logger: + await executor.handle_events(message, mock_updater) + + # Assert + mock_logger.warning.assert_not_called() + mock_logger.debug.assert_called_once_with("Skipping unsupported content type for A2A: %s", "function_call") mock_updater.update_status.assert_not_called()