feat: add MemoryLake provider

- Add memorylake to SystemProviderIdSchema and SystemProviderIds
- Add SYSTEM_MODELS.memorylake with 15 default models
- Add provider config, logo, and URLs in providers.ts
- Add i18n translations for all locales
- Add migration 183 to auto-add provider for existing users
- Bump persist version from 182 to 183

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Abruzz1 <a1594834522@gmail.com>
This commit is contained in:
Abruzz1 2025-12-10 11:25:13 +08:00
parent 7507443d8b
commit e7d7ceeb13
17 changed files with 67 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -1785,5 +1785,22 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
provider: 'cerebras',
group: 'qwen'
}
],
memorylake: [
{ id: 'gpt-5', name: 'GPT-5', provider: 'memorylake', group: 'GPT 5' },
{ id: 'gpt-5-mini', name: 'GPT-5 Mini', provider: 'memorylake', group: 'GPT 5' },
{ id: 'gpt-4o', name: 'GPT 4o', provider: 'memorylake', group: 'GPT 4o' },
{ id: 'gpt-4o-mini', name: 'GPT 4o Mini', provider: 'memorylake', group: 'GPT 4o' },
{ id: 'gemini-2.5-flash', name: 'Gemini 2.5 Flash', provider: 'memorylake', group: 'Gemini 2.5' },
{ id: 'gemini-2.5-pro', name: 'Gemini 2.5 Pro', provider: 'memorylake', group: 'Gemini 2.5' },
{ id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku 4.5', provider: 'memorylake', group: 'Claude 4.5' },
{ id: 'claude-sonnet-4-5-20250929', name: 'Claude Sonnet 4.5', provider: 'memorylake', group: 'Claude 4.5' },
{ id: 'glm-4.5', name: 'GLM 4.5', provider: 'memorylake', group: 'GLM 4.5' },
{ id: 'glm-4.5-air', name: 'GLM 4.5 Air', provider: 'memorylake', group: 'GLM 4.5' },
{ id: 'grok-4', name: 'Grok 4', provider: 'memorylake', group: 'Grok' },
{ id: 'grok-4-fast-non-reasoning', name: 'Grok 4 Fast', provider: 'memorylake', group: 'Grok' },
{ id: 'qwen-flash', name: 'Qwen Flash', provider: 'memorylake', group: 'Qwen' },
{ id: 'qwen-max', name: 'Qwen Max', provider: 'memorylake', group: 'Qwen' },
{ id: 'qwen-plus', name: 'Qwen Plus', provider: 'memorylake', group: 'Qwen' }
]
}

View File

@ -31,6 +31,7 @@ import JinaProviderLogo from '@renderer/assets/images/providers/jina.png'
import LanyunProviderLogo from '@renderer/assets/images/providers/lanyun.png'
import LMStudioProviderLogo from '@renderer/assets/images/providers/lmstudio.png'
import LongCatProviderLogo from '@renderer/assets/images/providers/longcat.png'
import MemoryLakeProviderLogo from '@renderer/assets/images/providers/memorylake.png'
import MinimaxProviderLogo from '@renderer/assets/images/providers/minimax.png'
import MistralProviderLogo from '@renderer/assets/images/providers/mistral.png'
import ModelScopeProviderLogo from '@renderer/assets/images/providers/modelscope.png'
@ -695,6 +696,16 @@ export const SYSTEM_PROVIDERS_CONFIG: Record<SystemProviderId, SystemProvider> =
models: SYSTEM_MODELS.cerebras,
isSystem: true,
enabled: false
},
memorylake: {
id: 'memorylake',
name: 'MemoryLake',
type: 'openai',
apiKey: '',
apiHost: 'https://memorylake.data.cloud',
models: SYSTEM_MODELS.memorylake,
isSystem: true,
enabled: false
}
} as const
@ -763,7 +774,8 @@ export const PROVIDER_LOGO_MAP: AtLeast<SystemProviderId, string> = {
huggingface: HuggingfaceProviderLogo,
sophnet: SophnetProviderLogo,
gateway: AIGatewayProviderLogo,
cerebras: CerebrasProviderLogo
cerebras: CerebrasProviderLogo,
memorylake: MemoryLakeProviderLogo
} as const
export function getProviderLogo(providerId: string) {
@ -1434,5 +1446,15 @@ export const PROVIDER_URLS: Record<SystemProviderId, ProviderUrls> = {
docs: 'https://inference-docs.cerebras.ai/introduction',
models: 'https://inference-docs.cerebras.ai/models/overview'
}
},
memorylake: {
api: {
url: 'https://memorylake.data.cloud'
},
websites: {
official: 'https://memorylake.ai',
apiKey: 'https://memorylake.data.cloud/panel/token',
docs: 'https://docs.memorylake.ai'
}
}
}

