feat: add OrcaRouter as a named model-prefix provider - #111
Conversation
Mirrors the existing Novita provider route in llm.ts: agents opt in by prefixing their model id with `orcarouter/`, and the call is forwarded to api.orcarouter.ai with the prefix stripped. Unlike Novita (which has no Responses API and needs a translation shim), OrcaRouter speaks the Responses API natively, so the route is a pure base-URL swap through server/src/orcarouter.ts. Degrades like Novita: when ORCAROUTER_API_KEY is unset, an orcarouter/* model falls through to the tenant's normal client instead of failing the run with a bare-bearer 401.
|
Thanks for the clean implementation, and for disclosing your affiliation up front — that's appreciated. Technical review: this passes. I went through it against the Novita route it mirrors and found nothing to fix:
What's holding it: whether Cumora carries a third-party gateway as a named first-class provider isn't a code-quality question — it's a product and positioning call about the project, including what goes in Nothing is blocked on you, and no changes are requested. I'll update this thread either way. |
|
Thanks for the detailed review — glad the Agreed that the remaining question is a product/positioning call for @yetone, not a code issue. Nothing is outstanding on my side; I'm happy to make whatever adjustments that decision implies — the |
Adds OrcaRouter as a named, first-class LLM provider in the same shape Cumora already routes Novita: prefix an agent's model id with
orcarouter/(e.g.orcarouter/openai/gpt-4o-mini) and the call is forwarded to OrcaRouter with the prefix stripped. That means anyone running Cumora Cloud or BYOA can point their agents at OrcaRouter from the model id alone — no custom base URL, no treating a gateway as an anonymous OpenAI-compatible endpoint.OrcaRouter is an OpenAI-compatible AI gateway built for both models and agents. Like OpenRouter, it exposes a provider/model namespace across many models — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding orcarouter as a first-class provider means this project's users can use that stack directly, without treating OrcaRouter as an anonymous custom base URL. 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.
Implementation mirrors the existing
novita/route inserver/src/llm.ts: a neworcarouter.tsmodule with a base-URL-swapped OpenAI client, plus anelse if (isOrcaRouterModel(...))branch inwithProviderRoutingthat strips the prefix and forwards. The one difference from Novita is that OrcaRouter speaks the Responses API natively (verified live, streaming and non-streaming), so no Chat-Completions translation shim is needed. Like Novita, an unsetORCAROUTER_API_KEYdegrades to the tenant's normal client instead of failing the run.Verified:
npm run server:typecheck,npm run typecheck,npm run lint,npm run guard:big-brain,npm run guard:llm-trackedall pass.server/src/__tests__/orcarouter.test.tsplus the full non-Redis server suite (817 pass / 0 fail).responses.createand streaming both return 200 with valid Responses output, and a client obtained viagetLlmClientcorrectly routes anorcarouter/*model to OrcaRouter.Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.