Skip to content

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

Open
Marc-oss-hub wants to merge 3 commits into
filiksyos:mainfrom
Marc-oss-hub:feat/orcarouter-provider
Open

feat: add OrcaRouter as a first-class quick-LLM provider#146
Marc-oss-hub wants to merge 3 commits into
filiksyos:mainfrom
Marc-oss-hub:feat/orcarouter-provider

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

Summary

Adds OrcaRouter as a first-class LlmProvider in GitReverse's quick-reverse LLM path, mirroring the existing OpenRouter wiring. OrcaRouter is an OpenAI-compatible AI gateway that serves a single base URL with namespaced model ids (e.g. anthropic/claude-sonnet-5), so it slots straight into the existing chat/completions call path with no transport changes. 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.

What this adds

  • lib/quick-llm.ts — new orcarouter provider in the LlmProvider union, ORCAROUTER_URL constant, orcarouterTargetFromApiKey() (defaults to anthropic/claude-sonnet-5, overridable with ORCAROUTER_MODEL), added to the GITREVERSE_QUICK_LLM=auto key-resolution chain and the explicit GITREVERSE_QUICK_LLM=orcarouter branch, plus providerDisplayName and the auth-error hint.
  • app/api/reverse-prompt/route.ts — the same provider wiring in the reverse-prompt route's self-contained resolver (this route keeps its own copy of the provider registry).
  • .env.exampleORCAROUTER_API_KEY + optional ORCAROUTER_MODEL, and updated GITREVERSE_QUICK_LLM docs.
  • README.md — OrcaRouter added to the provider table and the auto preference order.

Why a named provider

GitReverse already treats OpenRouter as a named first-class provider (GITREVERSE_QUICK_LLM=openrouter with a default model and key env var). OrcaRouter is the same shape — an OpenAI-compatible gateway with namespaced model ids — so it gets a discoverable named slot instead of a generic "edit the URL yourself" instruction. The namespaced default matters: the gateway rejects bare model names, so shipping anthropic/claude-sonnet-5 as the default makes the provider work out of the box.

Changes

File Change
lib/quick-llm.ts LlmProvider + ORCAROUTER_URL + orcarouterTargetFromApiKey + auto/resolve/display/auth-hint wiring
app/api/reverse-prompt/route.ts mirrored provider wiring in the route's inline resolver
.env.example ORCAROUTER_API_KEY / ORCAROUTER_MODEL docs
README.md provider table row + auto order

Verification

  • tsc --noEmit — clean
  • pnpm lint (eslint) — the only failure is a pre-existing issue on main unrelated to this change: react-hooks/set-state-in-effect in lib/use-partner-preview.ts:13. Verified by stashing this change and running pnpm lint on clean main — same error. None of the touched files produce lint errors.
  • Live test of the exact callQuickLlm path with a real ORCAROUTER_API_KEY: POST https://api.orcarouter.ai/v1/chat/completions with anthropic/claude-sonnet-5 → HTTP 200 with a model response.

I'm an engineer on the OrcaRouter team.

filiksyos and others added 3 commits August 14, 2026 17:09
Mirror the existing OpenRouter wiring: new 'orcarouter' LlmProvider in
lib/quick-llm.ts and the reverse-prompt route's inline resolver, with
ORCAROUTER_API_KEY/ORCAROUTER_MODEL env vars and a namespaced default
model (anthropic/claude-sonnet-5). Updates .env.example and README.

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@Marc-oss-hub is attempting to deploy a commit to the filiksyos' projects Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your trial has ended. Reactivate Greptile to resume code reviews.

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