@lobehub/chat 1.111.1 → 1.111.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/code-review.mdc +2 -19
- package/.cursor/rules/cursor-ux.mdc +0 -72
- package/.cursor/rules/project-introduce.mdc +5 -5
- package/.cursor/rules/react-component.mdc +92 -73
- package/.cursor/rules/rules-attach.mdc +28 -61
- package/.cursor/rules/system-role.mdc +8 -20
- package/.cursor/rules/typescript.mdc +55 -14
- package/CHANGELOG.md +52 -0
- package/changelog/v1.json +14 -0
- package/locales/ar/models.json +21 -3
- package/locales/bg-BG/models.json +21 -3
- package/locales/de-DE/models.json +21 -3
- package/locales/en-US/models.json +21 -3
- package/locales/es-ES/models.json +21 -3
- package/locales/fa-IR/models.json +21 -3
- package/locales/fr-FR/models.json +21 -3
- package/locales/it-IT/models.json +21 -3
- package/locales/ja-JP/models.json +21 -3
- package/locales/ko-KR/models.json +21 -3
- package/locales/nl-NL/models.json +21 -3
- package/locales/pl-PL/models.json +21 -3
- package/locales/pt-BR/models.json +21 -3
- package/locales/ru-RU/models.json +21 -3
- package/locales/tr-TR/models.json +21 -3
- package/locales/vi-VN/models.json +21 -3
- package/locales/zh-CN/models.json +21 -3
- package/locales/zh-TW/models.json +21 -3
- package/package.json +1 -1
- package/packages/types/src/aiModel.ts +67 -46
- package/packages/types/src/hotkey.ts +2 -0
- package/packages/types/src/llm.ts +3 -3
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx +3 -3
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.test.tsx +1 -0
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +11 -2
- package/src/app/[variants]/(main)/_layout/Desktop/SideBar/index.tsx +2 -2
- package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -2
- package/src/app/[variants]/(main)/chat/_layout/Desktop/SessionPanel.tsx +2 -2
- package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Details/Overview/ProviderList/index.tsx +23 -12
- package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Details/Overview/ModelList/index.tsx +23 -10
- package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +21 -12
- package/src/components/Thinking/index.tsx +53 -13
- package/src/config/aiModels/ai21.ts +8 -4
- package/src/config/aiModels/ai360.ts +28 -14
- package/src/config/aiModels/aihubmix.ts +174 -86
- package/src/config/aiModels/anthropic.ts +97 -38
- package/src/config/aiModels/azure.ts +54 -32
- package/src/config/aiModels/azureai.ts +63 -37
- package/src/config/aiModels/baichuan.ts +24 -12
- package/src/config/aiModels/bedrock.ts +60 -30
- package/src/config/aiModels/cohere.ts +60 -30
- package/src/config/aiModels/deepseek.ts +10 -6
- package/src/config/aiModels/fireworksai.ts +88 -44
- package/src/config/aiModels/giteeai.ts +1 -1
- package/src/config/aiModels/github.ts +44 -26
- package/src/config/aiModels/google.ts +119 -68
- package/src/config/aiModels/groq.ts +48 -24
- package/src/config/aiModels/higress.ts +617 -310
- package/src/config/aiModels/hunyuan.ts +105 -54
- package/src/config/aiModels/infiniai.ts +104 -52
- package/src/config/aiModels/internlm.ts +16 -8
- package/src/config/aiModels/jina.ts +4 -2
- package/src/config/aiModels/minimax.ts +11 -10
- package/src/config/aiModels/mistral.ts +40 -20
- package/src/config/aiModels/moonshot.ts +42 -22
- package/src/config/aiModels/novita.ts +196 -98
- package/src/config/aiModels/openai.ts +270 -137
- package/src/config/aiModels/openrouter.ts +205 -100
- package/src/config/aiModels/perplexity.ts +36 -6
- package/src/config/aiModels/ppio.ts +76 -38
- package/src/config/aiModels/qwen.ts +257 -133
- package/src/config/aiModels/sambanova.ts +56 -28
- package/src/config/aiModels/sensenova.ts +100 -50
- package/src/config/aiModels/siliconcloud.ts +224 -112
- package/src/config/aiModels/stepfun.ts +44 -22
- package/src/config/aiModels/taichu.ts +8 -4
- package/src/config/aiModels/tencentcloud.ts +12 -6
- package/src/config/aiModels/upstage.ts +8 -4
- package/src/config/aiModels/v0.ts +15 -12
- package/src/config/aiModels/vertexai.ts +49 -27
- package/src/config/aiModels/volcengine.ts +110 -51
- package/src/config/aiModels/wenxin.ts +179 -73
- package/src/config/aiModels/xai.ts +33 -19
- package/src/config/aiModels/zeroone.ts +48 -24
- package/src/config/aiModels/zhipu.ts +118 -69
- package/src/config/modelProviders/ai21.ts +0 -8
- package/src/config/modelProviders/ai360.ts +0 -20
- package/src/config/modelProviders/anthropic.ts +0 -56
- package/src/config/modelProviders/baichuan.ts +0 -30
- package/src/config/modelProviders/bedrock.ts +0 -74
- package/src/config/modelProviders/deepseek.ts +0 -13
- package/src/config/modelProviders/fireworksai.ts +0 -88
- package/src/config/modelProviders/google.ts +0 -59
- package/src/config/modelProviders/groq.ts +0 -48
- package/src/config/modelProviders/higress.ts +0 -727
- package/src/config/modelProviders/hunyuan.ts +0 -45
- package/src/config/modelProviders/infiniai.ts +0 -60
- package/src/config/modelProviders/internlm.ts +0 -8
- package/src/config/modelProviders/mistral.ts +0 -48
- package/src/config/modelProviders/modelscope.ts +2 -1
- package/src/config/modelProviders/openai.ts +5 -100
- package/src/config/modelProviders/openrouter.ts +0 -77
- package/src/config/modelProviders/ppio.ts +0 -95
- package/src/config/modelProviders/qwen.ts +0 -165
- package/src/config/modelProviders/sensenova.ts +0 -45
- package/src/config/modelProviders/siliconcloud.ts +0 -266
- package/src/config/modelProviders/stepfun.ts +0 -60
- package/src/config/modelProviders/taichu.ts +0 -10
- package/src/config/modelProviders/wenxin.ts +0 -90
- package/src/config/modelProviders/xai.ts +0 -16
- package/src/config/modelProviders/zeroone.ts +0 -60
- package/src/config/modelProviders/zhipu.ts +0 -80
- package/src/const/hotkeys.ts +6 -0
- package/src/features/Conversation/Extras/Usage/UsageDetail/ModelCard.tsx +4 -3
- package/src/features/Conversation/Extras/Usage/UsageDetail/pricing.ts +25 -15
- package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.test.ts +7 -5
- package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.ts +6 -5
- package/src/hooks/useHotkeys/chatScope.ts +2 -2
- package/src/hooks/useHotkeys/globalScope.ts +16 -4
- package/src/hooks/usePinnedAgentState.ts +21 -0
- package/src/hooks/useSwitchSession.ts +1 -1
- package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.test.ts +54 -8
- package/src/locales/default/hotkey.ts +4 -0
- package/src/server/routers/lambda/agent.ts +2 -2
- package/src/server/routers/lambda/config/__snapshots__/index.test.ts.snap +0 -28
- package/src/server/services/discover/index.ts +7 -6
- package/src/server/services/user/index.ts +1 -2
- package/src/utils/__snapshots__/parseModels.test.ts.snap +28 -4
- package/src/utils/_deprecated/__snapshots__/parseModels.test.ts.snap +0 -8
- package/src/utils/parseModels.test.ts +60 -9
- package/src/utils/pricing.test.ts +183 -0
- package/src/utils/pricing.ts +90 -0
@@ -13,8 +13,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
13
13
|
id: 'deepseek/deepseek-r1/community',
|
14
14
|
pricing: {
|
15
15
|
currency: 'CNY',
|
16
|
-
|
17
|
-
|
16
|
+
units: [
|
17
|
+
{ name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
|
18
|
+
{ name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
|
19
|
+
],
|
18
20
|
},
|
19
21
|
type: 'chat',
|
20
22
|
},
|
@@ -27,8 +29,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
27
29
|
id: 'deepseek/deepseek-v3/community',
|
28
30
|
pricing: {
|
29
31
|
currency: 'CNY',
|
30
|
-
|
31
|
-
|
32
|
+
units: [
|
33
|
+
{ name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
|
34
|
+
{ name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
|
35
|
+
],
|
32
36
|
},
|
33
37
|
type: 'chat',
|
34
38
|
},
|
@@ -44,8 +48,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
44
48
|
id: 'deepseek/deepseek-r1',
|
45
49
|
pricing: {
|
46
50
|
currency: 'CNY',
|
47
|
-
|
48
|
-
|
51
|
+
units: [
|
52
|
+
{ name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
|
53
|
+
{ name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
|
54
|
+
],
|
49
55
|
},
|
50
56
|
type: 'chat',
|
51
57
|
},
|
@@ -58,8 +64,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
58
64
|
id: 'deepseek/deepseek-v3',
|
59
65
|
pricing: {
|
60
66
|
currency: 'CNY',
|
61
|
-
|
62
|
-
|
67
|
+
units: [
|
68
|
+
{ name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
|
69
|
+
{ name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
|
70
|
+
],
|
63
71
|
},
|
64
72
|
type: 'chat',
|
65
73
|
},
|
@@ -75,8 +83,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
75
83
|
id: 'deepseek/deepseek-r1-distill-llama-70b',
|
76
84
|
pricing: {
|
77
85
|
currency: 'CNY',
|
78
|
-
|
79
|
-
|
86
|
+
units: [
|
87
|
+
{ name: 'textInput', rate: 5.8, strategy: 'fixed', unit: 'millionTokens' },
|
88
|
+
{ name: 'textOutput', rate: 5.8, strategy: 'fixed', unit: 'millionTokens' },
|
89
|
+
],
|
80
90
|
},
|
81
91
|
type: 'chat',
|
82
92
|
},
|
@@ -92,8 +102,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
92
102
|
id: 'deepseek/deepseek-r1-distill-qwen-32b',
|
93
103
|
pricing: {
|
94
104
|
currency: 'CNY',
|
95
|
-
|
96
|
-
|
105
|
+
units: [
|
106
|
+
{ name: 'textInput', rate: 2.18, strategy: 'fixed', unit: 'millionTokens' },
|
107
|
+
{ name: 'textOutput', rate: 2.18, strategy: 'fixed', unit: 'millionTokens' },
|
108
|
+
],
|
97
109
|
},
|
98
110
|
type: 'chat',
|
99
111
|
},
|
@@ -109,8 +121,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
109
121
|
id: 'deepseek/deepseek-r1-distill-qwen-14b',
|
110
122
|
pricing: {
|
111
123
|
currency: 'CNY',
|
112
|
-
|
113
|
-
|
124
|
+
units: [
|
125
|
+
{ name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
|
126
|
+
{ name: 'textOutput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
|
127
|
+
],
|
114
128
|
},
|
115
129
|
type: 'chat',
|
116
130
|
},
|
@@ -126,8 +140,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
126
140
|
id: 'deepseek/deepseek-r1-distill-llama-8b',
|
127
141
|
pricing: {
|
128
142
|
currency: 'CNY',
|
129
|
-
|
130
|
-
|
143
|
+
units: [
|
144
|
+
{ name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
|
145
|
+
{ name: 'textOutput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
|
146
|
+
],
|
131
147
|
},
|
132
148
|
type: 'chat',
|
133
149
|
},
|
@@ -140,8 +156,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
140
156
|
id: 'qwen/qwen-2.5-72b-instruct',
|
141
157
|
pricing: {
|
142
158
|
currency: 'CNY',
|
143
|
-
|
144
|
-
|
159
|
+
units: [
|
160
|
+
{ name: 'textInput', rate: 2.75, strategy: 'fixed', unit: 'millionTokens' },
|
161
|
+
{ name: 'textOutput', rate: 2.88, strategy: 'fixed', unit: 'millionTokens' },
|
162
|
+
],
|
145
163
|
},
|
146
164
|
type: 'chat',
|
147
165
|
},
|
@@ -157,8 +175,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
157
175
|
id: 'qwen/qwen-2-vl-72b-instruct',
|
158
176
|
pricing: {
|
159
177
|
currency: 'CNY',
|
160
|
-
|
161
|
-
|
178
|
+
units: [
|
179
|
+
{ name: 'textInput', rate: 4.5, strategy: 'fixed', unit: 'millionTokens' },
|
180
|
+
{ name: 'textOutput', rate: 4.5, strategy: 'fixed', unit: 'millionTokens' },
|
181
|
+
],
|
162
182
|
},
|
163
183
|
type: 'chat',
|
164
184
|
},
|
@@ -170,8 +190,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
170
190
|
id: 'meta-llama/llama-3.2-3b-instruct',
|
171
191
|
pricing: {
|
172
192
|
currency: 'CNY',
|
173
|
-
|
174
|
-
|
193
|
+
units: [
|
194
|
+
{ name: 'textInput', rate: 0.216, strategy: 'fixed', unit: 'millionTokens' },
|
195
|
+
{ name: 'textOutput', rate: 0.36, strategy: 'fixed', unit: 'millionTokens' },
|
196
|
+
],
|
175
197
|
},
|
176
198
|
type: 'chat',
|
177
199
|
},
|
@@ -184,8 +206,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
184
206
|
id: 'qwen/qwen2.5-32b-instruct',
|
185
207
|
pricing: {
|
186
208
|
currency: 'CNY',
|
187
|
-
|
188
|
-
|
209
|
+
units: [
|
210
|
+
{ name: 'textInput', rate: 1.26, strategy: 'fixed', unit: 'millionTokens' },
|
211
|
+
{ name: 'textOutput', rate: 1.26, strategy: 'fixed', unit: 'millionTokens' },
|
212
|
+
],
|
189
213
|
},
|
190
214
|
type: 'chat',
|
191
215
|
},
|
@@ -198,8 +222,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
198
222
|
id: 'baichuan/baichuan2-13b-chat',
|
199
223
|
pricing: {
|
200
224
|
currency: 'CNY',
|
201
|
-
|
202
|
-
|
225
|
+
units: [
|
226
|
+
{ name: 'textInput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
|
227
|
+
{ name: 'textOutput', rate: 1.75, strategy: 'fixed', unit: 'millionTokens' },
|
228
|
+
],
|
203
229
|
},
|
204
230
|
type: 'chat',
|
205
231
|
},
|
@@ -212,8 +238,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
212
238
|
id: 'meta-llama/llama-3.1-70b-instruct',
|
213
239
|
pricing: {
|
214
240
|
currency: 'CNY',
|
215
|
-
|
216
|
-
|
241
|
+
units: [
|
242
|
+
{ name: 'textInput', rate: 2.45, strategy: 'fixed', unit: 'millionTokens' },
|
243
|
+
{ name: 'textOutput', rate: 2.82, strategy: 'fixed', unit: 'millionTokens' },
|
244
|
+
],
|
217
245
|
},
|
218
246
|
type: 'chat',
|
219
247
|
},
|
@@ -226,8 +254,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
226
254
|
id: 'meta-llama/llama-3.1-8b-instruct',
|
227
255
|
pricing: {
|
228
256
|
currency: 'CNY',
|
229
|
-
|
230
|
-
|
257
|
+
units: [
|
258
|
+
{ name: 'textInput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
259
|
+
{ name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
260
|
+
],
|
231
261
|
},
|
232
262
|
type: 'chat',
|
233
263
|
},
|
@@ -240,8 +270,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
240
270
|
id: '01-ai/yi-1.5-34b-chat',
|
241
271
|
pricing: {
|
242
272
|
currency: 'CNY',
|
243
|
-
|
244
|
-
|
273
|
+
units: [
|
274
|
+
{ name: 'textInput', rate: 1.1, strategy: 'fixed', unit: 'millionTokens' },
|
275
|
+
{ name: 'textOutput', rate: 1.1, strategy: 'fixed', unit: 'millionTokens' },
|
276
|
+
],
|
245
277
|
},
|
246
278
|
type: 'chat',
|
247
279
|
},
|
@@ -254,8 +286,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
254
286
|
id: '01-ai/yi-1.5-9b-chat',
|
255
287
|
pricing: {
|
256
288
|
currency: 'CNY',
|
257
|
-
|
258
|
-
|
289
|
+
units: [
|
290
|
+
{ name: 'textInput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
291
|
+
{ name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
|
292
|
+
],
|
259
293
|
},
|
260
294
|
type: 'chat',
|
261
295
|
},
|
@@ -267,8 +301,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
267
301
|
id: 'thudm/glm-4-9b-chat',
|
268
302
|
pricing: {
|
269
303
|
currency: 'CNY',
|
270
|
-
|
271
|
-
|
304
|
+
units: [
|
305
|
+
{ name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
|
306
|
+
{ name: 'textOutput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
|
307
|
+
],
|
272
308
|
},
|
273
309
|
type: 'chat',
|
274
310
|
},
|
@@ -281,8 +317,10 @@ const ppioChatModels: AIChatModelCard[] = [
|
|
281
317
|
id: 'qwen/qwen-2-7b-instruct',
|
282
318
|
pricing: {
|
283
319
|
currency: 'CNY',
|
284
|
-
|
285
|
-
|
320
|
+
units: [
|
321
|
+
{ name: 'textInput', rate: 0.32, strategy: 'fixed', unit: 'millionTokens' },
|
322
|
+
{ name: 'textOutput', rate: 0.32, strategy: 'fixed', unit: 'millionTokens' },
|
323
|
+
],
|
286
324
|
},
|
287
325
|
type: 'chat',
|
288
326
|
},
|