Skip to content

feat: add OrcaRouter (orcarouter/) as a first-class provider - #1

Open
xilema2 wants to merge 1 commit into
mainfrom
feat/orcarouter
Open

feat: add OrcaRouter (orcarouter/) as a first-class provider#1
xilema2 wants to merge 1 commit into
mainfrom
feat/orcarouter

Conversation

@xilema2

@xilema2 xilema2 commented May 21, 2026

Copy link
Copy Markdown
Owner

OrcaRouter (https://www.orcarouter.ai) is an OpenAI-compatible LLM meta-router. This adds it as a first-class provider in aider:

  • New OrcaRouterModelManager that fetches the public /api/pricing catalog (no auth) and exposes per-model context_length / pricing in litellm get_model_info shape. Pricing uses OrcaRouter's published quota formula (model_ratio * 2 USD/1M for input, * completion_ratio for output).
  • ModelInfoManager delegates to it for orcarouter/-prefixed models when litellm has no built-in info.
  • Model.send_completion auto-routes orcarouter// to api.orcarouter.ai/v1 via litellm's OpenAI-compatible client, using ORCAROUTER_API_KEY from the environment. HTTP-Referer / X-Title attribution headers are injected so OrcaRouter's console can credit the traffic to aider.
  • ORCAROUTER_API_KEY added to fast_validate_environment keymap.
  • "orcarouter-auto" alias added for the orcarouter/orcarouter/auto adaptive router.
  • Docs page at aider/website/docs/llms/orcarouter.md.
  • Unit tests in tests/basic/test_orcarouter.py mirroring the existing OpenRouter test pattern.

I'm an engineer on the OrcaRouter team.

OrcaRouter (https://www.orcarouter.ai) is an OpenAI-compatible LLM
meta-router. This adds it as a first-class provider in aider:

- New OrcaRouterModelManager that fetches the public
  /api/pricing catalog (no auth) and exposes per-model
  context_length / pricing in litellm get_model_info shape.
  Pricing uses OrcaRouter's published quota formula
  (model_ratio * 2 USD/1M for input, * completion_ratio for output).
- ModelInfoManager delegates to it for orcarouter/-prefixed models
  when litellm has no built-in info.
- Model.send_completion auto-routes orcarouter/<vendor>/<model>
  to api.orcarouter.ai/v1 via litellm's OpenAI-compatible client,
  using ORCAROUTER_API_KEY from the environment. HTTP-Referer /
  X-Title attribution headers are injected so OrcaRouter's console
  can credit the traffic to aider.
- ORCAROUTER_API_KEY added to fast_validate_environment keymap.
- "orcarouter-auto" alias added for the orcarouter/orcarouter/auto
  adaptive router.
- Docs page at aider/website/docs/llms/orcarouter.md.
- Unit tests in tests/basic/test_orcarouter.py mirroring the
  existing OpenRouter test pattern.

I'm an engineer on the OrcaRouter team.
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