feat: add OrcaRouter as a named provider template - #412
Open
XiaoHuo888-hue wants to merge 1 commit into
Open
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 singlehttps://api.orcarouter.ai/v1endpoint. 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
src-tauri/src/cli/commands/provider_input.rs)ProviderAddTemplate::Orcaroutertemplate available forclaudeandcodexapps.ANTHROPIC_BASE_URL=https://api.orcarouter.ai/v1(native Anthropic endpoint) with default modelorcarouter/fusion.config.tomlwithbase_url=https://api.orcarouter.ai/v1,wire_api="responses"and a model catalog (orcarouter/fusion,orcarouter/fusion-flash,orcarouter/fusion-mini).aggregator, websitehttps://www.orcarouter.ai, brand icon + color.src-tauri/src/cli/tui/form/provider_templates.rs,tests.rs)src-tauri/src/provider_defaults.rs)orcarouterentry inDEFAULT_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/automodel picks an upstream per request (adaptive routing).How tested
cargo fmt --checkclean.cargo test(provider template tests) pass, including new CLI + TUI tests for the OrcaRouter preset.sk-orca-key:POST https://api.orcarouter.ai/v1/messages(Anthropic format, modelorcarouter/fusion) → 200POST https://api.orcarouter.ai/v1/responses(OpenAI Responses format, modelorcarouter/fusion) → 200POST https://api.orcarouter.ai/v1/chat/completions(modelorcarouter/fusion) → 200GET 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.