feat: add OrcaRouter as a first-class LLM provider - #3407
feat: add OrcaRouter as a first-class LLM provider#3407kuswardhanietidims-svg wants to merge 1 commit into
Conversation
Add OrcaRouter as a named provider alongside OpenRouter and the Vercel AI Gateway. OrcaRouter is an OpenAI-compatible gateway that exposes a provider-qualified model namespace (e.g. anthropic/claude-sonnet-4.6) plus an orcarouter/auto model for automatic routing. Mirrors the existing OpenRouter integration across the provider registry, model resolution, env validation, settings, CLI setup wizard, and docs. Uses createOpenAICompatible against https://api.orcarouter.ai/v1 with structured outputs enabled. Co-Authored-By: Claude <noreply@anthropic.com>
|
@kuswardhanietidims-svg is attempting to deploy a commit to the Inbox Zero OSS Program Team on Vercel. A member of the Team first needs to authorize it. |
|
|
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Inbox Zero's AI assistant routes its LLM calls through a provider registry that currently treats OpenRouter and the Vercel AI Gateway as first-class gateways, each exposing a provider-qualified model namespace. This PR adds OrcaRouter the same way, so self-hosters and per-user settings can point at OrcaRouter's OpenAI-compatible endpoint without treating it as 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 — but it also combines adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance behind the same endpoint. Adding
orcarouteras a first-class provider means Inbox Zero users can use that stack directly. 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.Changes
ORCAROUTERtoProviderandproviderOptionsinapps/web/utils/llms/config.ts, mirroring the existingOPENROUTERentry.orcaroutercase toselectModelinapps/web/utils/llms/model.ts, built oncreateOpenAICompatiblewithbaseURL: "https://api.orcarouter.ai/v1", structured outputs enabled, andorcarouter/autoas the default model. Registered theORCAROUTER_API_KEYcredential lookup soorcarouterworks in*_LLMSfallback chains.orcarouterto the LLM provider enum andORCAROUTER_API_KEYtoapps/web/env.ts,turbo.json,.env.example, and the settings form schema (settings.validation.ts) so it is selectable in Settings → AI.setup/setup-awsprovider wizards (packages/cli/src/llm.ts,packages/cli/src/setup-aws.ts) and document it inllm-setup.mdx,environment-variables.mdx, andapi-keys.mdx.model.test.ts.Verification
vitest: 6/6 targeted LLM test files and the fullapps/websuite (665 files, 5857 tests) pass.biome checkonapps/web,packages/cli, anddocs/passes.getModel()with theorcarouterprovider and ran a realgenerateTextagainsthttps://api.orcarouter.ai/v1withorcarouter/auto— returned 200 (FINISHED="stop", outputLIVE-OK). StructuredgenerateObjectalso returned a valid typed result.Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.
Summary by CodeRabbit
New Features
orcarouter/auto.ORCAROUTER_API_KEY.Documentation
Tests