Skip to main content

Endpoint

The body is an OpenAI Responses request: input, instructions, tools with their native types, and the Responses stream events on the way back. The gateway reads model and stream from the whole body, so a stream field at the end of a large body is still found. Codex CLI and opencode send this shape; see OpenAI Codex.

Request

Response

Which providers serve it

A codex credential serves /v1/responses and, translated, /v1/messages. It does not serve /v1/chat/completions.

Parameters the gateway changes or refuses

The full codex table is on Parameter mapping. On OpenAI and Azure the body is not read beyond model and stream. The X-LangWatch-End-User-Id, X-LangWatch-Metadata and Traceparent request headers work as on Chat Completions.

Response headers

The same set as Chat Completions. X-LangWatch-Params-Dropped is the only signal for a codex-lane drop: the codex answer is the backend’s own stream, so extra_fields.params_dropped is not added to it.

Streaming

Set "stream": true. On OpenAI and Azure the response is text/event-stream with one data: frame per Responses event and a data: [DONE] trailer:
On the codex lane the backend’s own SSE frames reach the client as sent, with no [DONE] trailer. A failure after the stream opened ends it with an event: error frame; see Errors.

Errors

A provider’s own error is forwarded with its status and body, under X-LangWatch-Provider. The full table is on Errors.
Last modified on September 6, 2026