fix: fix issue if tool returned image and empty text and it caused api errors (#25241)

This commit is contained in:
Aiden Cline
2026-05-01 00:13:03 -05:00
committed by GitHub
parent 4eae8ec037
commit 563177c6ac

View File

@@ -772,7 +772,7 @@ export const toModelMessagesEffect = Effect.fnUntraced(function* (
return {
type: "content",
value: [
{ type: "text", text: outputObject.text },
...(outputObject.text ? [{ type: "text", text: outputObject.text }] : []),
...attachments.map((attachment) => ({
type: "media",
mediaType: attachment.mime,