@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.
Files changed (131) 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 +52 -0
  9. package/changelog/v1.json +14 -0
  10. package/locales/ar/models.json +21 -3
  11. package/locales/bg-BG/models.json +21 -3
  12. package/locales/de-DE/models.json +21 -3
  13. package/locales/en-US/models.json +21 -3
  14. package/locales/es-ES/models.json +21 -3
  15. package/locales/fa-IR/models.json +21 -3
  16. package/locales/fr-FR/models.json +21 -3
  17. package/locales/it-IT/models.json +21 -3
  18. package/locales/ja-JP/models.json +21 -3
  19. package/locales/ko-KR/models.json +21 -3
  20. package/locales/nl-NL/models.json +21 -3
  21. package/locales/pl-PL/models.json +21 -3
  22. package/locales/pt-BR/models.json +21 -3
  23. package/locales/ru-RU/models.json +21 -3
  24. package/locales/tr-TR/models.json +21 -3
  25. package/locales/vi-VN/models.json +21 -3
  26. package/locales/zh-CN/models.json +21 -3
  27. package/locales/zh-TW/models.json +21 -3
  28. package/package.json +1 -1
  29. package/packages/types/src/aiModel.ts +67 -46
  30. package/packages/types/src/hotkey.ts +2 -0
  31. package/packages/types/src/llm.ts +3 -3
  32. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/PinList/index.tsx +3 -3
  33. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.test.tsx +1 -0
  34. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/TopActions.tsx +11 -2
  35. package/src/app/[variants]/(main)/_layout/Desktop/SideBar/index.tsx +2 -2
  36. package/src/app/[variants]/(main)/chat/(workspace)/_layout/Desktop/ChatHeader/Main.tsx +2 -2
  37. package/src/app/[variants]/(main)/chat/_layout/Desktop/SessionPanel.tsx +2 -2
  38. package/src/app/[variants]/(main)/discover/(detail)/model/[...slugs]/features/Details/Overview/ProviderList/index.tsx +23 -12
  39. package/src/app/[variants]/(main)/discover/(detail)/provider/[...slugs]/features/Details/Overview/ModelList/index.tsx +23 -10
  40. package/src/app/[variants]/(main)/settings/provider/features/ModelList/ModelItem.tsx +21 -12
  41. package/src/components/Thinking/index.tsx +53 -13
  42. package/src/config/aiModels/ai21.ts +8 -4
  43. package/src/config/aiModels/ai360.ts +28 -14
  44. package/src/config/aiModels/aihubmix.ts +174 -86
  45. package/src/config/aiModels/anthropic.ts +97 -38
  46. package/src/config/aiModels/azure.ts +54 -32
  47. package/src/config/aiModels/azureai.ts +63 -37
  48. package/src/config/aiModels/baichuan.ts +24 -12
  49. package/src/config/aiModels/bedrock.ts +60 -30
  50. package/src/config/aiModels/cohere.ts +60 -30
  51. package/src/config/aiModels/deepseek.ts +10 -6
  52. package/src/config/aiModels/fireworksai.ts +88 -44
  53. package/src/config/aiModels/giteeai.ts +1 -1
  54. package/src/config/aiModels/github.ts +44 -26
  55. package/src/config/aiModels/google.ts +119 -68
  56. package/src/config/aiModels/groq.ts +48 -24
  57. package/src/config/aiModels/higress.ts +617 -310
  58. package/src/config/aiModels/hunyuan.ts +105 -54
  59. package/src/config/aiModels/infiniai.ts +104 -52
  60. package/src/config/aiModels/internlm.ts +16 -8
  61. package/src/config/aiModels/jina.ts +4 -2
  62. package/src/config/aiModels/minimax.ts +11 -10
  63. package/src/config/aiModels/mistral.ts +40 -20
  64. package/src/config/aiModels/moonshot.ts +42 -22
  65. package/src/config/aiModels/novita.ts +196 -98
  66. package/src/config/aiModels/openai.ts +270 -137
  67. package/src/config/aiModels/openrouter.ts +205 -100
  68. package/src/config/aiModels/perplexity.ts +36 -6
  69. package/src/config/aiModels/ppio.ts +76 -38
  70. package/src/config/aiModels/qwen.ts +257 -133
  71. package/src/config/aiModels/sambanova.ts +56 -28
  72. package/src/config/aiModels/sensenova.ts +100 -50
  73. package/src/config/aiModels/siliconcloud.ts +224 -112
  74. package/src/config/aiModels/stepfun.ts +44 -22
  75. package/src/config/aiModels/taichu.ts +8 -4
  76. package/src/config/aiModels/tencentcloud.ts +12 -6
  77. package/src/config/aiModels/upstage.ts +8 -4
  78. package/src/config/aiModels/v0.ts +15 -12
  79. package/src/config/aiModels/vertexai.ts +49 -27
  80. package/src/config/aiModels/volcengine.ts +110 -51
  81. package/src/config/aiModels/wenxin.ts +179 -73
  82. package/src/config/aiModels/xai.ts +33 -19
  83. package/src/config/aiModels/zeroone.ts +48 -24
  84. package/src/config/aiModels/zhipu.ts +118 -69
  85. package/src/config/modelProviders/ai21.ts +0 -8
  86. package/src/config/modelProviders/ai360.ts +0 -20
  87. package/src/config/modelProviders/anthropic.ts +0 -56
  88. package/src/config/modelProviders/baichuan.ts +0 -30
  89. package/src/config/modelProviders/bedrock.ts +0 -74
  90. package/src/config/modelProviders/deepseek.ts +0 -13
  91. package/src/config/modelProviders/fireworksai.ts +0 -88
  92. package/src/config/modelProviders/google.ts +0 -59
  93. package/src/config/modelProviders/groq.ts +0 -48
  94. package/src/config/modelProviders/higress.ts +0 -727
  95. package/src/config/modelProviders/hunyuan.ts +0 -45
  96. package/src/config/modelProviders/infiniai.ts +0 -60
  97. package/src/config/modelProviders/internlm.ts +0 -8
  98. package/src/config/modelProviders/mistral.ts +0 -48
  99. package/src/config/modelProviders/modelscope.ts +2 -1
  100. package/src/config/modelProviders/openai.ts +5 -100
  101. package/src/config/modelProviders/openrouter.ts +0 -77
  102. package/src/config/modelProviders/ppio.ts +0 -95
  103. package/src/config/modelProviders/qwen.ts +0 -165
  104. package/src/config/modelProviders/sensenova.ts +0 -45
  105. package/src/config/modelProviders/siliconcloud.ts +0 -266
  106. package/src/config/modelProviders/stepfun.ts +0 -60
  107. package/src/config/modelProviders/taichu.ts +0 -10
  108. package/src/config/modelProviders/wenxin.ts +0 -90
  109. package/src/config/modelProviders/xai.ts +0 -16
  110. package/src/config/modelProviders/zeroone.ts +0 -60
  111. package/src/config/modelProviders/zhipu.ts +0 -80
  112. package/src/const/hotkeys.ts +6 -0
  113. package/src/features/Conversation/Extras/Usage/UsageDetail/ModelCard.tsx +4 -3
  114. package/src/features/Conversation/Extras/Usage/UsageDetail/pricing.ts +25 -15
  115. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.test.ts +7 -5
  116. package/src/features/Conversation/Extras/Usage/UsageDetail/tokens.ts +6 -5
  117. package/src/hooks/useHotkeys/chatScope.ts +2 -2
  118. package/src/hooks/useHotkeys/globalScope.ts +16 -4
  119. package/src/hooks/usePinnedAgentState.ts +21 -0
  120. package/src/hooks/useSwitchSession.ts +1 -1
  121. package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.test.ts +54 -8
  122. package/src/locales/default/hotkey.ts +4 -0
  123. package/src/server/routers/lambda/agent.ts +2 -2
  124. package/src/server/routers/lambda/config/__snapshots__/index.test.ts.snap +0 -28
  125. package/src/server/services/discover/index.ts +7 -6
  126. package/src/server/services/user/index.ts +1 -2
  127. package/src/utils/__snapshots__/parseModels.test.ts.snap +28 -4
  128. package/src/utils/_deprecated/__snapshots__/parseModels.test.ts.snap +0 -8
  129. package/src/utils/parseModels.test.ts +60 -9
  130. package/src/utils/pricing.test.ts +183 -0
  131. package/src/utils/pricing.ts +90 -0
