From 6ad26db45cbe59ceb356bbb0c5459c0fd5162408 Mon Sep 17 00:00:00 2001 From: Card Cunningham Date: Sun, 19 Jul 2026 19:46:39 +0800 Subject: [PATCH] feat(provider): add Routerra OpenAI-compatible provider preset Implements #1911. Adds routerra to DEFAULT_PROVIDERS (openai-completions, disabled by default), registers Routerra's brand logo in modelIconRegistry, and relies on the existing generic provider/install deeplink flow (no provider-specific code). Provider name comes from defaults.ts, so no i18n key is needed. The icon is Routerra's own brand mark (routerra.svg), declared as the site logo in the provider's public /api/status config; it is intentionally NOT the default New API gateway image that routerra.ai/logo.png serves. Uses the issue body's base URL https://routerra.ai/v1; the thread's api.routerra.ai/v1 variant fails TLS from our network, flagged in the PR for maintainer confirmation. --- src/main/provider/defaults.ts | 15 +++++++++++++++ src/renderer/src/assets/llm-icons/routerra.svg | 1 + .../src/components/icons/modelIconRegistry.ts | 2 ++ 3 files changed, 18 insertions(+) create mode 100644 src/renderer/src/assets/llm-icons/routerra.svg diff --git a/src/main/provider/defaults.ts b/src/main/provider/defaults.ts index a33e46f6fc..7154955a9a 100644 --- a/src/main/provider/defaults.ts +++ b/src/main/provider/defaults.ts @@ -369,6 +369,21 @@ export const DEFAULT_PROVIDERS: LLM_PROVIDER_BASE[] = [ defaultBaseUrl: 'https://opencode.ai/zen/go/v1' } }, + { + id: 'routerra', + name: 'Routerra', + apiType: 'openai-completions', + apiKey: '', + baseUrl: 'https://routerra.ai/v1', + enable: false, + websites: { + official: 'https://routerra.ai/', + apiKey: 'https://routerra.ai/', + docs: '', + models: 'https://routerra.ai/v1/models', + defaultBaseUrl: 'https://routerra.ai/v1' + } + }, { id: 'poe', name: 'Poe', diff --git a/src/renderer/src/assets/llm-icons/routerra.svg b/src/renderer/src/assets/llm-icons/routerra.svg new file mode 100644 index 0000000000..26aa62a020 --- /dev/null +++ b/src/renderer/src/assets/llm-icons/routerra.svg @@ -0,0 +1 @@ + diff --git a/src/renderer/src/components/icons/modelIconRegistry.ts b/src/renderer/src/components/icons/modelIconRegistry.ts index afb7969166..f6cf68d02a 100644 --- a/src/renderer/src/components/icons/modelIconRegistry.ts +++ b/src/renderer/src/components/icons/modelIconRegistry.ts @@ -49,6 +49,7 @@ import daoxeColorIcon from '@/assets/llm-icons/daoxe.png?url' import kimiColorIcon from '@/assets/llm-icons/kimi-color.svg?url' import moonshotColorIcon from '@/assets/llm-icons/moonshot.svg?url' import openrouterColorIcon from '@/assets/llm-icons/openrouter.svg?url' +import routerraColorIcon from '@/assets/llm-icons/routerra.svg?url' import poeColorIcon from '@/assets/llm-icons/poe-color.svg?url' import geminiColorIcon from '@/assets/llm-icons/gemini-color.svg?url' import githubColorIcon from '@/assets/llm-icons/github.svg?url' @@ -156,6 +157,7 @@ export const modelIcons = { qwen: qwenColorIcon, moonshot: moonshotColorIcon, openrouter: openrouterColorIcon, + routerra: routerraColorIcon, poe: poeColorIcon, gemini: geminiColorIcon, github: githubColorIcon,