feat: add OrcaRouter as a first-class quick-LLM provider - #146
Open
Marc-oss-hub wants to merge 3 commits into
Open
feat: add OrcaRouter as a first-class quick-LLM provider#146Marc-oss-hub wants to merge 3 commits into
Marc-oss-hub wants to merge 3 commits into
Conversation
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>
|
@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. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
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.
Summary
Adds OrcaRouter as a first-class
LlmProviderin 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 existingchat/completionscall 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— neworcarouterprovider in theLlmProviderunion,ORCAROUTER_URLconstant,orcarouterTargetFromApiKey()(defaults toanthropic/claude-sonnet-5, overridable withORCAROUTER_MODEL), added to theGITREVERSE_QUICK_LLM=autokey-resolution chain and the explicitGITREVERSE_QUICK_LLM=orcarouterbranch, plusproviderDisplayNameand 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.example—ORCAROUTER_API_KEY+ optionalORCAROUTER_MODEL, and updatedGITREVERSE_QUICK_LLMdocs.README.md— OrcaRouter added to the provider table and theautopreference order.Why a named provider
GitReverse already treats OpenRouter as a named first-class provider (
GITREVERSE_QUICK_LLM=openrouterwith 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 shippinganthropic/claude-sonnet-5as the default makes the provider work out of the box.Changes
lib/quick-llm.tsLlmProvider+ORCAROUTER_URL+orcarouterTargetFromApiKey+ auto/resolve/display/auth-hint wiringapp/api/reverse-prompt/route.ts.env.exampleORCAROUTER_API_KEY/ORCAROUTER_MODELdocsREADME.mdautoorderVerification
tsc --noEmit— cleanpnpm lint(eslint) — the only failure is a pre-existing issue onmainunrelated to this change:react-hooks/set-state-in-effectinlib/use-partner-preview.ts:13. Verified by stashing this change and runningpnpm linton cleanmain— same error. None of the touched files produce lint errors.callQuickLlmpath with a realORCAROUTER_API_KEY:POST https://api.orcarouter.ai/v1/chat/completionswithanthropic/claude-sonnet-5→ HTTP 200 with a model response.I'm an engineer on the OrcaRouter team.