mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-02 02:09:03 +08:00
✨ feat: add anthropicApiHost to CherryAI and New-API providers
This commit is contained in:
parent
998e54246f
commit
65ac3181a8
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user