SIGN IN SIGN UP

fix(relayconvert): hoist Responses tool-output media into a user message (#7510)

A function_call_output whose output is a Responses content-part array was
stringified into the Chat tool message, so image data URLs travelled
upstream as base64 text instead of vision input.

Text parts now stay on the tool message (joined with newlines) and media
parts are mapped like regular content parts, then emitted as one user
message once the contiguous tool batch ends so parallel tool outputs stay
adjacent to their assistant tool_calls message. Media-only outputs carry
an "[image]"-style placeholder because upstreams reject empty tool
content; payloads that are not content-part arrays keep the stringified
form.

Closes #7498

Co-Authored-By: MOON-DREAM-STARS <110315488+MOON-DREAM-STARS@users.noreply.github.com>
C
Calcium-Ion committed
6e9de44a7dca08f44234ab9c623f6a93a174d0c4
Parent: 54eee48
Committed by GitHub <noreply@github.com> on 9/21/2026, 2:11:21 PM