kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

[FEATURE]: Add OrcaRouter as a built-in AI provider

Open zhenjunchen-png opened this issue 6 months ago • 1 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I'd like to add OrcaRouter as a built-in AI provider in Kilo Code, alongside the existing AI gateways (OpenRouter, Glama, Requesty, etc.).

What is OrcaRouter?

OrcaRouter is an OpenAI-compatible API gateway that routes requests to OpenAI, Anthropic, Google Gemini, DeepSeek, xAI Grok, Alibaba Qwen, Moonshot Kimi, MiniMax, and Z.ai. Models are reached at the upstream provider's published per-token price; the gateway's revenue comes from optional paid plans, not from inflating token costs.

Why add it to Kilo Code?

  • Single API key gives access to ~80 chat models from 9 vendors via Kilo Code's existing provider abstraction.
  • Speaks the OpenAI wire shape end-to-end, so it slots in via @ai-sdk/openai-compatible with no new SDK dependency.
  • Has a built-in auto router (cheapest / balanced / quality / adaptive strategies, configurable from the OrcaRouter dashboard) that Kilo Code users can address as orcarouter/auto.
  • Reasoning effort, streaming, tool calling, and multimodal inputs all work out of the box because OrcaRouter forwards in OpenAI shape and translates per-vendor where needed.

Proposed implementation

  • New provider module packages/opencode/src/kilocode/provider/orcarouter.ts that fetches the OrcaRouter /api/pricing catalog and transforms it to the Kilo ModelsDev.Model shape. Filters non-chat models (image / video / embedding / TTS / STT / rerank). Adds the orcarouter/auto router as a synthetic catalog entry.
  • Custom loader entry in packages/opencode/src/kilocode/provider/provider.ts that gates autoload on whether a key is configured.
  • Minimal // kilocode_change hooks in the shared packages/opencode/src/provider/{model-cache,models,transform}.ts files to wire the loader into the upstream flow — mirroring the pattern other Kilo-side providers (apertis) already use.
  • New docs page packages/kilo-docs/pages/ai-providers/orcarouter.md and supporting nav / lychee / index edits.
  • Unit tests covering catalog parsing, chat-only filtering, temperature blacklist for known-reject reasoning models, and reasoning-by-family-pattern detection.
  • A corresponding gateway-side PR in Kilo-Org/cloud will register OrcaRouter as a known upstream so Kilo Gateway users can also reach it.

Maintenance

I'm an engineer on the OrcaRouter team and will own ongoing maintenance for this provider integration.

I've verified there's no existing issue or PR proposing this provider in Kilo-Org/kilocode.

zhenjunchen-png avatar May 26 '26 10:05 zhenjunchen-png

To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please reopen it or create a fresh new one.

github-actions[bot] avatar Jul 26 '26 06:07 github-actions[bot]