feat(serving): add OrcaRouter as a named LLM provider - #523
Closed
nissrin2020ali-ux wants to merge 1 commit into
Closed
feat(serving): add OrcaRouter as a named LLM provider#523nissrin2020ali-ux wants to merge 1 commit into
nissrin2020ali-ux wants to merge 1 commit into
Conversation
Adds APIOrcaRouterServing, an OpenAI-compatible serving class backed by the OrcaRouter gateway, alongside the existing APILLMServing_request. It reuses the parent's request/retry/formatting logic and only wires in OrcaRouter defaults (base URL, ORCAROUTER_API_KEY, orcarouter/auto), so DataFlow users can use the gateway as a first-class provider instead of an anonymous custom base URL. Includes a README subsection and unit tests mirroring the existing API serving test pattern. Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
|
Thanks for the contribution. OrcaRouter already appears to be fully supported through the existing Adding a dedicated subclass here seems to introduce another abstraction mainly for preset defaults, which may lead to one class per provider over time. I’d prefer keeping the generic serving abstraction and, if useful, adding OrcaRouter as a documented example or introducing a lightweight provider-preset mechanism instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
APIOrcaRouterServing, so DataFlow users can drive their whole data-preparation stack (generation, evaluation, filtering) through the OrcaRouter gateway the same way they already point anLLM servingat OpenAI — but as a first-class named provider instead of an anonymous custom base URL.OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models behind a single endpoint — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance on the same endpoint. Adding
orcarouteras a named backend indataflow/servingmeans this project'sLLMServingABC-based operators and pre-configured LLM backends can use that stack directly.The implementation mirrors the existing
APILLMServing_requestpath:APIOrcaRouterServingsubclasses it and only wires in OrcaRouter defaults (base URLhttps://api.orcarouter.ai/v1/chat/completions,ORCAROUTER_API_KEY, and theorcarouter/automodel namespace), reusing the parent's request, retry, timeout, and response-formatting logic unchanged. Usage is the same shape as the README's operator example:It also runs gateway-level, zero-trust security for AI agents on the same endpoint — screening every prompt/response and governing every tool call on a default-deny basis, with no application code changes.
Verification:
test/cpu_only/mirroring the existing API serving test pattern (@pytest.mark.api, dummy-server based): 2 passed; existingtest_api_llmserving.pystill green.GET /v1/models→ 200 (204 models incl.orcarouter/auto);POST /v1/chat/completionswithmodel="orcarouter/auto"→ 200; and the exactAPIOrcaRouterServing.generate_from_inputpath returned"OK"(routed togemini-3.1-flash-lite).Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.