feat(providers): add OrcaRouter as a named provider - #110
Conversation
Signed-off-by: jinhao.song <jinhao.song@myflashcloud.com>
|
Thanks for the clean patch, and for the up-front disclosure. The code is not the problem here: it follows the data-driven provider pattern exactly, the env-override wiring is in the right place, and you tested it live. I am still going to decline it. The shipped The good news is that you do not need me for this. The registry is overridable per provider, so anyone who wants OrcaRouter gets it without a fork:
If you publish that file somewhere, I am happy to link it from the README's provider section as a third-party config, which gets your users the same result and keeps ownership where it belongs. |
Summary
Adds OrcaRouter as a named cloud-gateway provider in the shipped model registry, mirroring the existing data-driven provider flow.
models.json: neworcarouterprovider entry —api: "openai-completions",baseUrl: "https://api.orcarouter.ai/v1",apiKey: "ORCAROUTER_API_KEY"— with six models covering the gateway's auto-routing alias (orcarouter/auto), fast/cheap (orcarouter/fusion), free tier (orcarouter/free), and vendor-qualified frontier models (DeepSeek V4 Pro, Qwen3.7 Max, Gemini 3.5 Flash via OrcaRouter)..pi/extensions/llama-cpp-provider/config.ts: registerorcarouterin the per-provider env-override map soORCAROUTER_BASE_URLoverrides the default endpoint.ORCAROUTER_BASE_URLoverride case + shipped-registry assertions (base URL, API-key env,orcarouter/autopresence).README.md: "OrcaRouter (cloud gateway)" section with setup, model list, and env vars.CHANGELOG.md: Unreleased entry.OrcaRouter is an OpenAI-compatible gateway that fronts both open-weight and frontier models behind a single endpoint. 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.
Verification
vitest run: 614 passed; the 8 failures are pre-existing environment issues (launcher needs the bundled pi version on--version, browser-extract-retention hits live Wikipedia, glob hits a memory-bound walk) — confirmed identical on a cleanmaintree.tsc --noEmit: clean.https://api.orcarouter.ai/v1through the exact production path (loadProviders→applyEnvOverrides→orcarouterprovider):HTTP 200, auto-routed todeepseek-v4-pro, replyORCA-OK.Disclosure: I'm an engineer on the OrcaRouter team.