openai_responses_request
On this page
Processes the Responses create request body once and initializes state.
Configuration Notes
Replaces the openai_responses_format and openai_responses_validate pair for create requests. Configuration is unchanged from openai_responses_format, so a chain that ran both swaps them for this one filter and keeps the same on_invalid and headers settings.
The operation is recognized from the request head, so only POST /v1/responses is processed. Every other request — including Conversations API traffic and the WebSocket handshake at the same path — is released untouched, and on_invalid governs only bodies that fail to parse.
Rejects background=true with a 400, matching openai_responses_format, because Praxis does not implement the asynchronous Responses lifecycle.
Promotes openai_responses_format.* metadata and filter results, and generates responses.response_id (resp_ + 32 hex chars, CSPRNG), responses.conversation_id, responses.store, responses.background, and responses.stream.
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
on_invalid | continue | reject | error | no | Behavior when the body cannot be classified. |
headers | ResponsesFormatHeaders | no | Header names for promoted classification facts. Must not be hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* names. Dedicated defaults remain allowed. |
headers.format | string | no | Header name for the detected format (e.g. openai_responses, openai_chat_completions). Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-format remains allowed. |
headers.model | string | no | Header name for the extracted model value. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-model remains allowed. Must not overwrite other classification facts such as x-praxis-ai-format. |
headers.stream | string | no | Header name for the extracted stream flag. Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-ai-stream remains allowed. |
headers.mode | string | no | Header name for the computed mode (stateless or stateful). Must not be a hop-by-hop, framing, Host, credential, API-key, or other internal x-praxis-* header. Dedicated default x-praxis-responses-mode remains allowed. |
Example
filter: openai_responses_request
on_invalid: reject
headers:
format: x-praxis-ai-format
model: x-praxis-ai-model
stream: x-praxis-ai-stream