feat: recognize OrcaRouter as a first-class provider - #678
Open
kuswardhanietidims-svg wants to merge 1 commit into
Open
feat: recognize OrcaRouter as a first-class provider#678kuswardhanietidims-svg wants to merge 1 commit into
kuswardhanietidims-svg wants to merge 1 commit into
Conversation
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
The Codex plugin for Claude Code is for Claude Code users who want an easy way to start using Codex from the workflow they already have. It delegates everything through your local Codex CLI, which means the model provider you use is the one Codex itself is configured with.
Right now, when the active provider isn't one of the built-ins,
/codex:setupand/codex:statusjust print the raw provider id — so a user pointing Codex at a custom OpenAI-compatible gateway sees an unfriendly identifier instead of the service they actually configured.This PR makes OrcaRouter a first-class, named provider in the same way the plugin already treats OpenAI, Ollama, and LM Studio.
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 first-class provider means this project's 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.
Changes
plugins/codex/scripts/lib/codex.mjs— addedorcarouterto the built-in provider label map (mirroringopenai/ollama/lmstudio), so a user whose Codex config selectsmodel_provider = "orcarouter"sees OrcaRouter as the active provider in/codex:setupand/codex:statusinstead of the raw id.README.md— added a "Can I use another model provider?" FAQ entry that shows the exactconfig.tomlsnippet for routing Codex through OrcaRouter (base_url = "https://api.orcarouter.ai/v1",env_key = "ORCAROUTER_API_KEY"), alongside the existingopenai_base_urlguidance.tests/fake-codex-fixture.mjs+tests/runtime.test.mjs— neworcarouter-providerfixture and two tests covering setup readiness and task execution when OrcaRouter is the active provider.Validation
npm test— 93/93 passing (91 baseline + 2 new).npm run build(tsc +codex app-server generate-ts) — clean.npm run check-version— version metadata consistent./codex:setupagainst a real Codex config pointed athttps://api.orcarouter.ai/v1withmodel_provider = "orcarouter"— it reportsprovider: orcarouterand "OrcaRouter is configured and does not require OpenAI authentication".codex execthrough that same config — Codex resolvedprovider: orcarouterand completed a real task against the OrcaRouter endpoint (HTTP 200).Usage
To route this plugin's Codex runs through OrcaRouter, add to
~/.codex/config.toml:Discord: discord.gg/YEubt8enRA · X: https://x.com/OrcaRouter
I'm an engineer on the OrcaRouter team.