feat: add SophNet LLM provider

This commit is contained in:
kangfenmao 2025-11-03 13:28:31 +08:00
parent 6eaa2b2461
commit 32a84311aa
17 changed files with 67 additions and 8 deletions

View File

@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="33" height="38" viewBox="0 0 33 38" fill="none">
<g clip-path="url(#clip0_4321_9943)">
<path d="M1.51221 6.59813C1.51221 4.09263 3.54331 2.06152 6.04881 2.06152H27.9757C30.4812 2.06152 32.5123 4.09263 32.5123 6.59813C32.5123 9.10362 30.4812 11.1347 27.9757 11.1347H6.04881C3.54331 11.1347 1.51221 9.10362 1.51221 6.59813Z" fill="#6200EE"/>
<path d="M3.38905 3.56467C5.26076 1.89906 8.12831 2.06615 9.79391 3.93785L22.1493 17.8221C23.8149 19.6938 23.6478 22.5614 21.7761 24.227C19.9044 25.8926 17.0369 25.7255 15.3713 23.8538L3.01586 9.96953C1.35026 8.09782 1.51734 5.23027 3.38905 3.56467Z" fill="#6200EE"/>
<path d="M1.51221 20.9643C1.51221 18.4588 3.54331 16.4277 6.04881 16.4277H18.9025C21.408 16.4277 23.4391 18.4588 23.4391 20.9643C23.4391 23.4698 21.408 25.5009 18.9025 25.5009H6.04881C3.54331 25.5009 1.51221 23.4698 1.51221 20.9643Z" fill="#6200EE"/>
<path d="M10.5854 32.3052C10.5854 34.8107 8.55431 36.8418 6.04881 36.8418C3.54331 36.8418 1.51221 34.8107 1.51221 32.3052C1.51221 29.7997 3.54331 27.7686 6.04881 27.7686C8.55431 27.7686 10.5854 29.7997 10.5854 32.3052Z" fill="#BF7AFF"/>
</g>
<defs>
<clipPath id="clip0_4321_9943">
<rect width="32.5124" height="36.9029" fill="white" transform="translate(0 0.548828)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -27,6 +27,7 @@ export const SYSTEM_MODELS: Record<SystemProviderId | 'defaultModel', Model[]> =
],
cherryin: [],
vertexai: [],
sophnet: [],
'302ai': [
{
id: 'deepseek-chat',

View File

@ -46,6 +46,7 @@ import Ph8ProviderLogo from '@renderer/assets/images/providers/ph8.png'
import PPIOProviderLogo from '@renderer/assets/images/providers/ppio.png'
import QiniuProviderLogo from '@renderer/assets/images/providers/qiniu.webp'
import SiliconFlowProviderLogo from '@renderer/assets/images/providers/silicon.png'
import SophnetProviderLogo from '@renderer/assets/images/providers/sophnet.svg'
import StepProviderLogo from '@renderer/assets/images/providers/step.png'
import TencentCloudProviderLogo from '@renderer/assets/images/providers/tencent-cloud-ti.png'
import TogetherProviderLogo from '@renderer/assets/images/providers/together.png'
@ -246,6 +247,16 @@ export const SYSTEM_PROVIDERS_CONFIG: Record<SystemProviderId, SystemProvider> =
isSystem: true,
enabled: false
},
sophnet: {
id: 'sophnet',
name: 'SophNet',
type: 'openai',
apiKey: '',
apiHost: 'https://www.sophnet.com/api/open-apis/v1',
models: [],
isSystem: true,
enabled: false
},
ppio: {
id: 'ppio',
name: 'PPIO',
@ -729,7 +740,8 @@ export const PROVIDER_LOGO_MAP: AtLeast<SystemProviderId, string> = {
poe: 'poe', // use svg icon component
aionly: AiOnlyProviderLogo,
longcat: LongCatProviderLogo,
huggingface: HuggingfaceProviderLogo
huggingface: HuggingfaceProviderLogo,
sophnet: SophnetProviderLogo
} as const
export function getProviderLogo(providerId: string) {
@ -808,6 +820,17 @@ export const PROVIDER_URLS: Record<SystemProviderId, ProviderUrls> = {
models: 'https://ai.burncloud.com/pricing'
}
},
sophnet: {
api: {
url: 'https://www.sophnet.com/api/open-apis/v1'
},
websites: {
official: 'https://sophnet.com',
apiKey: 'https://sophnet.com/#/project/key',
docs: 'https://sophnet.com/docs/component/introduce.html',
models: 'https://sophnet.com/#/model/list'
}
},
ppio: {
api: {
url: 'https://api.ppinfra.com/v3/openai'

View File

@ -85,7 +85,8 @@ const providerKeyMap = {
poe: 'provider.poe',
aionly: 'provider.aionly',
longcat: 'provider.longcat',
huggingface: 'provider.huggingface'
huggingface: 'provider.huggingface',
sophnet: 'provider.sophnet'
} as const
/**

View File

@ -2482,6 +2482,7 @@
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "SiliconFlow",
"sophnet": "SophNet",
"stepfun": "StepFun",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Together",

View File

@ -2482,6 +2482,7 @@
"qiniu": "七牛云 AI 推理",
"qwenlm": "QwenLM",
"silicon": "硅基流动",
"sophnet": "SophNet",
"stepfun": "阶跃星辰",
"tencent-cloud-ti": "腾讯云 TI",
"together": "Together",

View File

@ -2482,6 +2482,7 @@
"qiniu": "七牛雲 AI 推理",
"qwenlm": "QwenLM",
"silicon": "SiliconFlow",
"sophnet": "SophNet",
"stepfun": "StepFun",
"tencent-cloud-ti": "騰訊雲 TI",
"together": "Together",

View File

@ -2476,12 +2476,13 @@
"openrouter": "OpenRouter",
"ovms": "Intel OVMS",
"perplexity": "Perplexity",
"ph8": "PH8 Großmodell-Plattform",
"ph8": "PH8",
"poe": "Poe",
"ppio": "PPIO Cloud",
"qiniu": "Qiniu Cloud KI-Inferenz",
"qwenlm": "QwenLM",
"silicon": "SiliconFlow",
"sophnet": "SophNet",
"stepfun": "StepFun",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Together",

View File

@ -2476,12 +2476,13 @@
"openrouter": "OpenRouter",
"ovms": "Intel OVMS",
"perplexity": "Perplexity",
"ph8": "Πλατφόρμα Ανοιχτής Μεγάλης Μοντέλου PH8",
"ph8": "PH8",
"poe": "Poe",
"ppio": "PPIO Piao Yun",
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "Σιδηρική Παρουσία",
"sophnet": "SophNet",
"stepfun": "Βήμα Ουράς",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Together",

View File

@ -2476,12 +2476,13 @@
"openrouter": "OpenRouter",
"ovms": "Intel OVMS",
"perplexity": "Perplejidad",
"ph8": "Plataforma Abierta de Grandes Modelos PH8",
"ph8": "PH8",
"poe": "Poe",
"ppio": "PPIO Cloud Piao",
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "Silicio Fluido",
"sophnet": "SophNet",
"stepfun": "Función Salto",
"tencent-cloud-ti": "Tencent Nube TI",
"together": "Juntos",

View File

@ -2476,12 +2476,13 @@
"openrouter": "OpenRouter",
"ovms": "Intel OVMS",
"perplexity": "Perplexité",
"ph8": "Plateforme ouverte de grands modèles PH8",
"ph8": "PH8",
"poe": "Poe",
"ppio": "PPIO Cloud Piou",
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "Silicium Fluide",
"sophnet": "SophNet",
"stepfun": "Échelon Étoile",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Ensemble",

View File

@ -2482,6 +2482,7 @@
"qiniu": "七牛云 AI 推理",
"qwenlm": "QwenLM",
"silicon": "SiliconFlow",
"sophnet": "SophNet",
"stepfun": "StepFun",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Together",

View File

@ -2476,12 +2476,13 @@
"openrouter": "OpenRouter",
"ovms": "Intel OVMS",
"perplexity": "Perplexidade",
"ph8": "Plataforma Aberta de Grandes Modelos PH8",
"ph8": "PH8",
"poe": "Poe",
"ppio": "PPIO Nuvem Piao",
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "Silício em Fluxo",
"sophnet": "SophNet",
"stepfun": "Função de Passo Estelar",
"tencent-cloud-ti": "Nuvem TI da Tencent",
"together": "Juntos",

View File

@ -2482,6 +2482,7 @@
"qiniu": "Qiniu AI",
"qwenlm": "QwenLM",
"silicon": "SiliconFlow",
"sophnet": "SophNet",
"stepfun": "StepFun",
"tencent-cloud-ti": "Tencent Cloud TI",
"together": "Together",

View File

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

View File

@ -2783,6 +2783,16 @@ const migrateConfig = {
logger.error('migrate 169 error', error as Error)
return state
}
},
'170': (state: RootState) => {
try {
addProvider(state, 'sophnet')
state.llm.providers = moveProvider(state.llm.providers, 'sophnet', 17)
return state
} catch (error) {
logger.error('migrate 170 error', error as Error)
return state
}
}
}

View File

@ -123,6 +123,7 @@ export const SystemProviderIds = {
cephalon: 'cephalon',
lanyun: 'lanyun',
ph8: 'ph8',
sophnet: 'sophnet',
openrouter: 'openrouter',
ollama: 'ollama',
ovms: 'ovms',