Please make sure you read the contribution guide and file the issues in the right place.
Contribution guide.
Describe the bug
The convert_a2a_part_to_genai_part function ignores metadata when converting A2A parts back to GenAI parts. This causes the thought field to be lost during A2A communication between agents, breaking remote multi-agent scenarios where reasoning/thought content needs to be preserved.
To Reproduce
from google.genai import types as genai_types
from google.adk.a2a.converters.part_converter import (
convert_genai_part_to_a2a_part,
convert_a2a_part_to_genai_part,
)
# Create part with thought=True
original = genai_types.Part(text="thinking...", thought=True)
# Round trip conversion
a2a_part = convert_genai_part_to_a2a_part(original)
result = convert_a2a_part_to_genai_part(a2a_part)
# Bug: thought is lost
print(f"Original thought: {original.thought}") # True
print(f"Result thought: {result.thought}") # None (should be True)
Steps to reproduce:
- Install
google-adk
- Run the code above
- Observe that
result.thought is None instead of True
Expected behavior
When a GenAI Part with thought=True is converted to A2A and back to GenAI, the thought field should be preserved. The round-trip should be lossless for metadata like thought.
Screenshots
N/A
Desktop (please complete the following information):
- OS: macOS / Linux / Windows (all affected)
- Python version: 3.11+
- ADK version: Current main branch
Model Information:
- Are you using LiteLLM: N/A (bug is in part conversion, not model interaction)
- Which model is being used: N/A
Additional context
This issue affects any multi-agent A2A scenario where:
- A sub-agent generates content with
thought=True (e.g., reasoning steps)
- The content is sent to a parent agent via A2A protocol
- The parent agent receives the content but loses the
thought marker
This makes it impossible for downstream consumers (like UIs) to distinguish thoughts from regular content.
Please make sure you read the contribution guide and file the issues in the right place.
Contribution guide.
Describe the bug
The
convert_a2a_part_to_genai_partfunction ignores metadata when converting A2A parts back to GenAI parts. This causes thethoughtfield to be lost during A2A communication between agents, breaking remote multi-agent scenarios where reasoning/thought content needs to be preserved.To Reproduce
Steps to reproduce:
google-adkresult.thoughtisNoneinstead ofTrueExpected behavior
When a GenAI Part with
thought=Trueis converted to A2A and back to GenAI, thethoughtfield should be preserved. The round-trip should be lossless for metadata likethought.Screenshots
N/A
Desktop (please complete the following information):
Model Information:
Additional context
This issue affects any multi-agent A2A scenario where:
thought=True(e.g., reasoning steps)thoughtmarkerThis makes it impossible for downstream consumers (like UIs) to distinguish thoughts from regular content.