feat: add anthropicApiHost to CherryAI and New-API providers

This commit is contained in:
Vaayne 2025-09-30 18:25:51 +08:00
parent 998e54246f
commit 65ac3181a8
3 changed files with 9 additions and 1 deletions

View File

@ -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<SystemProviderId, SystemProvider> =
type: 'openai',
apiKey: '',
apiHost: 'http://localhost:3000',
anthropicApiHost: 'http://localhost:3000',
models: SYSTEM_MODELS['new-api'],
isSystem: true,
enabled: false

View File

@ -65,7 +65,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 159,
version: 160,
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs'],
migrate
},

View File

@ -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