OpenAI Responses
OpenAI Responses
Section titled “OpenAI Responses”ProxAI uses the protocol name openai_responses for the OpenAI Responses API.
openai_responses/v1/responsessrc/protocol/openai/responses/wiresrc/protocol/openai/responses/requestsrc/protocol/openai/responses/responsesrc/provider/openai/responsesopenai_chat_completionsanthropic_messagesRequest model
Section titled “Request model”At runtime, ingress parses the inbound body and produces PreparedOpenaiResponsesRequest. The protocol-layer lightweight projection is RequestProjection, located in src/protocol/openai/responses/request/projection.rs.
RequestProjection keeps the fields needed for routing, logging, and diagnostics, for example:
modelinstructionsstream/stream_optionstools/tool_choice/parallel_tool_callsreasoningtextmax_output_tokensprevious_response_idprompt_cache_key
It intentionally does not include the full input. input may be large and contains private prompts; downstream code must not depend on the original prompt content through the projection. The JSON actually forwarded upstream still comes from the normalized payload.
The wire model for request input is represented by InputParam, InputItem, Item, InputMessage, and related types:
enum InputParam { Text(String), Items(Vec<InputItem>),}
enum InputItem { ItemReference(ItemReference), Item(Item), EasyMessage(EasyInputMessage),}EasyInputMessage and InputMessage support roles such as user, system, and developer. ProxAI’s Responses ingress performs the project-specific system-message normalization so that upstreams which reject the Responses-style system message shape keep working.
Non-streaming response
Section titled “Non-streaming response”The complete Responses API response is represented by Response:
struct Response { id: String, object: String, model: String, status: Status, output: Vec<OutputItem>, usage: Option<ResponseUsage>, error: Option<ErrorObject>, ...}The output body is OutputItem:
enum OutputItem { Message(OutputMessage), FunctionCall(FunctionToolCall), FunctionCallOutput(FunctionToolCallOutputResource), Reasoning(Reasoning), // hosted tool items, MCP items, etc.}Each item has a stable id that matters for streaming reconstruction, multi-turn references, and cross-protocol translation.
Streaming
Section titled “Streaming”Responses streaming is event-oriented. Events describe lifecycle changes such as:
response.createdresponse.output_item.addedresponse.output_text.delta/response.function_call_arguments.deltaresponse.output_text.done/response.function_call_arguments.doneresponse.output_item.doneresponse.completed(terminal) /response.incomplete(terminal)
For the user-facing terminal-event expectations, see Streaming Behavior. For identifier and event-granularity rules, see Protocol Conversion.