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_chat— Anthropic Messages → OpenAI Chatopenai_to_anthropic_messages— OpenAI Chat → Anthropic Messagesgemini_to_openai_chat— Gemini GenerateContent → OpenAI Chatopenai_responses_to_openai_chat— OpenAI Responses API → OpenAI Chatopenai_to_gemini_chat— OpenAI Chat → Gemini GenerateContent
minimax_image_to_openai_images— Minimax Image → OpenAI Imagesqwen_image_to_openai_images— Qwen Image → OpenAI Images
ppio_video_create_to_openai_videos— PPIO task creation → OpenAI video objectppio_video_result_to_openai_videos— PPIO task poll → OpenAI video objectseedance_video_create_to_openai_videos— Seedance task creation → OpenAI video objectseedance_video_result_to_openai_videos— Seedance task poll → OpenAI video objectminimax_video_create_to_openai_videos— Minimax H3 task creation → OpenAI video objectminimax_video_result_to_openai_videos— Minimax H3 task poll → OpenAI video object
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.