SIGN IN SIGN UP

fix(relayconvert): hoist Claude tool_result images and segment Responses reasoning items (#7512)

Claude Messages -> Chat: a tool_result whose content is a block array was
stringified into the Chat tool message, so image base64 travelled upstream
as text instead of vision input. Text blocks now stay on the tool message
(joined with newlines) and image blocks become image_url parts on the user
message the same Claude message produces, which lands after the tool batch
and keeps parallel tool messages contiguous. Image-only results carry an
"[image]" placeholder; arrays with other block types keep the stringified
form.

Chat stream -> Responses stream: reasoning items now emit
response.reasoning_summary_part.added and .done around the summary text,
and deltas that arrive after a mid-stream finish_reason open a new
reasoning or message item instead of appending to the closed one. Closed
items are snapshotted so the completed response lists every segment.

Closes #7407
Closes #7495

Co-Authored-By: MOON-DREAM-STARS <110315488+MOON-DREAM-STARS@users.noreply.github.com>
C
Calcium-Ion committed
4eb3b9160566dc4c1f4f0e9340de254f7febf056
Parent: 6e9de44
Committed by GitHub <noreply@github.com> on 9/21/2026, 2:50:27 PM