response block defines how the data returned by the LLM Provider should be mapped and sanitized before ONR streams it back to your user. If multiple mapping directives exist in a block, the last one wins.
Passthrough (No Edits)
If the upstream natively responds with the OpenAI-compatible schema (like Groq, DeepSeek, or Anyscale), simply tell ONR to let the response pass through safely.Structural Schema Mapping
If the response is in a proprietary format (e.g., Anthropic or Gemini), you need to tell ONR how to map the JSON payload or Server-Sent Events (SSE) stream back into the OpenAI schema.JSON Responses (Non-Streaming)
anthropic_to_openai_chatopenai_to_anthropic_messagesgemini_to_openai_chatopenai_responses_to_openai_chatopenai_to_gemini_chat
Server-Sent Events (Streaming)
anthropic_to_openai_chunksopenai_to_anthropic_chunksgemini_to_openai_chat_chunksopenai_to_gemini_chunksopenai_responses_to_openai_chat_chunks
Best-Effort JSON Mutations
In addition to schema mappers, ONR can run lightweight field additions, deletions, and renamings on the final response body before yielding to the user. These work for both static JSON responses and individualdata: chunk payloads during SSE streaming.