fix(core): translate Google GenAI text blocks to v1 (#33699)

This commit is contained in:
ccurme
2025-10-28 09:53:01 -04:00
committed by GitHub
parent 62769a0dac
commit 3286a98b27

View File

@@ -458,6 +458,8 @@ def _convert_to_v1_from_genai(message: AIMessage) -> list[types.ContentBlock]:
if outcome is not None:
server_tool_result_block["extras"]["outcome"] = outcome
converted_blocks.append(server_tool_result_block)
elif item_type == "text":
converted_blocks.append(cast("types.TextContentBlock", item))
else:
# Unknown type, preserve as non-standard
converted_blocks.append({"type": "non_standard", "value": item})