@lobehub/chat 1.111.1 → 1.111.2

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.
Files changed (99) hide show
  1. package/.cursor/rules/code-review.mdc +2 -19
  2. package/.cursor/rules/cursor-ux.mdc +0 -72
  3. package/.cursor/rules/project-introduce.mdc +5 -5
  4. package/.cursor/rules/react-component.mdc +92 -73
  5. package/.cursor/rules/rules-attach.mdc +28 -61
  6. package/.cursor/rules/system-role.mdc +8 -20
  7. package/.cursor/rules/typescript.mdc +55 -14
  8. package/CHANGELOG.md +25 -0
  9. package/changelog/v1.json +5 -0
  10. package/package.json +1 -1
  11. package/packages/types/src/aiModel.ts +67 -46
  12. package/packages/types/src/llm.ts +3 -3
  13. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Details/Overview/ProviderList/index.tsx +23 -12
  14. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Details/Overview/ModelList/index.tsx +23 -10
  15. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +21 -12
  16. package/src/config/aiModels/ai21.ts +8 -4
  17. package/src/config/aiModels/ai360.ts +28 -14
  18. package/src/config/aiModels/aihubmix.ts +174 -86
  19. package/src/config/aiModels/anthropic.ts +97 -38
  20. package/src/config/aiModels/azure.ts +54 -32
  21. package/src/config/aiModels/azureai.ts +63 -37
  22. package/src/config/aiModels/baichuan.ts +24 -12
  23. package/src/config/aiModels/bedrock.ts +60 -30
  24. package/src/config/aiModels/cohere.ts +60 -30
  25. package/src/config/aiModels/deepseek.ts +10 -6
  26. package/src/config/aiModels/fireworksai.ts +88 -44
  27. package/src/config/aiModels/giteeai.ts +1 -1
  28. package/src/config/aiModels/github.ts +44 -26
  29. package/src/config/aiModels/google.ts +119 -68
  30. package/src/config/aiModels/groq.ts +48 -24
  31. package/src/config/aiModels/higress.ts +617 -310
  32. package/src/config/aiModels/hunyuan.ts +105 -54
  33. package/src/config/aiModels/infiniai.ts +104 -52
  34. package/src/config/aiModels/internlm.ts +16 -8
  35. package/src/config/aiModels/jina.ts +4 -2
  36. package/src/config/aiModels/minimax.ts +11 -10
  37. package/src/config/aiModels/mistral.ts +40 -20
  38. package/src/config/aiModels/moonshot.ts +42 -22
  39. package/src/config/aiModels/novita.ts +196 -98
  40. package/src/config/aiModels/openai.ts +270 -137
  41. package/src/config/aiModels/openrouter.ts +205 -100
  42. package/src/config/aiModels/perplexity.ts +36 -6
  43. package/src/config/aiModels/ppio.ts +76 -38
  44. package/src/config/aiModels/qwen.ts +257 -133
  45. package/src/config/aiModels/sambanova.ts +56 -28
  46. package/src/config/aiModels/sensenova.ts +100 -50
  47. package/src/config/aiModels/siliconcloud.ts +224 -112
  48. package/src/config/aiModels/stepfun.ts +44 -22
  49. package/src/config/aiModels/taichu.ts +8 -4
  50. package/src/config/aiModels/tencentcloud.ts +12 -6
  51. package/src/config/aiModels/upstage.ts +8 -4
  52. package/src/config/aiModels/v0.ts +15 -12
  53. package/src/config/aiModels/vertexai.ts +49 -27
  54. package/src/config/aiModels/volcengine.ts +110 -51
  55. package/src/config/aiModels/wenxin.ts +179 -73
  56. package/src/config/aiModels/xai.ts +33 -19
  57. package/src/config/aiModels/zeroone.ts +48 -24
  58. package/src/config/aiModels/zhipu.ts +118 -69
  59. package/src/config/modelProviders/ai21.ts +0 -8
  60. package/src/config/modelProviders/ai360.ts +0 -20
  61. package/src/config/modelProviders/anthropic.ts +0 -56
  62. package/src/config/modelProviders/baichuan.ts +0 -30
  63. package/src/config/modelProviders/bedrock.ts +0 -74
  64. package/src/config/modelProviders/deepseek.ts +0 -13
  65. package/src/config/modelProviders/fireworksai.ts +0 -88
  66. package/src/config/modelProviders/google.ts +0 -59
  67. package/src/config/modelProviders/groq.ts +0 -48
  68. package/src/config/modelProviders/higress.ts +0 -727
  69. package/src/config/modelProviders/hunyuan.ts +0 -45
  70. package/src/config/modelProviders/infiniai.ts +0 -60
  71. package/src/config/modelProviders/internlm.ts +0 -8
  72. package/src/config/modelProviders/mistral.ts +0 -48
  73. package/src/config/modelProviders/modelscope.ts +2 -1
  74. package/src/config/modelProviders/openai.ts +5 -100
  75. package/src/config/modelProviders/openrouter.ts +0 -77
  76. package/src/config/modelProviders/ppio.ts +0 -95
  77. package/src/config/modelProviders/qwen.ts +0 -165
  78. package/src/config/modelProviders/sensenova.ts +0 -45
  79. package/src/config/modelProviders/siliconcloud.ts +0 -266
  80. package/src/config/modelProviders/stepfun.ts +0 -60
  81. package/src/config/modelProviders/taichu.ts +0 -10
  82. package/src/config/modelProviders/wenxin.ts +0 -90
  83. package/src/config/modelProviders/xai.ts +0 -16
  84. package/src/config/modelProviders/zeroone.ts +0 -60
  85. package/src/config/modelProviders/zhipu.ts +0 -80
  86. package/src/features/Conversation/Extras/Usage/UsageDetail/ModelCard.tsx +4 -3
  87. package/src/features/Conversation/Extras/Usage/UsageDetail/pricing.ts +25 -15
  88. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.test.ts +7 -5
  89. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.ts +6 -5
  90. package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.test.ts +54 -8
  91. package/src/server/routers/lambda/agent.ts +2 -2
  92. package/src/server/routers/lambda/config/__snapshots__/index.test.ts.snap +0 -28
  93. package/src/server/services/discover/index.ts +7 -6
  94. package/src/server/services/user/index.ts +1 -2
  95. package/src/utils/__snapshots__/parseModels.test.ts.snap +28 -4
  96. package/src/utils/_deprecated/__snapshots__/parseModels.test.ts.snap +0 -8
  97. package/src/utils/parseModels.test.ts +60 -9
  98. package/src/utils/pricing.test.ts +183 -0
  99. package/src/utils/pricing.ts +90 -0
