Skip to content

Add OrcaRouter as a first-class model provider - #525

Open
zsanig22-dotcom wants to merge 1 commit into
vercel-labs:mainfrom
zsanig22-dotcom:feat/orcarouter-provider
Open

Add OrcaRouter as a first-class model provider#525
zsanig22-dotcom wants to merge 1 commit into
vercel-labs:mainfrom
zsanig22-dotcom:feat/orcarouter-provider

Conversation

@zsanig22-dotcom

Copy link
Copy Markdown

Add OrcaRouter as a named model provider.

fx is a tiny, open, embeddable coding agent that currently routes through Vercel AI Gateway, Codex, and Grok. This PR adds orcarouter as a fourth first-class provider alongside them: OrcaRouter is an OpenAI-compatible AI gateway that exposes a provider/model namespace across many models, and like OpenRouter it works as a drop-in base URL — but it also adds adaptive routing, automatic failover, zero-markup inference, observability, guardrails, and agent-tool governance on the same endpoint. Wiring it as a named provider means fx users can use that stack directly instead of treating it 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 provider mirrors the shared Responses-protocol streaming already used by Codex and Grok, pointed at https://api.orcarouter.ai/v1/responses, with a model catalog fetched from https://api.orcarouter.ai/v1/models. Credentials resolve from ORCAROUTER_API_KEY through the existing credential precedence, and fx login orcarouter selects the provider when the key is set (no OAuth session to create).

Verification:

  • zig build and zig fmt --check src/ pass; the full zig build test suite matches baseline (same pre-existing environment-dependent failures, no new ones; 6 new OrcaRouter tests pass).
  • Live: fx models lists 204 OrcaRouter models from the real endpoint, and fx ask through the provider returned a real model reply (HTTP 200).

I'm an engineer on the OrcaRouter team. Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter

Add orcarouter as a named provider alongside Gateway, Codex, and Grok.
OrcaRouter is an OpenAI-compatible AI gateway at api.orcarouter.ai, so the
provider mirrors the shared Responses-protocol streaming used by Codex and
Grok against https://api.orcarouter.ai/v1/responses, and lists models from
https://api.orcarouter.ai/v1/models.

Credentials come from the ORCAROUTER_API_KEY environment variable, resolved
through the existing credential precedence. fx login orcarouter selects the
provider when the key is set; there is no OAuth session to create.

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

Copy link
Copy Markdown
Author

This PR should carry the type: feature label (per CONTRIBUTING.md). The fork contributor does not have label permissions, so a maintainer will need to apply it.

@vercel-security-reviewer

Copy link
Copy Markdown

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