From effb931a1bb3b61413128f35a25bdd6e4a109459 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 7 Jan 2026 23:01:49 +0800 Subject: [PATCH] feat(presets): add Cubence as partner provider - Add Cubence provider presets for Claude, Codex, and Gemini - Add Cubence icon to icon system - Add partner promotion text in zh/en/ja --- src/config/claudeProviderPresets.ts | 22 +++++++++++++ src/config/codexProviderPresets.ts | 36 +++++++++++++++++++++ src/config/geminiProviderPresets.ts | 50 ++++++++++++++++++++++++++--- src/i18n/locales/en.json | 3 +- src/i18n/locales/ja.json | 3 +- src/i18n/locales/zh.json | 3 +- src/icons/extracted/cubence.svg | 9 ++++++ src/icons/extracted/index.ts | 1 + src/icons/extracted/metadata.ts | 7 ++++ 9 files changed, 127 insertions(+), 7 deletions(-) create mode 100644 src/icons/extracted/cubence.svg diff --git a/src/config/claudeProviderPresets.ts b/src/config/claudeProviderPresets.ts index cea4196bd..c77d082bc 100644 --- a/src/config/claudeProviderPresets.ts +++ b/src/config/claudeProviderPresets.ts @@ -372,6 +372,28 @@ export const providerPresets: ProviderPreset[] = [ partnerPromotionKey: "packycode", // 促销信息 i18n key icon: "packycode", }, + { + name: "Cubence", + websiteUrl: "https://cubence.com", + apiKeyUrl: "https://cubence.com/signup?code=CCSWITCH&source=ccs", + settingsConfig: { + env: { + ANTHROPIC_BASE_URL: "https://api.cubence.com", + ANTHROPIC_AUTH_TOKEN: "", + }, + }, + endpointCandidates: [ + "https://api.cubence.com", + "https://api-cf.cubence.com", + "https://api-dmit.cubence.com", + "https://api-bwg.cubence.com", + ], + category: "third_party", + isPartner: true, // 合作伙伴 + partnerPromotionKey: "cubence", // 促销信息 i18n key + icon: "cubence", + iconColor: "#000000", + }, { name: "OpenRouter", websiteUrl: "https://openrouter.ai", diff --git a/src/config/codexProviderPresets.ts b/src/config/codexProviderPresets.ts index 18663fe57..189a1b672 100644 --- a/src/config/codexProviderPresets.ts +++ b/src/config/codexProviderPresets.ts @@ -153,4 +153,40 @@ requires_openai_auth = true`, partnerPromotionKey: "packycode", // 促销信息 i18n key icon: "packycode", }, + { + name: "Cubence", + websiteUrl: "https://cubence.com", + apiKeyUrl: "https://cubence.com/signup?code=CCSWITCH&source=ccs", + auth: generateThirdPartyAuth(""), + config: generateThirdPartyConfig( + "cubence", + "https://api.cubence.com/v1", + "gpt-5.2", + ), + endpointCandidates: [ + "https://api.cubence.com/v1", + "https://api-cf.cubence.com/v1", + "https://api-dmit.cubence.com/v1", + "https://api-bwg.cubence.com/v1", + ], + category: "third_party", + isPartner: true, // 合作伙伴 + partnerPromotionKey: "cubence", // 促销信息 i18n key + icon: "cubence", + iconColor: "#000000", + }, + { + name: "OpenRouter", + websiteUrl: "https://openrouter.ai", + apiKeyUrl: "https://openrouter.ai/keys", + auth: generateThirdPartyAuth(""), + config: generateThirdPartyConfig( + "openrouter", + "https://openrouter.ai/api/v1", + "gpt-5.2", + ), + category: "aggregator", + icon: "openrouter", + iconColor: "#6566F1", + }, ]; diff --git a/src/config/geminiProviderPresets.ts b/src/config/geminiProviderPresets.ts index b08e91a4a..5bd6d2b3d 100644 --- a/src/config/geminiProviderPresets.ts +++ b/src/config/geminiProviderPresets.ts @@ -56,11 +56,11 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [ settingsConfig: { env: { GOOGLE_GEMINI_BASE_URL: "https://www.packyapi.com", - GEMINI_MODEL: "gemini-3-pro-preview", + GEMINI_MODEL: "gemini-3-pro", }, }, baseURL: "https://www.packyapi.com", - model: "gemini-3-pro-preview", + model: "gemini-3-pro", description: "PackyCode", category: "third_party", isPartner: true, @@ -71,16 +71,58 @@ export const geminiProviderPresets: GeminiProviderPreset[] = [ ], icon: "packycode", }, + { + name: "Cubence", + websiteUrl: "https://cubence.com", + apiKeyUrl: "https://cubence.com/signup?code=CCSWITCH&source=ccs", + settingsConfig: { + env: { + GOOGLE_GEMINI_BASE_URL: "https://api.cubence.com", + GEMINI_MODEL: "gemini-3-pro", + }, + }, + baseURL: "https://api.cubence.com", + model: "gemini-3-pro", + description: "Cubence", + category: "third_party", + isPartner: true, + partnerPromotionKey: "cubence", + endpointCandidates: [ + "https://api.cubence.com/v1", + "https://api-cf.cubence.com/v1", + "https://api-dmit.cubence.com/v1", + "https://api-bwg.cubence.com/v1", + ], + icon: "cubence", + iconColor: "#000000", + }, + { + name: "OpenRouter", + websiteUrl: "https://openrouter.ai", + apiKeyUrl: "https://openrouter.ai/keys", + settingsConfig: { + env: { + GOOGLE_GEMINI_BASE_URL: "https://openrouter.ai/api", + GEMINI_MODEL: "gemini-3-pro-preview", + }, + }, + baseURL: "https://openrouter.ai/api", + model: "gemini-3-pro", + description: "OpenRouter", + category: "aggregator", + icon: "openrouter", + iconColor: "#6566F1", + }, { name: "自定义", websiteUrl: "", settingsConfig: { env: { GOOGLE_GEMINI_BASE_URL: "", - GEMINI_MODEL: "gemini-3-pro-preview", + GEMINI_MODEL: "gemini-3-pro", }, }, - model: "gemini-3-pro-preview", + model: "gemini-3-pro", description: "自定义 Gemini API 端点", category: "custom", }, diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 434d76e95..ef413521c 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -323,7 +323,8 @@ "packycode": "PackyCode is an official partner of CC Switch. Register using this link and enter \"cc-switch\" promo code during recharge to get 10% off", "minimax_cn": "MiniMax Coding Plan Special Offer, Starter from ¥9.9", "minimax_en": "MiniMax Coding Plan Black Friday, Starter is now $2/mo (80% OFF!)", - "dmxapi": "Claude Code exclusive model 66% OFF now!" + "dmxapi": "Claude Code exclusive model 66% OFF now!", + "cubence": "Cubence is an official partner of CC Switch. Register using this link and enter \"CCSWITCH\" promo code during recharge to get 10% off every top-up" }, "parameterConfig": "Parameter Config - {{name}} *", "mainModel": "Main Model (optional)", diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index bb699c7cd..f5af02997 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -323,7 +323,8 @@ "packycode": "PackyCode は CC Switch の公式パートナーです。登録後チャージ時に \"cc-switch\" を入力すると 10% オフ", "minimax_cn": "MiniMax Coding Plan 特別価格、Starter ¥9.9 から", "minimax_en": "MiniMax Coding Plan Black Friday、Starter が月額 $2(80% OFF)", - "dmxapi": "Claude Code 専用モデル 66% OFF 実施中!" + "dmxapi": "Claude Code 専用モデル 66% OFF 実施中!", + "cubence": "Cubence は CC Switch の公式パートナーです。登録後チャージ時に \"CCSWITCH\" を入力すると、毎回 10% オフ" }, "parameterConfig": "パラメーター設定 - {{name}} *", "mainModel": "メインモデル(任意)", diff --git a/src/i18n/locales/zh.json b/src/i18n/locales/zh.json index 32f2e6178..690e62482 100644 --- a/src/i18n/locales/zh.json +++ b/src/i18n/locales/zh.json @@ -323,7 +323,8 @@ "packycode": "PackyCode 是 CC Switch 的官方合作伙伴,使用此链接注册并在充值时填写 \"cc-switch\" 优惠码,可以享受9折优惠", "minimax_cn": "MiniMax Coding Plan 特惠,Starter 套餐 9.9 元起", "minimax_en": "MiniMax Coding Plan 黑五特惠,Starter 套餐现仅 $2/月(2折优惠!)", - "dmxapi": "Claude Code 专属模型 3.4 折优惠进行中!" + "dmxapi": "Claude Code 专属模型 3.4 折优惠进行中!", + "cubence": "Cubence 是 CC Switch 的官方合作伙伴,使用此链接注册并在充值时填写 \"CCSWITCH\" 优惠码,每次充值均可享受9折优惠" }, "parameterConfig": "参数配置 - {{name}} *", "mainModel": "主模型 (可选)", diff --git a/src/icons/extracted/cubence.svg b/src/icons/extracted/cubence.svg new file mode 100644 index 000000000..ee967d335 --- /dev/null +++ b/src/icons/extracted/cubence.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/src/icons/extracted/index.ts b/src/icons/extracted/index.ts index 4ae7755bc..f0d087e7f 100644 --- a/src/icons/extracted/index.ts +++ b/src/icons/extracted/index.ts @@ -13,6 +13,7 @@ export const icons: Record = { cloudflare: `Cloudflare`, cohere: `Cohere`, copilot: `Copilot`, + cubence: `Cubence`, deepseek: `DeepSeek`, doubao: `Doubao`, gemini: `Gemini`, diff --git a/src/icons/extracted/metadata.ts b/src/icons/extracted/metadata.ts index 61390476a..d6feed213 100644 --- a/src/icons/extracted/metadata.ts +++ b/src/icons/extracted/metadata.ts @@ -79,6 +79,13 @@ export const iconMetadata: Record = { keywords: [], defaultColor: "currentColor", }, + cubence: { + name: "cubence", + displayName: "Cubence", + category: "ai-provider", + keywords: ["cubence", "api", "relay"], + defaultColor: "#4B5563", + }, deepseek: { name: "deepseek", displayName: "DeepSeek",