@@ -21,10 +21,6 @@ const OpenRouter: ModelProviderCard = {
21
21
  enabled: true,
22
22
  id: 'openai/o1-mini',
23
23
  maxOutput: 65_536,
24
- pricing: {
25
- input: 3,
26
- output: 12,
27
- },
28
24
  releasedAt: '2024-09-12',
29
25
  },
30
26
  {
@@ -35,10 +31,6 @@ const OpenRouter: ModelProviderCard = {
35
31
  enabled: true,
36
32
  id: 'openai/o1',
37
33
  maxOutput: 100_000,
38
- pricing: {
39
- input: 15,
40
- output: 60,
41
- },
42
34
  releasedAt: '2024-12-17',
43
35
  vision: true,
44
36
  },
@@ -50,10 +42,6 @@ const OpenRouter: ModelProviderCard = {
50
42
  enabled: true,
51
43
  id: 'openai/o1-preview',
52
44
  maxOutput: 32_768,
53
- pricing: {
54
- input: 15,
55
- output: 60,
56
- },
57
45
  releasedAt: '2024-09-12',
58
46
  },
59
47
  {
@@ -65,10 +53,6 @@ const OpenRouter: ModelProviderCard = {
65
53
  functionCall: true,
66
54
  id: 'openai/gpt-4o-mini',
67
55
  maxOutput: 16_385,
68
- pricing: {
69
- input: 0.15,
70
- output: 0.6,
71
- },
72
56
  vision: true,
73
57
  },
74
58
  {
@@ -79,10 +63,6 @@ const OpenRouter: ModelProviderCard = {
79
63
  enabled: true,
80
64
  functionCall: true,
81
65
  id: 'openai/gpt-4o',
82
- pricing: {
83
- input: 2.5,
84
- output: 10,
85
- },
86
66
  vision: true,
87
67
  },
88
68
  {
@@ -94,12 +74,6 @@ const OpenRouter: ModelProviderCard = {
94
74
  functionCall: true,
95
75
  id: 'anthropic/claude-3-haiku',
96
76
  maxOutput: 4096,
97
- pricing: {
98
- cachedInput: 0.025,
99
- input: 0.25,
100
- output: 1.25,
101
- writeCacheInput: 0.3125,
102
- },
103
77
  releasedAt: '2024-03-07',
104
78
  vision: true,
105
79
  },
@@ -112,12 +86,6 @@ const OpenRouter: ModelProviderCard = {
112
86
  functionCall: true,
113
87
  id: 'anthropic/claude-3.5-haiku',
114
88
  maxOutput: 8192,
115
- pricing: {
116
- cachedInput: 0.1,
117
- input: 1,
118
- output: 5,
119
- writeCacheInput: 1.25,
120
- },
121
89
  releasedAt: '2024-11-05',
122
90
  },
123
91
  {
@@ -129,12 +97,6 @@ const OpenRouter: ModelProviderCard = {
129
97
  functionCall: true,
130
98
  id: 'anthropic/claude-3.5-sonnet',
131
99
  maxOutput: 8192,
132
- pricing: {
133
- cachedInput: 0.3,
134
- input: 3,
135
- output: 15,
136
- writeCacheInput: 3.75,
137
- },
138
100
  releasedAt: '2024-06-20',
139
101
  vision: true,
140
102
  },
@@ -147,12 +109,6 @@ const OpenRouter: ModelProviderCard = {
147
109
  functionCall: true,
148
110
  id: 'anthropic/claude-3-opus',
149
111
  maxOutput: 4096,
150
- pricing: {
151
- cachedInput: 1.5,
152
- input: 15,
153
- output: 75,
154
- writeCacheInput: 18.75,
155
- },
156
112
  releasedAt: '2024-02-29',
157
113
  vision: true,
158
114
  },
@@ -164,10 +120,6 @@ const OpenRouter: ModelProviderCard = {
164
120
  functionCall: true,
165
121
  id: 'google/gemini-flash-1.5',
166
122
  maxOutput: 8192,
167
- pricing: {
168
- input: 0.075,
169
- output: 0.3,
170
- },
171
123
  vision: true,
172
124
  },
173
125
  {
@@ -179,11 +131,6 @@ const OpenRouter: ModelProviderCard = {
179
131
  functionCall: true,
180
132
  id: 'google/gemini-2.0-flash-001',
181
133
  maxOutput: 8192,
182
- pricing: {
183
- cachedInput: 0.025,
184
- input: 0.1,
185
- output: 0.4,
186
- },
187
134
  releasedAt: '2025-02-05',
188
135
  vision: true,
189
136
  },
@@ -195,10 +142,6 @@ const OpenRouter: ModelProviderCard = {
195
142
  functionCall: true,
196
143
  id: 'google/gemini-pro-1.5',
197
144
  maxOutput: 8192,
198
- pricing: {
199
- input: 3.5,
200
- output: 10.5,
201
- },
202
145
  vision: true,
203
146
  },
204
147
  {
@@ -209,10 +152,6 @@ const OpenRouter: ModelProviderCard = {
209
152
  enabled: true,
210
153
  functionCall: true,
211
154
  id: 'deepseek/deepseek-chat',
212
- pricing: {
213
- input: 0.14,
214
- output: 0.28,
215
- },
216
155
  releasedAt: '2024-09-05',
217
156
  },
218
157
  {
@@ -222,10 +161,6 @@ const OpenRouter: ModelProviderCard = {
222
161
  enabled: true,
223
162
  functionCall: false,
224
163
  id: 'deepseek/deepseek-r1',
225
- pricing: {
226
- input: 3,
227
- output: 8,
228
- },
229
164
  releasedAt: '2025-01-20',
230
165
  },
231
166
  {
@@ -244,10 +179,6 @@ const OpenRouter: ModelProviderCard = {
244
179
  displayName: 'Llama 3.2 11B Vision',
245
180
  enabled: true,
246
181
  id: 'meta-llama/llama-3.2-11b-vision-instruct',
247
- pricing: {
248
- input: 0.162,
249
- output: 0.162,
250
- },
251
182
  vision: true,
252
183
  },
253
184
  {
@@ -257,10 +188,6 @@ const OpenRouter: ModelProviderCard = {
257
188
  displayName: 'Llama 3.2 90B Vision',
258
189
  enabled: true,
259
190
  id: 'meta-llama/llama-3.2-90b-vision-instruct',
260
- pricing: {
261
- input: 0.4,
262
- output: 0.4,
263
- },
264
191
  vision: true,
265
192
  },
266
193
  {
@@ -271,10 +198,6 @@ const OpenRouter: ModelProviderCard = {
271
198
  enabled: true,
272
199
  functionCall: true,
273
200
  id: 'meta-llama/llama-3.3-70b-instruct',
274
- pricing: {
275
- input: 0.12,
276
- output: 0.3,
277
- },
278
201
  },
279
202
  {
280
203
  contextWindowTokens: 32_768,
@@ -9,11 +9,6 @@ const PPIO: ModelProviderCard = {
9
9
  displayName: 'DeepSeek: DeepSeek R1 (community)',
10
10
  enabled: true,
11
11
  id: 'deepseek/deepseek-r1/community',
12
- pricing: {
13
- currency: 'CNY',
14
- input: 4,
15
- output: 16,
16
- },
17
12
  },
18
13
  {
19
14
  contextWindowTokens: 64_000,
@@ -22,11 +17,6 @@ const PPIO: ModelProviderCard = {
22
17
  displayName: 'DeepSeek: DeepSeek V3 (community)',
23
18
  enabled: true,
24
19
  id: 'deepseek/deepseek-v3/community',
25
- pricing: {
26
- currency: 'CNY',
27
- input: 1,
28
- output: 2,
29
- },
30
20
  },
31
21
  {
32
22
  contextWindowTokens: 64_000,
@@ -35,11 +25,6 @@ const PPIO: ModelProviderCard = {
35
25
  displayName: 'DeepSeek R1',
36
26
  enabled: true,
37
27
  id: 'deepseek/deepseek-r1',
38
- pricing: {
39
- currency: 'CNY',
40
- input: 4,
41
- output: 16,
42
- },
43
28
  },
44
29
  {
45
30
  contextWindowTokens: 64_000,
@@ -48,11 +33,6 @@ const PPIO: ModelProviderCard = {
48
33
  displayName: 'DeepSeek V3',
49
34
  enabled: true,
50
35
  id: 'deepseek/deepseek-v3',
51
- pricing: {
52
- currency: 'CNY',
53
- input: 1,
54
- output: 2,
55
- },
56
36
  },
57
37
  {
58
38
  contextWindowTokens: 32_000,
@@ -61,11 +41,6 @@ const PPIO: ModelProviderCard = {
61
41
  displayName: 'DeepSeek R1 Distill Llama 70B',
62
42
  enabled: true,
63
43
  id: 'deepseek/deepseek-r1-distill-llama-70b',
64
- pricing: {
65
- currency: 'CNY',
66
- input: 5.8,
67
- output: 5.8,
68
- },
69
44
  },
70
45
  {
71
46
  contextWindowTokens: 64_000,
@@ -74,11 +49,6 @@ const PPIO: ModelProviderCard = {
74
49
  displayName: 'DeepSeek: DeepSeek R1 Distill Qwen 32B',
75
50
  enabled: true,
76
51
  id: 'deepseek/deepseek-r1-distill-qwen-32b',
77
- pricing: {
78
- currency: 'CNY',
79
- input: 2.18,
80
- output: 2.18,
81
- },
82
52
  },
83
53
  {
84
54
  contextWindowTokens: 64_000,
@@ -87,11 +57,6 @@ const PPIO: ModelProviderCard = {
87
57
  displayName: 'DeepSeek: DeepSeek R1 Distill Qwen 14B',
88
58
  enabled: true,
89
59
  id: 'deepseek/deepseek-r1-distill-qwen-14b',
90
- pricing: {
91
- currency: 'CNY',
92
- input: 1,
93
- output: 1,
94
- },
95
60
  },
96
61
  {
97
62
  contextWindowTokens: 32_000,
@@ -100,11 +65,6 @@ const PPIO: ModelProviderCard = {
100
65
  displayName: 'DeepSeek: DeepSeek R1 Distill Llama 8B',
101
66
  enabled: true,
102
67
  id: 'deepseek/deepseek-r1-distill-llama-8b',
103
- pricing: {
104
- currency: 'CNY',
105
- input: 0.3,
106
- output: 0.3,
107
- },
108
68
  },
109
69
  {
110
70
  contextWindowTokens: 32_768,
@@ -113,11 +73,6 @@ const PPIO: ModelProviderCard = {
113
73
  displayName: 'qwen/qwen-2.5-72b-instruct',
114
74
  enabled: true,
115
75
  id: 'qwen/qwen-2.5-72b-instruct',
116
- pricing: {
117
- currency: 'CNY',
118
- input: 2.75,
119
- output: 2.88,
120
- },
121
76
  },
122
77
  {
123
78
  contextWindowTokens: 32_768,
@@ -126,11 +81,6 @@ const PPIO: ModelProviderCard = {
126
81
  displayName: 'qwen/qwen-2-vl-72b-instruct',
127
82
  enabled: true,
128
83
  id: 'qwen/qwen-2-vl-72b-instruct',
129
- pricing: {
130
- currency: 'CNY',
131
- input: 4.5,
132
- output: 4.5,
133
- },
134
84
  },
135
85
  {
136
86
  contextWindowTokens: 32_768,
@@ -138,11 +88,6 @@ const PPIO: ModelProviderCard = {
138
88
  displayName: 'meta-llama/llama-3.2-3b-instruct',
139
89
  enabled: true,
140
90
  id: 'meta-llama/llama-3.2-3b-instruct',
141
- pricing: {
142
- currency: 'CNY',
143
- input: 0.216,
144
- output: 0.36,
145
- },
146
91
  },
147
92
  {
148
93
  contextWindowTokens: 32_000,
@@ -151,11 +96,6 @@ const PPIO: ModelProviderCard = {
151
96
  displayName: 'qwen/qwen2.5-32b-instruct',
152
97
  enabled: true,
153
98
  id: 'qwen/qwen2.5-32b-instruct',
154
- pricing: {
155
- currency: 'CNY',
156
- input: 1.26,
157
- output: 1.26,
158
- },
159
99
  },
160
100
  {
161
101
  contextWindowTokens: 14_336,
@@ -164,11 +104,6 @@ const PPIO: ModelProviderCard = {
164
104
  displayName: 'baichuan/baichuan2-13b-chat',
165
105
  enabled: true,
166
106
  id: 'baichuan/baichuan2-13b-chat',
167
- pricing: {
168
- currency: 'CNY',
169
- input: 1.75,
170
- output: 1.75,
171
- },
172
107
  },
173
108
  {
174
109
  contextWindowTokens: 32_768,
@@ -177,11 +112,6 @@ const PPIO: ModelProviderCard = {
177
112
  displayName: 'meta-llama/llama-3.1-70b-instruct',
178
113
  enabled: true,
179
114
  id: 'meta-llama/llama-3.1-70b-instruct',
180
- pricing: {
181
- currency: 'CNY',
182
- input: 2.45,
183
- output: 2.82,
184
- },
185
115
  },
186
116
  {
187
117
  contextWindowTokens: 32_768,
@@ -190,11 +120,6 @@ const PPIO: ModelProviderCard = {
190
120
  displayName: 'meta-llama/llama-3.1-8b-instruct',
191
121
  enabled: true,
192
122
  id: 'meta-llama/llama-3.1-8b-instruct',
193
- pricing: {
194
- currency: 'CNY',
195
- input: 0.4,
196
- output: 0.4,
197
- },
198
123
  },
199
124
  {
200
125
  contextWindowTokens: 16_384,
@@ -203,11 +128,6 @@ const PPIO: ModelProviderCard = {
203
128
  displayName: '01-ai/yi-1.5-34b-chat',
204
129
  enabled: true,
205
130
  id: '01-ai/yi-1.5-34b-chat',
206
- pricing: {
207
- currency: 'CNY',
208
- input: 1.1,
209
- output: 1.1,
210
- },
211
131
  },
212
132
  {
213
133
  contextWindowTokens: 16_384,
@@ -216,11 +136,6 @@ const PPIO: ModelProviderCard = {
216
136
  displayName: '01-ai/yi-1.5-9b-chat',
217
137
  enabled: true,
218
138
  id: '01-ai/yi-1.5-9b-chat',
219
- pricing: {
220
- currency: 'CNY',
221
- input: 0.4,
222
- output: 0.4,
223
- },
224
139
  },
225
140
  {
226
141
  contextWindowTokens: 32_768,
@@ -228,11 +143,6 @@ const PPIO: ModelProviderCard = {
228
143
  displayName: 'thudm/glm-4-9b-chat',
229
144
  enabled: true,
230
145
  id: 'thudm/glm-4-9b-chat',
231
- pricing: {
232
- currency: 'CNY',
233
- input: 0.5,
234
- output: 0.5,
235
- },
236
146
  },
237
147
  {
238
148
  contextWindowTokens: 32_768,
@@ -241,11 +151,6 @@ const PPIO: ModelProviderCard = {
241
151
  displayName: 'qwen/qwen-2-7b-instruct',
242
152
  enabled: true,
243
153
  id: 'qwen/qwen-2-7b-instruct',
244
- pricing: {
245
- currency: 'CNY',
246
- input: 0.32,
247
- output: 0.32,
248
- },
249
154
  },
250
155
  ], // Will be updated with model list
251
156
  checkModel: 'deepseek/deepseek-r1-distill-qwen-32b',