From 902dc88251e0da55c753320c5cadbb86adf117f4 Mon Sep 17 00:00:00 2001 From: HzTTT <91888789+HzTTT@users.noreply.github.com> Date: Thu, 12 Jun 2025 12:02:03 +0800 Subject: [PATCH] feat:add cephalon provider (#7050) * feat: add Cephalon provider and related assets * add Cephalon logo image * update models to include Cephalon's DeepSeek-R1 * add Cephalon provider configuration and API details * include Cephalon translations in multiple languages * update store to initialize Cephalon as a provider * increment version for migration * feat: update Cephalon provider configuration and assets * add Cephalon logo image * enable Cephalon provider in the store * remove previous disabled configuration for Cephalon * fix: update Cephalon provider model URL * fix: update official website URL for Cephalon provider --- .../src/assets/images/providers/cephalon.jpeg | Bin 0 -> 5997 bytes src/renderer/src/config/models.ts | 8 ++++++++ src/renderer/src/config/providers.ts | 15 ++++++++++++++- src/renderer/src/i18n/locales/en-us.json | 1 + src/renderer/src/i18n/locales/ru-ru.json | 1 + src/renderer/src/i18n/locales/zh-cn.json | 1 + src/renderer/src/i18n/locales/zh-tw.json | 1 + src/renderer/src/i18n/translate/el-gr.json | 1 + src/renderer/src/i18n/translate/es-es.json | 1 + src/renderer/src/i18n/translate/fr-fr.json | 1 + src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/llm.ts | 10 ++++++++++ src/renderer/src/store/migrate.ts | 8 ++++++++ 13 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 src/renderer/src/assets/images/providers/cephalon.jpeg diff --git a/src/renderer/src/assets/images/providers/cephalon.jpeg b/src/renderer/src/assets/images/providers/cephalon.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..8615e1c80d51510dd9ec87cb4f37de69248debe5 GIT binary patch literal 5997 zcmeHL*IQG~w}u$LUjUWfrAY^AQY^HHbft*_3|)E?L3$4&y-Al)A}DAQAatZx5s;>a zE+9pElPdKL7w0+uz&TgvyO?M1J$u&7tTk)B?^+YBr=xy_f|Y`Vgyf2*hRP!n64IoL z27`bes-JJs;6eK0k-9QTN&mHF@S$RBtZApMO(G25VI-uHjwH~FA)v8>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/models.ts b/src/renderer/src/config/models.ts index 07581eadb3..9d776a7df2 100644 --- a/src/renderer/src/config/models.ts +++ b/src/renderer/src/config/models.ts @@ -2082,6 +2082,14 @@ export const SYSTEM_MODELS: Record = { name: 'Qwen Plus', group: 'Qwen' } + ], + cephalon: [ + { + id: 'DeepSeek-R1', + provider: 'cephalon', + name: 'DeepSeek-R1满血版', + group: 'DeepSeek' + } ] } diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index c83522f358..0ae4f1a458 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -44,6 +44,7 @@ import VoyageAIProviderLogo from '@renderer/assets/images/providers/voyageai.png import XirangProviderLogo from '@renderer/assets/images/providers/xirang.png' import ZeroOneProviderLogo from '@renderer/assets/images/providers/zero-one.png' import ZhipuProviderLogo from '@renderer/assets/images/providers/zhipu.png' +import CephalonProviderLogo from '@renderer/assets/images/providers/cephalon.jpeg' import { TOKENFLUX_HOST } from './constant' @@ -94,7 +95,8 @@ const PROVIDER_LOGO_MAP = { alayanew: AlayaNewProviderLogo, voyageai: VoyageAIProviderLogo, qiniu: QiniuProviderLogo, - tokenflux: TokenFluxProviderLogo + tokenflux: TokenFluxProviderLogo, + cephalon: CephalonProviderLogo } as const export function getProviderLogo(providerId: string) { @@ -612,5 +614,16 @@ export const PROVIDER_CONFIG = { docs: `${TOKENFLUX_HOST}/docs`, models: `${TOKENFLUX_HOST}/models` } + }, + cephalon: { + api: { + url: 'https://cephalon.cloud/user-center/v1/model' + }, + websites: { + official: 'https://cephalon.cloud/share/register-landing?invite_id=jSdOYA', + apiKey: 'https://cephalon.cloud/api', + docs: 'https://cephalon.cloud/apitoken/1864244127731589124', + models: 'https://cephalon.cloud/model' + } } } diff --git a/src/renderer/src/i18n/locales/en-us.json b/src/renderer/src/i18n/locales/en-us.json index 1444fdc98e..e493e3d96b 100644 --- a/src/renderer/src/i18n/locales/en-us.json +++ b/src/renderer/src/i18n/locales/en-us.json @@ -978,6 +978,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "Baichuan", "baidu-cloud": "Baidu Cloud", + "cephalon": "Cephalon", "copilot": "GitHub Copilot", "dashscope": "Alibaba Cloud", "deepseek": "DeepSeek", diff --git a/src/renderer/src/i18n/locales/ru-ru.json b/src/renderer/src/i18n/locales/ru-ru.json index 1fe3784ed0..c242b8d552 100644 --- a/src/renderer/src/i18n/locales/ru-ru.json +++ b/src/renderer/src/i18n/locales/ru-ru.json @@ -977,6 +977,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "Baichuan", "baidu-cloud": "Baidu Cloud", + "cephalon": "Cephalon", "copilot": "GitHub Copilot", "dashscope": "Alibaba Cloud", "deepseek": "DeepSeek", diff --git a/src/renderer/src/i18n/locales/zh-cn.json b/src/renderer/src/i18n/locales/zh-cn.json index 612f2e5e33..284666183a 100644 --- a/src/renderer/src/i18n/locales/zh-cn.json +++ b/src/renderer/src/i18n/locales/zh-cn.json @@ -978,6 +978,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "百川", "baidu-cloud": "百度云千帆", + "cephalon": "Cephalon", "copilot": "GitHub Copilot", "dashscope": "阿里云百炼", "deepseek": "深度求索", diff --git a/src/renderer/src/i18n/locales/zh-tw.json b/src/renderer/src/i18n/locales/zh-tw.json index 5766110330..6b493a46b8 100644 --- a/src/renderer/src/i18n/locales/zh-tw.json +++ b/src/renderer/src/i18n/locales/zh-tw.json @@ -978,6 +978,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "百川", "baidu-cloud": "百度雲千帆", + "cephalon": "Cephalon", "copilot": "GitHub Copilot", "dashscope": "阿里雲百鍊", "deepseek": "深度求索", diff --git a/src/renderer/src/i18n/translate/el-gr.json b/src/renderer/src/i18n/translate/el-gr.json index a5712ef2cd..7d60a58e3f 100644 --- a/src/renderer/src/i18n/translate/el-gr.json +++ b/src/renderer/src/i18n/translate/el-gr.json @@ -840,6 +840,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "Παράκειμαι", "baidu-cloud": "Baidu Cloud Qianfan", + "cephalon": "Cephalon", "copilot": "GitHub Copilot", "dashscope": "AliCloud Bailian", "deepseek": "Βαθιά Αναζήτηση", diff --git a/src/renderer/src/i18n/translate/es-es.json b/src/renderer/src/i18n/translate/es-es.json index 65bbfb94cd..b3083a93ba 100644 --- a/src/renderer/src/i18n/translate/es-es.json +++ b/src/renderer/src/i18n/translate/es-es.json @@ -841,6 +841,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "BaiChuan", "baidu-cloud": "Baidu Nube Qiánfān", + "cephalon": "Cephalon", "copilot": "GitHub Copiloto", "dashscope": "Álibaba Nube BaiLiàn", "deepseek": "Profundo Buscar", diff --git a/src/renderer/src/i18n/translate/fr-fr.json b/src/renderer/src/i18n/translate/fr-fr.json index 37b65001ec..0718050d06 100644 --- a/src/renderer/src/i18n/translate/fr-fr.json +++ b/src/renderer/src/i18n/translate/fr-fr.json @@ -840,6 +840,7 @@ "azure-openai": "Azure OpenAI", "baichuan": "BaiChuan", "baidu-cloud": "Baidu Cloud Qianfan", + "cephalon": "Cephalon", "copilot": "GitHub Copilote", "dashscope": "AliCloud BaiLian", "deepseek": "DeepSeek", diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index d0ded856a0..62c22b4a1e 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -50,7 +50,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 111, + version: 112, blacklist: ['runtime', 'messages', 'messageBlocks'], migrate }, diff --git a/src/renderer/src/store/llm.ts b/src/renderer/src/store/llm.ts index d5c8fd566d..a88737965f 100644 --- a/src/renderer/src/store/llm.ts +++ b/src/renderer/src/store/llm.ts @@ -26,6 +26,16 @@ export interface LlmState { } export const INITIAL_PROVIDERS: Provider[] = [ + { + id: 'cephalon', + name: 'Cephalon', + type: 'openai', + apiKey: '', + apiHost: 'https://cephalon.cloud/user-center/v1/model', + models: SYSTEM_MODELS.cephalon, + isSystem: true, + enabled: true + }, { id: 'silicon', name: 'Silicon', diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 8b3eca9195..f5f54c6b9c 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -1554,6 +1554,14 @@ const migrateConfig = { // add selection_assistant_toggle and selection_assistant_select_text shortcuts after mini_window addShortcuts(state, ['selection_assistant_toggle', 'selection_assistant_select_text'], 'mini_window') + return state + } catch (error) { + return state + } + }, + '112': (state: RootState) => { + try { + addProvider(state, 'cephalon') return state } catch (error) { return state