Syntax
Routing Logic
- Feature Scope (v0.1): Currently tests against the
apitype and an optionalstreamboolean. - Top-to-Bottom Execution: The first match wins based on appearance order in the file. Always put your most specific rules first, and general catch-all rules at the bottom.
- Strict Rejection: If a provider is selected (e.g. via load balancing) but no match is found inside its config file, the request is rejected with HTTP 400. ONR does not silently fallback; you must explicitly define matching rules.
Supported API Values
Theapi identifier is aligned with standard OpenAI-style endpoints (and specific extensions):
completionschat.completionsresponsesclaude.messagesembeddingsimages.generationsimages.editsaudio.speechaudio.transcriptionsaudio.translationsgemini.generateContent(Gemini native:POST /v1beta/models/{model}:generateContent)gemini.streamGenerateContent(Gemini native:POST /v1beta/models/{model}:streamGenerateContent?alt=sse)