OpenAI Responses API adapter.
Handles the wire format for the /v1/responses endpoint. This is OpenAI's
newer API that supports multi-turn conversations via previous_response_id
and structured output items.
Capabilities
- Streaming via SSE with typed output items
- Tool/function calling with
function_callandfunction_call_outputitems - Reasoning/thinking via
reasoningoutput items - Response chaining via
previous_response_id - Model listing via
/v1/models
Request format
Input uses the Responses API's item format:
- Message:
%{"type" => "message", "role" => ..., "content" => [...]} - Function call output:
%{"type" => "function_call_output", "call_id" => ..., "output" => ...}
System instructions are sent as an "instructions" field.
SSE events
event: response.created— response startedevent: response.output_text.delta— text chunkevent: response.reasoning.delta— thinking/reasoning chunkevent: response.function_call_arguments.delta— tool call argumentsevent: response.output_item.done— tool call completeevent: response.completed— end of stream