feat: add OrcaRouter as a named inference provider - #736
Open
martinzudergaming-a11y wants to merge 1 commit into
Open
feat: add OrcaRouter as a named inference provider#736martinzudergaming-a11y wants to merge 1 commit into
martinzudergaming-a11y wants to merge 1 commit into
Conversation
Add orcarouter to the external Codex providers so users can run scans through OrcaRouter with `--provider orcarouter`, mirroring the existing OpenRouter and Fireworks integrations. - Register ORCAROUTER_CODEX_PROVIDER (base_url, env_key, wire_api) - Accept orcarouter in the CLI --provider enum and help text - Forward ORCAROUTER_API_KEY through the MCP worker and plugin environment - Cover the new provider in API, CLI, runtime, and preflight tests - Document the orcarouter quick-start example in both READMEs
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.
Summary
Codex Security is a CLI and TypeScript SDK for finding, validating, and fixing security vulnerabilities in your code. When users want to scan through an inference provider other than OpenAI's first-party endpoint, they already reach for the "Other providers" section of the README and pass
--provider openrouteror--provider fireworkswith that provider's API key.This PR adds OrcaRouter as a first-class provider in that same registry, so users can run:
instead of treating OrcaRouter as an anonymous custom base URL.
Changes
ORCAROUTER_CODEX_PROVIDERinEXTERNAL_CODEX_PROVIDERS(sdk/typescript/src/config.ts), mirroringOPENROUTER_CODEX_PROVIDER:base_urlhttps://api.orcarouter.ai/v1,env_keyORCAROUTER_API_KEY,wire_apiresponses.orcarouterin the CLI--providerenum and the generated help text (sdk/typescript/src/cli.ts).ORCAROUTER_API_KEYto theScanAuthenticationsource unions and the selected-scan-environment filter insdk/typescript/src/api.ts, so the key is forwarded to the Codex runtime exactly like the other external provider keys.ORCAROUTER_API_KEYto the plugin helper secret environment variables (sdk/typescript/src/runtime.ts) and to the MCP server's allowedenv_vars(plugins/codex-security/.mcp.jsonand its smoke test), so the key never leaks into helper subprocesses.Because the provider registry is data-driven, the existing
isExternalModelProvider/EXTERNAL_CODEX_PROVIDERS[provider]paths pick up the new entry without any provider-specific branching.Testing
pnpm run lint(tsc --noEmit) passes.pnpm run types(generated models check, MCP typecheck, tsc) passes.pnpm run format(Prettier) passes.api.test.ts141 pass / 0 fail,cli.test.ts147 pass / 0 fail,runtime.test.ts132 pass / 0 fail,api-preflight-config.test.ts17 pass / 0 fail,api-events.test.ts36 pass / 0 fail.base_urlandORCAROUTER_API_KEY, and the generated Codex config emitsmodel_provider: orcarouterwith the expectedmodel_providers.orcarouterblock.Note: the full local suite has pre-existing failures in git-blob-bound tests (
compact-diff-scan,diff-rank-input) and an MCP smoke test that requireripgrep; these fail identically on the pristine checkout in this container and are unrelated to this change.Risk and rollout
No behavioral change for existing providers;
orcarouteris an additive enum value. The new provider requires users to supply their ownORCAROUTER_API_KEY, matching the existing OpenRouter/Fireworks flow. No credentials, findings, or private links are included.Public disclosure review
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
orcarouteras a first-class provider means Codex Security users can use that stack directly, without 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.
Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.