Add OrcaRouter as a first-class model provider - #525
Open
zsanig22-dotcom wants to merge 1 commit into
Open
Conversation
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>
Author
|
This PR should carry the |
|
Security review: https://vercel.slack.com/archives/C0BSEH6GB18/p1788059209507419 |
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.
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
orcarouteras 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 fromhttps://api.orcarouter.ai/v1/models. Credentials resolve fromORCAROUTER_API_KEYthrough the existing credential precedence, andfx login orcarouterselects the provider when the key is set (no OAuth session to create).Verification:
zig buildandzig fmt --check src/pass; the fullzig build testsuite matches baseline (same pre-existing environment-dependent failures, no new ones; 6 new OrcaRouter tests pass).fx modelslists 204 OrcaRouter models from the real endpoint, andfx askthrough 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