Skip to content

feat(providers): add OrcaRouter provider - #3724

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

feat(providers): add OrcaRouter provider#3724
kuswardhanietidims-svg wants to merge 1 commit into
openai:mainfrom
kuswardhanietidims-svg:add-orcarouter-provider

Conversation

@kuswardhanietidims-svg

Copy link
Copy Markdown

Adds a first-class orcarouter(...) provider so the standard OpenAI client can talk to OrcaRouter, an OpenAI-compatible model routing gateway. It mirrors the existing bedrock(...) provider: a factory in src/openai/providers/orcarouter.py owning the https://api.orcarouter.ai/v1 endpoint and bearer auth, configured via OpenAI(provider=orcarouter(...)), and it retains the SDK's normal retries, streaming, and error handling. 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.

  • tests/lib/test_orcarouter_provider.py: 21 tests mirroring the bedrock suite (endpoint ownership, sync/async bearer auth, env isolation, with_options cloning, cross-origin/custom-header rejection). All pass; existing bedrock + client tests pass.
  • ruff check, ruff format --check, mypy, pyright all clean.
  • L3 live test against https://api.orcarouter.ai/v1: chat completion, streaming, and models.list() returned 200.

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

Add an orcarouter(...) provider factory for the standard OpenAI client,
mirroring the existing bedrock provider shape. It configures the
https://api.orcarouter.ai/v1 endpoint and bearer authentication, reading
the API key from ORCAROUTER_API_KEY by default.

Co-Authored-By: Claude <noreply@anthropic.com>
@kuswardhanietidims-svg
kuswardhanietidims-svg requested a review from a team as a code owner August 24, 2026 02:52
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