openai_responses_request

Processes the Responses create request body once and initializes state.
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

FieldTypeRequiredDescription
on_invalidcontinue | reject | errornoBehavior when the body cannot be classified.
headersResponsesFormatHeadersnoHeader 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.formatstringnoHeader 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.modelstringnoHeader 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.streamstringnoHeader 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.modestringnoHeader 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