Environment
google-adk 2.2.0
google-genai 2.8.0
- Vertex backend (
GOOGLE_GENAI_USE_VERTEXAI=TRUE), durable sessions via VertexAiSessionService (Agent Engine)
- Agent exposed as an A2A server; the A2A client sends message parts that carry
metadata
Symptom
Every turn fails while handling the A2A request:
400 INVALID_ARGUMENT. Invalid JSON payload received.
Unknown name "part_metadata" at 'event.content.parts[0]': Cannot find field.
Root cause
a2a/converters/part_converter.convert_a2a_part_to_genai_part copies the inbound A2A part's metadata into genai.types.Part.part_metadata.
- The resulting event is persisted via
VertexAiSessionService.append_event, which serializes part_metadata (snake_case) into the Sessions request; the Agent Engine Sessions API schema has no such field → 400, and the turn aborts.
- This is consistent with genai's own contract that
part_metadata is "not supported in Vertex AI" — _Part_to_vertex raises on it for generateContent — but the session-append path does not strip it.
Expected
part_metadata should not reach Vertex / Agent Engine. Either don't populate it from A2A metadata when running on Vertex, or strip it before appendEvent serialization (mirroring _Part_to_vertex).
Regression
Works on google-adk 2.1.0; breaks after upgrading to 2.2.0.
Environment
google-adk2.2.0google-genai2.8.0GOOGLE_GENAI_USE_VERTEXAI=TRUE), durable sessions viaVertexAiSessionService(Agent Engine)metadataSymptom
Every turn fails while handling the A2A request:
Root cause
a2a/converters/part_converter.convert_a2a_part_to_genai_partcopies the inbound A2A part'smetadataintogenai.types.Part.part_metadata.VertexAiSessionService.append_event, which serializespart_metadata(snake_case) into the Sessions request; the Agent Engine Sessions API schema has no such field → 400, and the turn aborts.part_metadatais "not supported in Vertex AI" —_Part_to_vertexraises on it forgenerateContent— but the session-append path does not strip it.Expected
part_metadatashould not reach Vertex / Agent Engine. Either don't populate it from A2A metadata when running on Vertex, or strip it beforeappendEventserialization (mirroring_Part_to_vertex).Regression
Works on
google-adk2.1.0; breaks after upgrading to 2.2.0.