Skip to content

feat: add OrcaRouter as a built-in provider - #268

Open
dulcestentaciones2920-debug wants to merge 1 commit into
gi-dellav:mainfrom
dulcestentaciones2920-debug:feat/add-orcarouter-provider
Open

feat: add OrcaRouter as a built-in provider#268
dulcestentaciones2920-debug wants to merge 1 commit into
gi-dellav:mainfrom
dulcestentaciones2920-debug:feat/add-orcarouter-provider

Conversation

@dulcestentaciones2920-debug

@dulcestentaciones2920-debug dulcestentaciones2920-debug commented Aug 31, 2026

Copy link
Copy Markdown

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 orcarouter at a single OpenAI-compatible gateway without hand-rolling a 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 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/AnyAgent variants that reuse rig's OpenRouter client pointed at https://api.orcarouter.ai/v1, its own ORCAROUTER_API_KEY env var, orcarouter/auto as the default model, and the same OpenRouter-style live /models pricing/context discovery plus provider.order routing for anthropic/* ids. It's also wired into the /provider picker, the --setup TUI, --provider/ZS_PROVIDER, custom_providers provider_type, subagents, the advisor, and the docs. OrcaRouter's /models listing reports OpenRouter-style pricing/context_length, so cost tracking and the context meter work from the first turn.

Verified locally: cargo fmt --check, cargo clippy --all-features and --no-default-features with -D warnings, and the full test suite all pass (the two shell_mode_tests kill-behavior cases fail identically on main in 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 real ORCAROUTER_API_KEY — and got a pong reply.

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

I'm an engineer on the OrcaRouter team.

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

1 participant