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:
kangfenmao 2025-09-26 10:36:17 +08:00
parent d41e239b89
commit 3b7ab2aec8
5 changed files with 33 additions and 24 deletions

View File

@ -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': [
{ {

View File

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

View File

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

View File

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

View File

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