@@ -36,8 +36,10 @@ const bedrockChatModels: AIChatModelCard[] = [
36
36
  id: 'us.anthropic.claude-3-7-sonnet-20250219-v1:0',
37
37
  maxOutput: 8192,
38
38
  pricing: {
39
- input: 3,
40
- output: 15,
39
+ units: [
40
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
41
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
42
+ ],
41
43
  },
42
44
  releasedAt: '2025-02-24',
43
45
  type: 'chat',
@@ -55,8 +57,10 @@ const bedrockChatModels: AIChatModelCard[] = [
55
57
  id: 'anthropic.claude-3-5-sonnet-20241022-v2:0',
56
58
  maxOutput: 8192,
57
59
  pricing: {
58
- input: 3,
59
- output: 15,
60
+ units: [
61
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
62
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
63
+ ],
60
64
  },
61
65
  releasedAt: '2024-10-22',
62
66
  type: 'chat',
@@ -74,8 +78,10 @@ const bedrockChatModels: AIChatModelCard[] = [
74
78
  id: 'us.anthropic.claude-3-5-sonnet-20241022-v2:0',
75
79
  maxOutput: 8192,
76
80
  pricing: {
77
- input: 3,
78
- output: 15,
81
+ units: [
82
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
83
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
84
+ ],
79
85
  },
80
86
  releasedAt: '2024-10-22',
81
87
  type: 'chat',
@@ -93,8 +99,10 @@ const bedrockChatModels: AIChatModelCard[] = [
93
99
  id: 'anthropic.claude-3-5-sonnet-20240620-v1:0',
94
100
  maxOutput: 8192,
95
101
  pricing: {
96
- input: 3,
97
- output: 15,
102
+ units: [
103
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
104
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
105
+ ],
98
106
  },
99
107
  releasedAt: '2024-06-20',
100
108
  type: 'chat',
@@ -112,8 +120,10 @@ const bedrockChatModels: AIChatModelCard[] = [
112
120
  id: 'anthropic.claude-3-haiku-20240307-v1:0',
113
121
  maxOutput: 4096,
114
122
  pricing: {
115
- input: 0.25,
116
- output: 1.25,
123
+ units: [
124
+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
125
+ { name: 'textOutput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
126
+ ],
117
127
  },
118
128
  releasedAt: '2024-03-07',
119
129
  type: 'chat',
@@ -130,8 +140,10 @@ const bedrockChatModels: AIChatModelCard[] = [
130
140
  enabled: true,
131
141
  id: 'anthropic.claude-3-sonnet-20240229-v1:0',
132
142
  pricing: {
133
- input: 3,
134
- output: 15,
143
+ units: [
144
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
145
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
146
+ ],
135
147
  },
136
148
  type: 'chat',
137
149
  },
@@ -147,8 +159,10 @@ const bedrockChatModels: AIChatModelCard[] = [
147
159
  id: 'anthropic.claude-3-opus-20240229-v1:0',
148
160
  maxOutput: 4096,
149
161
  pricing: {
150
- input: 15,
151
- output: 75,
162
+ units: [
163
+ { name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
164
+ { name: 'textOutput', rate: 75, strategy: 'fixed', unit: 'millionTokens' },
165
+ ],
152
166
  },
153
167
  releasedAt: '2024-02-29',
154
168
  type: 'chat',
@@ -160,8 +174,10 @@ const bedrockChatModels: AIChatModelCard[] = [
160
174
  displayName: 'Claude 2.1',
161
175
  id: 'anthropic.claude-v2:1',
162
176
  pricing: {
163
- input: 8,
164
- output: 24,
177
+ units: [
178
+ { name: 'textInput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
179
+ { name: 'textOutput', rate: 24, strategy: 'fixed', unit: 'millionTokens' },
180
+ ],
165
181
  },
166
182
  type: 'chat',
167
183
  },
@@ -172,8 +188,10 @@ const bedrockChatModels: AIChatModelCard[] = [
172
188
  displayName: 'Claude 2.0',
173
189
  id: 'anthropic.claude-v2',
174
190
  pricing: {
175
- input: 8,
176
- output: 24,
191
+ units: [
192
+ { name: 'textInput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
193
+ { name: 'textOutput', rate: 24, strategy: 'fixed', unit: 'millionTokens' },
194
+ ],
177
195
  },
178
196
  type: 'chat',
179
197
  },
@@ -184,8 +202,10 @@ const bedrockChatModels: AIChatModelCard[] = [
184
202
  displayName: 'Claude Instant',
185
203
  id: 'anthropic.claude-instant-v1',
186
204
  pricing: {
187
- input: 0.8,
188
- output: 2.4,
205
+ units: [
206
+ { name: 'textInput', rate: 0.8, strategy: 'fixed', unit: 'millionTokens' },
207
+ { name: 'textOutput', rate: 2.4, strategy: 'fixed', unit: 'millionTokens' },
208
+ ],
189
209
  },
190
210
  type: 'chat',
191
211
  },
@@ -200,8 +220,10 @@ const bedrockChatModels: AIChatModelCard[] = [
200
220
  enabled: true,
201
221
  id: 'meta.llama3-1-8b-instruct-v1:0',
202
222
  pricing: {
203
- input: 0.22,
204
- output: 0.22,
223
+ units: [
224
+ { name: 'textInput', rate: 0.22, strategy: 'fixed', unit: 'millionTokens' },
225
+ { name: 'textOutput', rate: 0.22, strategy: 'fixed', unit: 'millionTokens' },
226
+ ],
205
227
  },
206
228
  type: 'chat',
207
229
  },
@@ -216,8 +238,10 @@ const bedrockChatModels: AIChatModelCard[] = [
216
238
  enabled: true,
217
239
  id: 'meta.llama3-1-70b-instruct-v1:0',
218
240
  pricing: {
219
- input: 0.99,
220
- output: 0.99,
241
+ units: [
242
+ { name: 'textInput', rate: 0.99, strategy: 'fixed', unit: 'millionTokens' },
243
+ { name: 'textOutput', rate: 0.99, strategy: 'fixed', unit: 'millionTokens' },
244
+ ],
221
245
  },
222
246
  type: 'chat',
223
247
  },
@@ -232,8 +256,10 @@ const bedrockChatModels: AIChatModelCard[] = [
232
256
  enabled: true,
233
257
  id: 'meta.llama3-1-405b-instruct-v1:0',
234
258
  pricing: {
235
- input: 5.32,
236
- output: 16,
259
+ units: [
260
+ { name: 'textInput', rate: 5.32, strategy: 'fixed', unit: 'millionTokens' },
261
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
262
+ ],
237
263
  },
238
264
  type: 'chat',
239
265
  },
@@ -244,8 +270,10 @@ const bedrockChatModels: AIChatModelCard[] = [
244
270
  displayName: 'Llama 3 8B Instruct',
245
271
  id: 'meta.llama3-8b-instruct-v1:0',
246
272
  pricing: {
247
- input: 0.3,
248
- output: 0.6,
273
+ units: [
274
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
275
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
276
+ ],
249
277
  },
250
278
  type: 'chat',
251
279
  },
@@ -256,8 +284,10 @@ const bedrockChatModels: AIChatModelCard[] = [
256
284
  displayName: 'Llama 3 70B Instruct',
257
285
  id: 'meta.llama3-70b-instruct-v1:0',
258
286
  pricing: {
259
- input: 2.65,
260
- output: 3.5,
287
+ units: [
288
+ { name: 'textInput', rate: 2.65, strategy: 'fixed', unit: 'millionTokens' },
289
+ { name: 'textOutput', rate: 3.5, strategy: 'fixed', unit: 'millionTokens' },
290
+ ],
261
291
  },
262
292
  type: 'chat',
263
293
  },
@@ -13,8 +13,10 @@ const cohereChatModels: AIChatModelCard[] = [
13
13
  id: 'command-a-03-2025',
14
14
  maxOutput: 8000,
15
15
  pricing: {
16
- input: 2.5,
17
- output: 10,
16
+ units: [
17
+ { name: 'textInput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
18
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
19
+ ],
18
20
  },
19
21
  type: 'chat',
20
22
  },
@@ -29,8 +31,10 @@ const cohereChatModels: AIChatModelCard[] = [
29
31
  id: 'command-r-plus-04-2024',
30
32
  maxOutput: 4000,
31
33
  pricing: {
32
- input: 3,
33
- output: 15,
34
+ units: [
35
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
36
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
37
+ ],
34
38
  },
35
39
  type: 'chat',
36
40
  },
@@ -46,8 +50,10 @@ const cohereChatModels: AIChatModelCard[] = [
46
50
  id: 'command-r-plus-08-2024',
47
51
  maxOutput: 4000,
48
52
  pricing: {
49
- input: 2.5,
50
- output: 10,
53
+ units: [
54
+ { name: 'textInput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
55
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
56
+ ],
51
57
  },
52
58
  type: 'chat',
53
59
  },
@@ -62,8 +68,10 @@ const cohereChatModels: AIChatModelCard[] = [
62
68
  id: 'command-r-03-2024',
63
69
  maxOutput: 4000,
64
70
  pricing: {
65
- input: 0.15,
66
- output: 0.6,
71
+ units: [
72
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
73
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
74
+ ],
67
75
  },
68
76
  type: 'chat',
69
77
  },
@@ -78,8 +86,10 @@ const cohereChatModels: AIChatModelCard[] = [
78
86
  id: 'command-r-08-2024',
79
87
  maxOutput: 4000,
80
88
  pricing: {
81
- input: 0.15,
82
- output: 0.6,
89
+ units: [
90
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
91
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
92
+ ],
83
93
  },
84
94
  type: 'chat',
85
95
  },
@@ -94,8 +104,10 @@ const cohereChatModels: AIChatModelCard[] = [
94
104
  id: 'command-r-03-2024',
95
105
  maxOutput: 4000,
96
106
  pricing: {
97
- input: 0.5,
98
- output: 1.5,
107
+ units: [
108
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
109
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
110
+ ],
99
111
  },
100
112
  type: 'chat',
101
113
  },
@@ -110,8 +122,10 @@ const cohereChatModels: AIChatModelCard[] = [
110
122
  id: 'command-r7b-12-2024',
111
123
  maxOutput: 4000,
112
124
  pricing: {
113
- input: 0.0375,
114
- output: 0.15,
125
+ units: [
126
+ { name: 'textInput', rate: 0.0375, strategy: 'fixed', unit: 'millionTokens' },
127
+ { name: 'textOutput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
128
+ ],
115
129
  },
116
130
  type: 'chat',
117
131
  },
@@ -123,8 +137,10 @@ const cohereChatModels: AIChatModelCard[] = [
123
137
  id: 'command',
124
138
  maxOutput: 4000,
125
139
  pricing: {
126
- input: 1,
127
- output: 2,
140
+ units: [
141
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
142
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
143
+ ],
128
144
  },
129
145
  type: 'chat',
130
146
  },
@@ -139,8 +155,10 @@ const cohereChatModels: AIChatModelCard[] = [
139
155
  id: 'command-nightly',
140
156
  maxOutput: 4000,
141
157
  pricing: {
142
- input: 1,
143
- output: 2,
158
+ units: [
159
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
160
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
161
+ ],
144
162
  },
145
163
  type: 'chat',
146
164
  },
@@ -151,8 +169,10 @@ const cohereChatModels: AIChatModelCard[] = [
151
169
  id: 'command-light',
152
170
  maxOutput: 4000,
153
171
  pricing: {
154
- input: 0.3,
155
- output: 0.6,
172
+ units: [
173
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
174
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
175
+ ],
156
176
  },
157
177
  type: 'chat',
158
178
  },
@@ -164,8 +184,10 @@ const cohereChatModels: AIChatModelCard[] = [
164
184
  id: 'command-light-nightly',
165
185
  maxOutput: 4000,
166
186
  pricing: {
167
- input: 0.3,
168
- output: 0.6,
187
+ units: [
188
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
189
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
190
+ ],
169
191
  },
170
192
  type: 'chat',
171
193
  },
@@ -178,8 +200,10 @@ const cohereChatModels: AIChatModelCard[] = [
178
200
  id: 'c4ai-aya-expanse-32b',
179
201
  maxOutput: 4000,
180
202
  pricing: {
181
- input: 0.5,
182
- output: 1.5,
203
+ units: [
204
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
205
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
206
+ ],
183
207
  },
184
208
  type: 'chat',
185
209
  },
@@ -192,8 +216,10 @@ const cohereChatModels: AIChatModelCard[] = [
192
216
  id: 'c4ai-aya-expanse-8b',
193
217
  maxOutput: 4000,
194
218
  pricing: {
195
- input: 0.5,
196
- output: 1.5,
219
+ units: [
220
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
221
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
222
+ ],
197
223
  },
198
224
  type: 'chat',
199
225
  },
@@ -209,8 +235,10 @@ const cohereChatModels: AIChatModelCard[] = [
209
235
  id: 'c4ai-aya-vision-32b',
210
236
  maxOutput: 4000,
211
237
  pricing: {
212
- input: 0.5,
213
- output: 1.5,
238
+ units: [
239
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
240
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
241
+ ],
214
242
  },
215
243
  type: 'chat',
216
244
  },
@@ -226,8 +254,10 @@ const cohereChatModels: AIChatModelCard[] = [
226
254
  id: 'c4ai-aya-vision-8b',
227
255
  maxOutput: 4000,
228
256
  pricing: {
229
- input: 0.5,
230
- output: 1.5,
257
+ units: [
258
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
259
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
260
+ ],
231
261
  },
232
262
  type: 'chat',
233
263
  },
@@ -14,10 +14,12 @@ const deepseekChatModels: AIChatModelCard[] = [
14
14
  id: 'deepseek-chat',
15
15
  maxOutput: 8192,
16
16
  pricing: {
17
- cachedInput: 0.5,
18
17
  currency: 'CNY',
19
- input: 2,
20
- output: 8,
18
+ units: [
19
+ { name: 'textInput_cacheRead', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
20
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
21
+ { name: 'textOutput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
22
+ ],
21
23
  },
22
24
  releasedAt: '2025-03-24',
23
25
  type: 'chat',
@@ -35,10 +37,12 @@ const deepseekChatModels: AIChatModelCard[] = [
35
37
  id: 'deepseek-reasoner',
36
38
  maxOutput: 8192,
37
39
  pricing: {
38
- cachedInput: 1,
39
40
  currency: 'CNY',
40
- input: 4,
41
- output: 16,
41
+ units: [
42
+ { name: 'textInput_cacheRead', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
43
+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
44
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
45
+ ],
42
46
  },
43
47
  releasedAt: '2025-05-28',
44
48
  type: 'chat',