Skip to content

feat: recognize OrcaRouter as a first-class provider - #678

Open
kuswardhanietidims-svg wants to merge 1 commit into
openai:mainfrom
kuswardhanietidims-svg:feat/orcarouter-provider
Open

feat: recognize OrcaRouter as a first-class provider#678
kuswardhanietidims-svg wants to merge 1 commit into
openai:mainfrom
kuswardhanietidims-svg:feat/orcarouter-provider

Conversation

@kuswardhanietidims-svg

Copy link
Copy Markdown

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:setup and /codex:status just 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 — added orcarouter to the built-in provider label map (mirroring openai / ollama / lmstudio), so a user whose Codex config selects model_provider = "orcarouter" sees OrcaRouter as the active provider in /codex:setup and /codex:status instead of the raw id.
  • README.md — added a "Can I use another model provider?" FAQ entry that shows the exact config.toml snippet for routing Codex through OrcaRouter (base_url = "https://api.orcarouter.ai/v1", env_key = "ORCAROUTER_API_KEY"), alongside the existing openai_base_url guidance.
  • tests/fake-codex-fixture.mjs + tests/runtime.test.mjs — new orcarouter-provider fixture 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.
  • Live check: ran the plugin's /codex:setup against a real Codex config pointed at https://api.orcarouter.ai/v1 with model_provider = "orcarouter" — it reports provider: orcarouter and "OrcaRouter is configured and does not require OpenAI authentication".
  • Live check: ran codex exec through that same config — Codex resolved provider: orcarouter and 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:

model = "anthropic/claude-sonnet-5"
model_provider = "orcarouter"

[model_providers.orcarouter]
name = "OrcaRouter"
base_url = "https://api.orcarouter.ai/v1"
env_key = "ORCAROUTER_API_KEY"

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

I'm an engineer on the OrcaRouter team.

@kuswardhanietidims-svg
kuswardhanietidims-svg requested a review from a team August 24, 2026 03:37
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