Skip to content

feat: add OrcaRouter as a named provider template - #412

Open
XiaoHuo888-hue wants to merge 1 commit into
SaladDay:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider
Open

feat: add OrcaRouter as a named provider template#412
XiaoHuo888-hue wants to merge 1 commit into
SaladDay:mainfrom
XiaoHuo888-hue:feat/orcarouter-provider

Conversation

@XiaoHuo888-hue

@XiaoHuo888-hue XiaoHuo888-hue commented Aug 13, 2026

Copy link
Copy Markdown

Summary

This adds OrcaRouter as a named provider template in both the interactive TUI (provider add form) and the scriptable CLI (provider add --template orcarouter), wired the same way the existing DeepSeek preset is, so the template list, generated settings and tests stay consistent.

OrcaRouter is an OpenAI-compatible model routing gateway: one key (keys start with sk-orca-) unlocks 150+ models from OpenAI, Anthropic, Google, DeepSeek, Qwen, MiniMax and xAI behind a single https://api.orcarouter.ai/v1 endpoint. 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.

I'm an engineer on the OrcaRouter team.

What's added

  • CLI (src-tauri/src/cli/commands/provider_input.rs)
    • New ProviderAddTemplate::Orcarouter template available for claude and codex apps.
    • Claude preset writes ANTHROPIC_BASE_URL=https://api.orcarouter.ai/v1 (native Anthropic endpoint) with default model orcarouter/fusion.
    • Codex preset generates a config.toml with base_url=https://api.orcarouter.ai/v1, wire_api="responses" and a model catalog (orcarouter/fusion, orcarouter/fusion-flash, orcarouter/fusion-mini).
    • Category aggregator, website https://www.orcarouter.ai, brand icon + color.
  • TUI (src-tauri/src/cli/tui/form/provider_templates.rs, tests.rs)
    • OrcaRouter entry in the Claude and Codex template lists, mirroring the DeepSeek wiring in the add-provider form (fields, catalog rows, wire API and model defaults).
  • Icons (src-tauri/src/provider_defaults.rs)
    • orcarouter entry in DEFAULT_PROVIDER_ICONS.

How to use

cc-switch provider add --template orcarouter
# or in the TUI:  Provider Add → template "OrcaRouter"

OrcaRouter is a named router — the virtual orcarouter/auto model picks an upstream per request (adaptive routing).

How tested

  • cargo fmt --check clean.
  • cargo test (provider template tests) pass, including new CLI + TUI tests for the OrcaRouter preset.
  • Live-tested against the real API with a sk-orca- key:
    • POST https://api.orcarouter.ai/v1/messages (Anthropic format, model orcarouter/fusion) → 200
    • POST https://api.orcarouter.ai/v1/responses (OpenAI Responses format, model orcarouter/fusion) → 200
    • POST https://api.orcarouter.ai/v1/chat/completions (model orcarouter/fusion) → 200
    • GET https://api.orcarouter.ai/v1/models → 193 models (incl. orcarouter/auto, orcarouter/fusion, orcarouter/fusion-flash, orcarouter/fusion-mini)

Documentation impact

None — the preset is surfaced through the existing provider-add flows.

Adds an OrcaRouter provider preset to the provider add flows (CLI
`provider add --template orcarouter` and the TUI add-provider form)
for Claude Code and Codex, mirroring the existing DeepSeek named
template. Claude uses OrcaRouter's native Anthropic endpoint
(ANTHROPIC_BASE_URL=https://api.orcarouter.ai/v1) and Codex gets a
config.toml with wire_api="responses"; a model catalog covers
orcarouter/fusion, orcarouter/fusion-flash and orcarouter/fusion-mini.

Co-Authored-By: Claude <noreply@anthropic.com>
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