Skip to content

feat: add OrcaRouter as a named OpenAI-compatible provider - #411

Open
XiaoHuo888-hue wants to merge 1 commit into
interviewstreet:mainfrom
XiaoHuo888-hue:add-orcarouter-provider
Open

feat: add OrcaRouter as a named OpenAI-compatible provider#411
XiaoHuo888-hue wants to merge 1 commit into
interviewstreet:mainfrom
XiaoHuo888-hue:add-orcarouter-provider

Conversation

@XiaoHuo888-hue

Copy link
Copy Markdown

What

Adds OrcaRouter as a named OpenAI-compatible provider in providers.json, mirroring the existing gemini / anthropic config entries. Since the repo's provider layer is config-driven (one OpenAICompatibleProvider pointed at a configurable base_url), this is a pure configuration + docs change — zero Python edits.

Changes

  • providers.json — new orcarouter provider:
    • base_url: https://api.orcarouter.ai/v1
    • api_key_env: ORCAROUTER_API_KEY
    • structured_output: json_object (verified against the live API)
    • models: orcarouter/auto (smart routing), orcarouter/fusion, orcarouter/fusion-flash, orcarouter/fusion-mini
  • .env.example — document ORCAROUTER_API_KEY and the orcarouter/* model examples.
  • README.md — document OrcaRouter under Provider details and in the env-var table.

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.

Verification

  • providers.json parses; config.py / llm_utils.py / models.py compile clean.
  • Live test through the real code path (initialize_llm_provider("orcarouter/auto")OpenAICompatibleProvider.chat()): all four orcarouter/* models resolve, and orcarouter/auto returns parseable JSON via the repo's json_object response_format translation.
  • orcarouter/auto, orcarouter/fusion, orcarouter/fusion-flash, orcarouter/fusion-mini all return HTTP 200 with valid JSON.

Disclosure: I'm an engineer on the OrcaRouter team.

Add an orcarouter entry to providers.json, mirroring the existing
gemini/anthropic config entries. OrcaRouter is an OpenAI-compatible
chat gateway at https://api.orcarouter.ai/v1, so it works through the
same OpenAICompatibleProvider with zero Python changes.

- providers.json: orcarouter provider (base_url, ORCAROUTER_API_KEY,
  json_object structured output) with the orcarouter/auto, fusion,
  fusion-flash, and fusion-mini gateway models
- .env.example: ORCAROUTER_API_KEY
- README.md: document the OrcaRouter backend under Provider details

Verified live with a real key through initialize_llm_provider():
orcarouter/auto returns parseable JSON with the repo's json_object
response_format translation.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: XiaoHuo888-hue <jinhao.song@myflashcloud.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant