Core API Contract
Clients interacting with ONR should generally assume they are talking to a standard OpenAI completion, chat, or embedding endpoint. ONR sits in the middle and parses the standard shape:POST /v1/chat/completionsPOST /v1/embeddingsGET /v1/models
Dynamic Provider Override
Normally, ONR picks which upstream provider to route to by looking at themodel parameter inside the JSON body and matching it against your models.yaml registry.
However, a client can explicitly force a request to hit a specific upstream provider using the custom override header:
models.yaml entirely and executes the DSL defined in config/providers/anthropic.conf.
Streaming Guarantee
Streaming LLM responses is notoriously tricky due to varying Server-Sent Event (SSE) framings, chunk layouts, and closing signals across different LLM providers. ONR guarantees that if a client sends a standard OpenAIstream: true flag in the JSON body:
- It will establish a persistent
text/event-streamwith the client. - It will apply the respective
sse_parsetransformations defined in the provider’s DSL. - It will emit cleanly formatted, OpenAI-schema-compliant delta chunks back to the client.