✨ feat: add anthropicApiHost to CherryAI and New-API providers
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -65,7 +65,7 @@ const persistedReducer = persistReducer(
|
||||
{
|
||||
key: 'cherry-studio',
|
||||
storage,
|
||||
version: 159,
|
||||
version: 160,
|
||||
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs'],
|
||||
migrate
|
||||
},
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user