Skip to main content
The 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)

Chat / Completions
  • anthropic_to_openai_chat — Anthropic Messages → OpenAI Chat
  • openai_to_anthropic_messages — OpenAI Chat → Anthropic Messages
  • gemini_to_openai_chat — Gemini GenerateContent → OpenAI Chat
  • openai_responses_to_openai_chat — OpenAI Responses API → OpenAI Chat
  • openai_to_gemini_chat — OpenAI Chat → Gemini GenerateContent
Images
  • minimax_image_to_openai_images — Minimax Image → OpenAI Images
  • qwen_image_to_openai_images — Qwen Image → OpenAI Images
Videos (async task lifecycle)
  • ppio_video_create_to_openai_videos — PPIO task creation → OpenAI video object
  • ppio_video_result_to_openai_videos — PPIO task poll → OpenAI video object
  • seedance_video_create_to_openai_videos — Seedance task creation → OpenAI video object
  • seedance_video_result_to_openai_videos — Seedance task poll → OpenAI video object
  • minimax_video_create_to_openai_videos — Minimax H3 task creation → OpenAI video object
  • minimax_video_result_to_openai_videos — Minimax H3 task poll → OpenAI video object

Server-Sent Events (Streaming)

(Modes supported in v0.1):
  • anthropic_to_openai_chunks
  • openai_to_anthropic_chunks
  • gemini_to_openai_chat_chunks
  • openai_to_gemini_chunks
  • openai_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 individual data: chunk payloads during SSE streaming.

Conditional SSE Mutations

You can conditionally delete JSON fields specifically during a running stream based on the event’s internal type.
Note: The conditional check requires an exact string match.