Skip to content

Add OrcaRouter as an LLM-based translation provider - #281

Open
Marc-oss-hub wants to merge 1 commit into
SakiRinn:masterfrom
Marc-oss-hub:feat/orcarouter-provider
Open

Add OrcaRouter as an LLM-based translation provider#281
Marc-oss-hub wants to merge 1 commit into
SakiRinn:masterfrom
Marc-oss-hub:feat/orcarouter-provider

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

Summary

Adds OrcaRouter as a model provider. OrcaRouter is
an OpenAI-compatible model routing gateway that exposes 150+ models from OpenAI,
Anthropic, Google, DeepSeek, Qwen, MiniMax, xAI and others behind a single
endpoint and API key.

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 this changes

  • src/apis/TranslateAPI.cs: registers the OrcaRouter provider in the translate-function map, mirroring the OpenRouter wiring
  • src/apis/LLMRequestDataFactory.cs: maps OrcaRouter to the base LLM request data (model/messages/temperature/max_tokens/stream/keep_alive), which is the shape the OrcaRouter endpoint accepts
  • src/models/TranslateAPIConfig.cs: adds OrcaRouterConfig (API-key backed, mirror of OpenRouterConfig)
  • src/models/Setting.cs: registers OrcaRouter config defaults in the settings dictionary
  • src/windows/SettingWindow.xaml: adds the OrcaRouter section and nav button to the settings UI
  • README.md / README_zh-CN.md: documents the provider in the supported-engines table

Why a separate provider rather than the OpenAI-compatible escape hatch

This mirrors how OpenRouter is wired in this repo, so the model picker, settings UI and docs stay consistent for users. OrcaRouter is OpenAI-compatible, so no extra SDK or dependency is introduced.

How to use it

  1. Get an API key at https://www.orcarouter.ai/console (keys start with sk-orca-).
  2. Open Settings → OrcaRouter, paste the key and pick a model id such as openai/gpt-5.5, anthropic/claude-opus-4.8 or z-ai/glm-5.2. The full catalog is at https://www.orcarouter.ai/models.

Verification

  • Build: dotnet build passes locally on feat/orcarouter-provider
  • Format: dotnet format --verify-no-changes passes (matches the CI gate)
  • Live API: replicated the exact request body the provider sends against https://api.orcarouter.ai/v1/chat/completions with a real key — HTTP 200 with a valid translation returned

Mirrors the existing OpenRouter wiring: registers the provider in the
translate-function map, adds OrcaRouterConfig with API-key auth, maps it
to the base LLM request data shape accepted by the OrcaRouter endpoint,
and adds the settings UI section and README entries.

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