Skip to content

feat: add OrcaRouter as a first-class LLM provider - #3407

Open
kuswardhanietidims-svg wants to merge 1 commit into
elie222:mainfrom
kuswardhanietidims-svg:feat/add-orcarouter-provider
Open

feat: add OrcaRouter as a first-class LLM provider#3407
kuswardhanietidims-svg wants to merge 1 commit into
elie222:mainfrom
kuswardhanietidims-svg:feat/add-orcarouter-provider

Conversation

@kuswardhanietidims-svg

@kuswardhanietidims-svg kuswardhanietidims-svg commented Aug 27, 2026

Copy link
Copy Markdown

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 orcarouter as 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

  • Provider registry: add ORCAROUTER to Provider and providerOptions in apps/web/utils/llms/config.ts, mirroring the existing OPENROUTER entry.
  • Model resolution: add an orcarouter case to selectModel in apps/web/utils/llms/model.ts, built on createOpenAICompatible with baseURL: "https://api.orcarouter.ai/v1", structured outputs enabled, and orcarouter/auto as the default model. Registered the ORCAROUTER_API_KEY credential lookup so orcarouter works in *_LLMS fallback chains.
  • Env & settings: add orcarouter to the LLM provider enum and ORCAROUTER_API_KEY to apps/web/env.ts, turbo.json, .env.example, and the settings form schema (settings.validation.ts) so it is selectable in Settings → AI.
  • CLI & docs: add OrcaRouter to the setup / setup-aws provider wizards (packages/cli/src/llm.ts, packages/cli/src/setup-aws.ts) and document it in llm-setup.mdx, environment-variables.mdx, and api-keys.mdx.
  • Tests: cover OrcaRouter model resolution and the legacy provider default; updated the env mock in model.test.ts.

Verification

  • vitest: 6/6 targeted LLM test files and the full apps/web suite (665 files, 5857 tests) pass.
  • biome check on apps/web, packages/cli, and docs/ passes.
  • Live test: called getModel() with the orcarouter provider and ran a real generateText against https://api.orcarouter.ai/v1 with orcarouter/auto — returned 200 (FINISHED="stop", output LIVE-OK). Structured generateObject also returned a valid typed result.

Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter

I'm an engineer on the OrcaRouter team.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added OrcaRouter as a supported LLM provider across the web app, CLI, and AWS setup wizard.
    • Supports provider-qualified models and automatic routing with orcarouter/auto.
    • Added configuration support through ORCAROUTER_API_KEY.
  • Documentation

    • Added OrcaRouter setup guidance, environment variable references, and fallback configuration examples.
  • Tests

    • Added coverage for OrcaRouter defaults and explicit model resolution.

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>
@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@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.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 18ef48e9-b4d5-4450-ba11-7f493937b675

📥 Commits

Reviewing files that changed from the base of the PR and between c1eae63 and e7f1419.

📒 Files selected for processing (14)
  • apps/web/.env.example
  • apps/web/env-legacy-llms.test.ts
  • apps/web/env-legacy-llms.ts
  • apps/web/env.ts
  • apps/web/utils/actions/settings.validation.ts
  • apps/web/utils/llms/config.ts
  • apps/web/utils/llms/model.test.ts
  • apps/web/utils/llms/model.ts
  • docs/essentials/api-keys.mdx
  • docs/hosting/environment-variables.mdx
  • docs/hosting/llm-setup.mdx
  • packages/cli/src/llm.ts
  • packages/cli/src/setup-aws.ts
  • turbo.json
 _____________________________
< I wish to make a complaint. >
 -----------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants