diff options
| author | Aiden Cline <[email protected]> | 2026-05-01 00:13:03 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2026-05-01 00:13:03 -0500 |
| commit | 563177c6ac738e5899a1d401f578e840a16a32ad (patch) | |
| tree | 73531697038ab32b2c4c64a4ca7d7ee0a85e7d56 /packages | |
| parent | 4eae8ec037356a587521c7bc38cd1416f7d92cdc (diff) | |
| download | opencode-563177c6ac738e5899a1d401f578e840a16a32ad.tar.gz opencode-563177c6ac738e5899a1d401f578e840a16a32ad.zip | |
fix: fix issue if tool returned image and empty text and it caused api errors (#25241)
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/opencode/src/session/message-v2.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/opencode/src/session/message-v2.ts b/packages/opencode/src/session/message-v2.ts index 911f58efd..a017ead1e 100644 --- a/packages/opencode/src/session/message-v2.ts +++ b/packages/opencode/src/session/message-v2.ts @@ -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, |
