Skip to content

Commit 3286a98

Browse files
authored
fix(core): translate Google GenAI text blocks to v1 (#33699)
1 parent 62769a0 commit 3286a98

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

libs/core/langchain_core/messages/block_translators/google_genai.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ def _convert_to_v1_from_genai(message: AIMessage) -> list[types.ContentBlock]:
458458
if outcome is not None:
459459
server_tool_result_block["extras"]["outcome"] = outcome
460460
converted_blocks.append(server_tool_result_block)
461+
elif item_type == "text":
462+
converted_blocks.append(cast("types.TextContentBlock", item))
461463
else:
462464
# Unknown type, preserve as non-standard
463465
converted_blocks.append({"type": "non_standard", "value": item})

0 commit comments

Comments
 (0)