feat: add OrcaRouter as a built-in provider - #268
Open
dulcestentaciones2920-debug wants to merge 1 commit into
Open
feat: add OrcaRouter as a built-in provider#268dulcestentaciones2920-debug wants to merge 1 commit into
dulcestentaciones2920-debug wants to merge 1 commit into
Conversation
Adds OrcaRouter as a first-class built-in provider alongside OpenRouter. OrcaRouter exposes an OpenRouter-compatible API at https://api.orcarouter.ai/v1 with the same provider/model namespace, OpenRouter-style /models pricing, and provider.order routing params, so it reuses rig's OpenRouter client pointed at OrcaRouter's base URL with its own ORCAROUTER_API_KEY. Mirrors the existing OpenRouter wiring: ProviderKind::OrcaRouter, AnyClient::OrcaRouter, AnyModel::OrcaRouter, AnyAgent::OrcaRouter, plus the setup TUI, /provider picker, live pricing/context discovery, default model (orcarouter/auto), and docs. Co-Authored-By: Claude <noreply@anthropic.com>
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.
This PR makes OrcaRouter selectable as a first-class provider in zerostack — the same way OpenRouter is today — so users of this minimal Rust coding agent can point
--provider orcarouterat a single OpenAI-compatible gateway without hand-rolling a custombase_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. Addingorcarouteras a named provider means zerostack users get that whole stack directly, rather than treating OrcaRouter as an anonymous custom base URL. 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.The implementation mirrors zerostack's existing OpenRouter wiring exactly: a new
ProviderKind::OrcaRouter,AnyClient/AnyModel/AnyAgentvariants that reuse rig's OpenRouter client pointed athttps://api.orcarouter.ai/v1, its ownORCAROUTER_API_KEYenv var,orcarouter/autoas the default model, and the same OpenRouter-style live/modelspricing/context discovery plusprovider.orderrouting foranthropic/*ids. It's also wired into the/providerpicker, the--setupTUI,--provider/ZS_PROVIDER,custom_providersprovider_type, subagents, the advisor, and the docs. OrcaRouter's/modelslisting reports OpenRouter-stylepricing/context_length, so cost tracking and the context meter work from the first turn.Verified locally:
cargo fmt --check,cargo clippy --all-featuresand--no-default-featureswith-D warnings, and the full test suite all pass (the twoshell_mode_testskill-behavior cases fail identically onmainin a container without process-group semantics). I also ran a live one-shot through the new code path —zerostack --provider orcarouter --model orcarouter/auto -p 'Reply with pong'against a realORCAROUTER_API_KEY— and got apongreply.Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.