Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

### 字幕翻译

- 20 个翻译服务:内置免费翻译(必应 / 谷歌免费接口,自动回退与限速)、百度、阿里云、腾讯、讯飞、火山引擎、豆包、小牛、DeepLX、Azure、Google,以及 Ollama(本地模型)、DeepSeek、Gemini、通义千问、SiliconFlow、Azure OpenAI、[DeerAPI](https://api.deerapi.com/register?aff=QvHM) 等大模型服务
- 20 个翻译服务:内置免费翻译(必应 / 谷歌免费接口,自动回退与限速)、百度、阿里云、腾讯、讯飞、火山引擎、豆包、小牛、DeepLX、Azure、Google,以及 Ollama(本地模型)、DeepSeek、Gemini、通义千问、SiliconFlow、Azure OpenAI、[OrcaRouter](https://www.orcarouter.ai)、[DeerAPI](https://api.deerapi.com/register?aff=QvHM) 等大模型服务
- 兼容任意 OpenAI 风格 API,可接入自有服务
- 输出纯译文,或「原文 + 译文」双语字幕
- 每个 AI 服务可在界面直接配置自定义请求参数,支持导出导入,无需改代码
Expand Down
2 changes: 1 addition & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Online video **download** / local media → **transcribe** → **translate** →

### Subtitle translation

- 20 translation services: built-in free translation (Bing / Google free endpoints with automatic fallback and rate limiting), Baidu, Aliyun, Tencent, iFlytek, Volcano Engine, Doubao, NiuTrans, DeepLX, Azure, Google, plus LLM services such as Ollama (local models), DeepSeek, Gemini, Qwen, SiliconFlow, Azure OpenAI, and [DeerAPI](https://api.deerapi.com/register?aff=QvHM)
- 20 translation services: built-in free translation (Bing / Google free endpoints with automatic fallback and rate limiting), Baidu, Aliyun, Tencent, iFlytek, Volcano Engine, Doubao, NiuTrans, DeepLX, Azure, Google, plus LLM services such as Ollama (local models), DeepSeek, Gemini, Qwen, SiliconFlow, Azure OpenAI, [OrcaRouter](https://www.orcarouter.ai), and [DeerAPI](https://api.deerapi.com/register?aff=QvHM)
- Compatible with any OpenAI-style API — bring your own endpoint
- Output translation only, or bilingual "original + translation" subtitles
- Per-service custom request parameters configured right in the UI, with import/export — no code changes
Expand Down
2 changes: 1 addition & 1 deletion README_JA.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

### 字幕翻訳

- 20 の翻訳サービス:内蔵の無料翻訳(Bing / Google 無料エンドポイント、自動フォールバックとレート制限付き)、百度、阿里云、騰訊、讯飞、火山エンジン、豆包、小牛、DeepLX、Azure、Google に加え、Ollama(ローカルモデル)、DeepSeek、Gemini、通義千問(Qwen)、SiliconFlow、Azure OpenAI、[DeerAPI](https://api.deerapi.com/register?aff=QvHM) などの LLM サービス
- 20 の翻訳サービス:内蔵の無料翻訳(Bing / Google 無料エンドポイント、自動フォールバックとレート制限付き)、百度、阿里云、騰訊、讯飞、火山エンジン、豆包、小牛、DeepLX、Azure、Google に加え、Ollama(ローカルモデル)、DeepSeek、Gemini、通義千問(Qwen)、SiliconFlow、Azure OpenAI、[OrcaRouter](https://www.orcarouter.ai)、[DeerAPI](https://api.deerapi.com/register?aff=QvHM) などの LLM サービス
- 任意の OpenAI スタイル API に対応——自前のエンドポイントも接続可能
- 翻訳のみ、または「原文 + 訳文」のバイリンガル字幕を出力
- 各 AI サービスのリクエストパラメータを UI から直接設定、インポート/エクスポート対応——コード変更不要
Expand Down
52 changes: 52 additions & 0 deletions docs/docs/guides/translation/orcarouter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
sidebar_position: 13
title: OrcaRouter(AI 翻译)
description: 妙幕 OrcaRouter 翻译配置指南:多模型 AI 网关,一个 API Key 接入多个模型,API 地址默认为 https://api.orcarouter.ai/v1。
keywords: [OrcaRouter 翻译, AI 网关, 字幕翻译, 大模型翻译, OpenAI 兼容]
---

# OrcaRouter(AI 翻译)

<ProviderMeta
website="https://www.orcarouter.ai/"
websiteLabel="OrcaRouter 官网"
credentials="API Key"
freeTier="有免费模型(orcarouter/free)"
pricing="按 token 计费,多模型统一定价"
bestFor="想用一个 Key 接入多种模型的用户——统一网关、一次配置多处可用"
/>

[OrcaRouter](https://www.orcarouter.ai) 是一个多模型 AI 网关:一个 API Key、一套 OpenAI 兼容端点,即可按需路由到多个大模型。它也以网关级别运行面向 AI agent 的零信任安全能力——在同一个端点上对每次提示/响应进行筛查、对每个工具调用做默认拒绝(default-deny)式的治理,无需改动任何应用代码。

## 申请步骤

1. 访问 [OrcaRouter 官网](https://www.orcarouter.ai) 注册
2. 在控制台创建 API Key(`sk-orca-` 开头,只显示一次)

## 在妙幕中配置

「翻译」页面选「OrcaRouter」:

| 字段 | 填写 |
| -------- | ----------------------------------------- |
| API 地址 | 默认 `https://api.orcarouter.ai/v1`,无需修改 |
| API Key | 上一步创建的密钥 |
| 模型名称 | 下拉选择,如 `orcarouter/auto`(自动路由)或 `orcarouter/fusion` |

点「**测试翻译**」验证后即可使用。OrcaRouter 端点还支持从 `/models` 自动拉取可用模型列表。

## 参数建议

- **批量翻译数量 / 批次并发数**:默认起步;量大提速可加大并发,注意平台限流
- **思考模式**:保持关闭(翻译无需深度推理,关闭更快更省)
- 支持[术语表](/advanced/glossary)、[自定义提示词](/advanced/custom-prompts)与回显对齐校验

## 常见问题

- **401 / 认证失败**:检查 API Key 是否以 `sk-orca-` 开头、控制台里是否有效
- **响应慢**:模型高峰负载波动,调低并发或错峰使用
- **译文错位**:开启「回显对齐校验」,v3.5 的对齐防护会自动修复大多数错位

---

> 信息更新于 2026-08,价格以 [OrcaRouter 官网](https://www.orcarouter.ai) 为准。
2 changes: 1 addition & 1 deletion docs/docs/guides/translation/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ keywords:
| 类别 | 服务 | 免费情况 | 质量特点 |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | -------------------------------- |
| **免费起步** | [内置免费翻译](./free)、[Ollama 本地模型](./ollama)、[DeepLX](./deeplx)、[谷歌翻译](./google) | 免费为主 | 日常够用,零或低成本 |
| **AI 翻译** | [DeepSeek](./deepseek)、[Gemini](./gemini)、[通义千问](./qwen)、[硅基流动](./siliconflow)、[DeerAPI](./deerapi)、[Azure OpenAI](./azure-openai)、[自定义 OpenAI 兼容](./openai-compatible) | 部分有免费额度 | 语义准确、可调提示词、支持术语表 |
| **AI 翻译** | [DeepSeek](./deepseek)、[Gemini](./gemini)、[通义千问](./qwen)、[硅基流动](./siliconflow)、[DeerAPI](./deerapi)、[Azure OpenAI](./azure-openai)、[OrcaRouter](./orcarouter)、[自定义 OpenAI 兼容](./openai-compatible) | 部分有免费额度 | 语义准确、可调提示词、支持术语表 |
| **传统机翻** | [百度](./baidu)、[阿里云](./aliyun)、[火山](./volcengine)、[豆包](./doubao)、[小牛](./niutrans)、[腾讯](./tencent)、[讯飞](./xunfei)、[微软](./azure) | 多家有月度免费字符量 | 稳定快速、按量计费,适合大批量 |

## 按需求推荐
Expand Down
3 changes: 2 additions & 1 deletion main/helpers/providerManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import { logMessage } from './logger';
// v21:默认提示词升级为 src/tr 回显协议 + echoAnchoring 字段默认开启(openspec: ai-translation-alignment)
// v22:思考模式开关 enableThinking 默认关闭(= 主动禁用思考,openspec: ai-thinking-mode-control)
// v23:新增独立的 Qwen-MT 机器翻译服务商
const CURRENT_PROVIDER_VERSION = 23;
// v24:新增 OrcaRouter 内置 AI 翻译服务商
const CURRENT_PROVIDER_VERSION = 24;

const FREE_PROVIDER_IDS = ['autoFree', 'bingFree', 'googleFree'];

Expand Down
1 change: 1 addition & 0 deletions main/translate/services/translationProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export const TRANSLATOR_MAP = {
Gemini: openaiTranslator,
qwen: openaiTranslator,
siliconflow: openaiTranslator,
orcarouter: openaiTranslator,
google: googleTranslator,
bingFree: bingFreeTranslator,
googleFree: googleFreeTranslator,
Expand Down
3 changes: 3 additions & 0 deletions renderer/components/ProviderForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ export const ProviderForm: React.FC<ProviderFormProps> = ({
'THUDM/glm-4-9b-chat',
],
},
orcarouter: {
fallbackModels: ['orcarouter/auto', 'orcarouter/fusion'],
},
qwen: {
fallbackModels: ['qwen-turbo', 'qwen-plus', 'qwen-max'],
},
Expand Down
3 changes: 3 additions & 0 deletions renderer/public/locales/en/translateControl.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
"geminiApiKeyTips": "Gemini API Key — create for free in <a href='https://aistudio.google.com/apikey' style='color: blue'>Google AI Studio</a>.",
"siliconflowApiUrlTips": "SiliconFlow API URL, default https://api.siliconflow.cn/v1. Register at the <a href='https://cloud.siliconflow.cn/' style='color: blue'>SiliconFlow Cloud</a>.",
"siliconflowApiKeyTips": "SiliconFlow API Key — create in <a href='https://cloud.siliconflow.cn/account/ak' style='color: blue'>API Key Management</a>.",
"orcarouterApiUrlTips": "OrcaRouter API URL, default https://api.orcarouter.ai/v1. OrcaRouter is a multi-model AI gateway, see https://www.orcarouter.ai.",
"orcarouterApiKeyTips": "OrcaRouter API Key (sk-orca- prefixed) — create it in the <a href='https://www.orcarouter.ai' style='color: blue'>OrcaRouter</a> dashboard.",
"qwenApiUrlTips": "Qwen OpenAI-compatible endpoint — DashScope default URL, usually no change needed.",
"qwenMtApiUrlTips": "Dedicated Qwen-MT OpenAI-compatible endpoint. Each request sends one user message and specifies languages and terms through translation_options.",
"qwenApiKeyTips": "DashScope API Key — get one from the <a href='https://dashscope.console.aliyun.com/apiKey' style='color: blue'>Bailian Console</a>.",
Expand Down Expand Up @@ -177,6 +179,7 @@
"phDeerApiKey": "sk-...",
"phGeminiApiKey": "AIzaSy...",
"phSiliconflowApiKey": "sk-...",
"phOrcarouterApiKey": "sk-orca-...",
"phQwenApiKey": "sk-...",
"phOpenaiApiUrl": "https://api.openai.com/v1",
"phOpenaiApiKey": "sk-...",
Expand Down
3 changes: 3 additions & 0 deletions renderer/public/locales/zh/translateControl.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
"geminiApiKeyTips": "Gemini API Key,可在 <a href='https://aistudio.google.com/apikey' style='color: blue'>Google AI Studio</a> 免费创建。",
"siliconflowApiUrlTips": "SiliconFlow API 地址,默认为 https://api.siliconflow.cn/v1。注册请前往 <a href='https://cloud.siliconflow.cn/' style='color: blue'>SiliconFlow 云平台</a>。",
"siliconflowApiKeyTips": "SiliconFlow API Key,可在 <a href='https://cloud.siliconflow.cn/account/ak' style='color: blue'>API 密钥管理</a> 创建。",
"orcarouterApiUrlTips": "OrcaRouter API 地址,默认为 https://api.orcarouter.ai/v1。OrcaRouter 是多模型 AI 网关,官网 https://www.orcarouter.ai 。",
"orcarouterApiKeyTips": "OrcaRouter API Key(sk-orca- 开头),可在 <a href='https://www.orcarouter.ai' style='color: blue'>OrcaRouter 官网</a> 控制台创建。",
"qwenApiUrlTips": "通义千问 OpenAI 兼容端点,默认为 DashScope 地址,一般无需修改。",
"qwenMtApiUrlTips": "Qwen-MT 专用 OpenAI 兼容端点,默认为 DashScope 地址。请求仅发送一条用户消息,并通过 translation_options 指定语种与术语。",
"qwenApiKeyTips": "DashScope API Key,可在 <a href='https://dashscope.console.aliyun.com/apiKey' style='color: blue'>百炼控制台</a> 获取。",
Expand Down Expand Up @@ -177,6 +179,7 @@
"phDeerApiKey": "sk-...",
"phGeminiApiKey": "AIzaSy...",
"phSiliconflowApiKey": "sk-...",
"phOrcarouterApiKey": "sk-orca-...",
"phQwenApiKey": "sk-...",
"phOpenaiApiUrl": "https://api.openai.com/v1",
"phOpenaiApiKey": "sk-...",
Expand Down
36 changes: 36 additions & 0 deletions types/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,42 @@ export const PROVIDER_TYPES: ProviderType[] = [
...aiCommonFields(),
],
},
{
id: 'orcarouter',
name: 'OrcaRouter',
isBuiltin: true,
isAi: true,
group: 'ai',
icon: '🐋',
fields: [
{
key: 'apiUrl',
label: 'Base url',
type: 'url',
required: true,
placeholder: 'https://api.orcarouter.ai/v1',
defaultValue: 'https://api.orcarouter.ai/v1',
tips: 'orcarouterApiUrlTips',
},
{
key: 'apiKey',
label: 'API Key',
type: 'password',
required: true,
tips: 'orcarouterApiKeyTips',
placeholder: 'phOrcarouterApiKey',
},
{
key: 'modelName',
label: 'modelName',
type: 'select',
required: true,
placeholder: 'selectModel',
options: [],
},
...aiCommonFields(),
],
},
{
id: 'qwenMt',
name: 'Qwen-MT',
Expand Down