mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-22 00:13:09 +08:00
chore: remove cherryin provider references and update versioning
- Commented out all references to the 'cherryin' provider in configuration files. - Updated the version in the persisted reducer from 157 to 158. - Added migration logic to remove 'cherryin' from the state during version 158 migration.
This commit is contained in:
parent
d41e239b89
commit
3b7ab2aec8
@ -25,7 +25,7 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
|
|||||||
// Default quick assistant model
|
// Default quick assistant model
|
||||||
glm45FlashModel
|
glm45FlashModel
|
||||||
],
|
],
|
||||||
cherryin: [],
|
// cherryin: [],
|
||||||
vertexai: [],
|
vertexai: [],
|
||||||
'302ai': [
|
'302ai': [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -78,16 +78,16 @@ export const CHERRYAI_PROVIDER: SystemProvider = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const SYSTEM_PROVIDERS_CONFIG: Record<SystemProviderId, SystemProvider> = {
|
export const SYSTEM_PROVIDERS_CONFIG: Record<SystemProviderId, SystemProvider> = {
|
||||||
cherryin: {
|
// cherryin: {
|
||||||
id: 'cherryin',
|
// id: 'cherryin',
|
||||||
name: 'CherryIN',
|
// name: 'CherryIN',
|
||||||
type: 'openai',
|
// type: 'openai',
|
||||||
apiKey: '',
|
// apiKey: '',
|
||||||
apiHost: 'https://open.cherryin.ai',
|
// apiHost: 'https://open.cherryin.ai',
|
||||||
models: [],
|
// models: [],
|
||||||
isSystem: true,
|
// isSystem: true,
|
||||||
enabled: true
|
// enabled: true
|
||||||
},
|
// },
|
||||||
silicon: {
|
silicon: {
|
||||||
id: 'silicon',
|
id: 'silicon',
|
||||||
name: 'Silicon',
|
name: 'Silicon',
|
||||||
@ -708,17 +708,17 @@ type ProviderUrls = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const PROVIDER_URLS: Record<SystemProviderId, ProviderUrls> = {
|
export const PROVIDER_URLS: Record<SystemProviderId, ProviderUrls> = {
|
||||||
cherryin: {
|
// cherryin: {
|
||||||
api: {
|
// api: {
|
||||||
url: 'https://open.cherryin.ai'
|
// url: 'https://open.cherryin.ai'
|
||||||
},
|
// },
|
||||||
websites: {
|
// websites: {
|
||||||
official: 'https://open.cherryin.ai',
|
// official: 'https://open.cherryin.ai',
|
||||||
apiKey: 'https://open.cherryin.ai/console/token',
|
// apiKey: 'https://open.cherryin.ai/console/token',
|
||||||
docs: 'https://open.cherryin.ai',
|
// docs: 'https://open.cherryin.ai',
|
||||||
models: 'https://open.cherryin.ai/pricing'
|
// models: 'https://open.cherryin.ai/pricing'
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
ph8: {
|
ph8: {
|
||||||
api: {
|
api: {
|
||||||
url: 'https://ph8.co'
|
url: 'https://ph8.co'
|
||||||
|
|||||||
@ -67,7 +67,7 @@ const persistedReducer = persistReducer(
|
|||||||
{
|
{
|
||||||
key: 'cherry-studio',
|
key: 'cherry-studio',
|
||||||
storage,
|
storage,
|
||||||
version: 157,
|
version: 158,
|
||||||
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs'],
|
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs'],
|
||||||
migrate
|
migrate
|
||||||
},
|
},
|
||||||
|
|||||||
@ -2539,6 +2539,15 @@ const migrateConfig = {
|
|||||||
logger.error('migrate 157 error', error as Error)
|
logger.error('migrate 157 error', error as Error)
|
||||||
return state
|
return state
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
'158': (state: RootState) => {
|
||||||
|
try {
|
||||||
|
state.llm.providers = state.llm.providers.filter((provider) => provider.id !== 'cherryin')
|
||||||
|
return state
|
||||||
|
} catch (error) {
|
||||||
|
logger.error('migrate 158 error', error as Error)
|
||||||
|
return state
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -269,7 +269,7 @@ export type Provider = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const SystemProviderIds = {
|
export const SystemProviderIds = {
|
||||||
cherryin: 'cherryin',
|
// cherryin: 'cherryin',
|
||||||
silicon: 'silicon',
|
silicon: 'silicon',
|
||||||
aihubmix: 'aihubmix',
|
aihubmix: 'aihubmix',
|
||||||
ocoolai: 'ocoolai',
|
ocoolai: 'ocoolai',
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user