From 65ac3181a8a39a908e83638e437e169481020c52 Mon Sep 17 00:00:00 2001 From: Vaayne Date: Tue, 30 Sep 2025 18:25:51 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat:=20add=20anthropicApiHost=20to?= =?UTF-8?q?=20CherryAI=20and=20New-API=20providers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderer/src/config/providers.ts | 2 ++ src/renderer/src/store/index.ts | 2 +- src/renderer/src/store/migrate.ts | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/config/providers.ts b/src/renderer/src/config/providers.ts index 48d657b02b..6d447f60fa 100644 --- a/src/renderer/src/config/providers.ts +++ b/src/renderer/src/config/providers.ts @@ -75,6 +75,7 @@ export const CHERRYAI_PROVIDER: SystemProvider = { type: 'openai', apiKey: '', apiHost: 'https://api.cherry-ai.com/', + anthropicApiHost: 'https://api.cherry-ai.com', models: [glm45FlashModel, qwen38bModel], isSystem: true, enabled: true @@ -291,6 +292,7 @@ export const SYSTEM_PROVIDERS_CONFIG: Record = type: 'openai', apiKey: '', apiHost: 'http://localhost:3000', + anthropicApiHost: 'http://localhost:3000', models: SYSTEM_MODELS['new-api'], isSystem: true, enabled: false diff --git a/src/renderer/src/store/index.ts b/src/renderer/src/store/index.ts index 201108a7f3..f3f0fa3dda 100644 --- a/src/renderer/src/store/index.ts +++ b/src/renderer/src/store/index.ts @@ -65,7 +65,7 @@ const persistedReducer = persistReducer( { key: 'cherry-studio', storage, - version: 159, + version: 160, blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs'], migrate }, diff --git a/src/renderer/src/store/migrate.ts b/src/renderer/src/store/migrate.ts index 5420db1245..5fdfdd0990 100644 --- a/src/renderer/src/store/migrate.ts +++ b/src/renderer/src/store/migrate.ts @@ -2629,6 +2629,12 @@ const migrateConfig = { case 'aihubmix': provider.anthropicApiHost = 'https://aihubmix.com' break + case 'new-api': + provider.anthropicApiHost = 'http://localhost:3000' + break + case 'cherryai': + provider.anthropicApiHost = 'https://api.cherry-ai.com' + break } }) return state