View File

@ -88,7 +88,8 @@ const providerKeyMap = {
huggingface: 'provider.huggingface',
sophnet: 'provider.sophnet',
gateway: 'provider.ai-gateway',
cerebras: 'provider.cerebras'
cerebras: 'provider.cerebras',
memorylake: 'provider.memorylake'
} as const
/**

View File

@ -2572,6 +2572,7 @@
"lanyun": "LANYUN",
"lmstudio": "LM Studio",
"longcat": "LongCat AI",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope",

View File

@ -2572,6 +2572,7 @@
"lanyun": "蓝耘科技",
"lmstudio": "LM Studio",
"longcat": "龙猫",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope 魔搭",

View File

@ -2572,6 +2572,7 @@
"lanyun": "藍耘",
"lmstudio": "LM Studio",
"longcat": "龍貓",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope 魔搭",

View File

@ -2572,6 +2572,7 @@
"lanyun": "Lanyun Technologie",
"lmstudio": "LM Studio",
"longcat": "Meißner Riesenhamster",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope",

View File

@ -2572,6 +2572,7 @@
"lanyun": "Λανιούν Τεχνολογία",
"lmstudio": "LM Studio",
"longcat": "Τσίρο",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope Magpie",

View File

@ -2572,6 +2572,7 @@
"lanyun": "Tecnología Lanyun",
"lmstudio": "Estudio LM",
"longcat": "Totoro",
"memorylake": "MemoryLake",
"minimax": "Minimax",
"mistral": "Mistral",
"modelscope": "ModelScope Módulo",

View File

@ -2572,6 +2572,7 @@
"lanyun": "Technologie Lan Yun",
"lmstudio": "Studio LM",
"longcat": "Mon voisin Totoro",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope MoDa",

View File

@ -2572,6 +2572,7 @@
"lanyun": "LANYUN",
"lmstudio": "LM Studio",
"longcat": "トトロ",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope",

View File

@ -2572,6 +2572,7 @@
"lanyun": "Lanyun Tecnologia",
"lmstudio": "Estúdio LM",
"longcat": "Totoro",
"memorylake": "MemoryLake",
"minimax": "Minimax",
"mistral": "Mistral",
"modelscope": "ModelScope MôDá",

View File

@ -2572,6 +2572,7 @@
"lanyun": "LANYUN",
"lmstudio": "LM Studio",
"longcat": "Тоторо",
"memorylake": "MemoryLake",
"minimax": "MiniMax",
"mistral": "Mistral",
"modelscope": "ModelScope",

View File

@ -67,7 +67,7 @@ const persistedReducer = persistReducer(
{
key: 'cherry-studio',
storage,
version: 182,
version: 183,
blacklist: ['runtime', 'messages', 'messageBlocks', 'tabs', 'toolPermissions'],
migrate
},

View File

@ -2976,6 +2976,16 @@ const migrateConfig = {
logger.error('migrate 182 error', error as Error)
return state
}
},
'183': (state: RootState) => {
try {
addProvider(state, SystemProviderIds.memorylake)
logger.info('migrate 183 success')
return state
} catch (error) {
logger.error('migrate 183 error', error as Error)
return state
}
}
}

View File

@ -189,7 +189,8 @@ export const SystemProviderIdSchema = z.enum([
'huggingface',
'sophnet',
'gateway',
'cerebras'
'cerebras',
'memorylake'
])
export type SystemProviderId = z.infer<typeof SystemProviderIdSchema>
@ -258,7 +259,8 @@ export const SystemProviderIds = {
longcat: 'longcat',
huggingface: 'huggingface',
gateway: 'gateway',
cerebras: 'cerebras'
cerebras: 'cerebras',
memorylake: 'memorylake'
} as const satisfies Record<SystemProviderId, SystemProviderId>
type SystemProviderIdTypeMap = typeof SystemProviderIds