Artifact 053f9fdca3ff1ac9f79ad04ae2cb6baa04f4b919ff6ede6080e4b0debed5e118:
- File
test/pic/responses-streams/tools.sse
— part of check-in
[dd694d986b]
at
2026-11-19 01:08:50
on branch stage-4
— Add the OpenAI Responses adapter
Output items are kept whole, so reasoning items with encrypted_content go back verbatim to the same model under store:false; the final output list is authoritative and fills in late encrypted_content. The neutral form follows Pi: reasoning to thinking, messages to text, function calls to tool calls with call_id|item_id ids. Requests send input items, function_call_output under the call ids, flat tools, and reasoning effort with encrypted reasoning for reasoning models. Recorded streams, a fuzz target and fake server cases cover it, including conversations moving between the Messages API and Responses both ways. (user: dmestas, size: 1641) [annotate] [blame] [check-ins using] [more...]
event: response.created data: {"type":"response.created","response":{"id":"resp_2","status":"in_progress","output":[]}} event: response.output_item.done data: {"type":"response.output_item.done","output_index":0,"item":{"type":"reasoning","id":"rs_1","summary":[{"type":"summary_text","text":"Plan the fix."}],"encrypted_content":"ENC-RS-1"}} event: response.function_call_arguments.delta data: {"type":"response.function_call_arguments.delta","output_index":1,"delta":"{\"path\""} event: response.output_item.done data: {"type":"response.output_item.done","output_index":1,"item":{"type":"function_call","id":"fc_1","call_id":"call_1","name":"write","arguments":"{\"path\":\"notes.txt\",\"content\":\"hi\"}","status":"completed"}} event: response.output_item.done data: {"type":"response.output_item.done","output_index":2,"item":{"type":"function_call","id":"fc_2","call_id":"call_2","name":"bash","arguments":"{\"command\":\"pwd\"}","status":"completed"}} event: response.completed data: {"type":"response.completed","response":{"id":"resp_2","status":"completed","output":[{"type":"reasoning","id":"rs_1","summary":[{"type":"summary_text","text":"Plan the fix."}],"encrypted_content":"ENC-RS-1"},{"type":"function_call","id":"fc_1","call_id":"call_1","name":"write","arguments":"{\"path\":\"notes.txt\",\"content\":\"hi\"}","status":"completed"},{"type":"function_call","id":"fc_2","call_id":"call_2","name":"bash","arguments":"{\"command\":\"pwd\"}","status":"completed"}],"usage":{"input_tokens":30,"input_tokens_details":{"cached_tokens":0},"output_tokens":12,"output_tokens_details":{"reasoning_tokens":5},"total_tokens":42}}}