@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
@@ -18,8 +18,10 @@ const stepfunChatModels: AIChatModelCard[] = [
18
18
  id: 'step-r1-v-mini',
19
19
  pricing: {
20
20
  currency: 'CNY',
21
- input: 2.5,
22
- output: 8,
21
+ units: [
22
+ { name: 'textInput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
23
+ { name: 'textOutput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
24
+ ],
23
25
  },
24
26
  // settings: {
25
27
  // searchImpl: 'params',
@@ -37,8 +39,10 @@ const stepfunChatModels: AIChatModelCard[] = [
37
39
  id: 'step-1-8k',
38
40
  pricing: {
39
41
  currency: 'CNY',
40
- input: 5,
41
- output: 20,
42
+ units: [
43
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
44
+ { name: 'textOutput', rate: 20, strategy: 'fixed', unit: 'millionTokens' },
45
+ ],
42
46
  },
43
47
  settings: {
44
48
  searchImpl: 'params',
@@ -56,8 +60,10 @@ const stepfunChatModels: AIChatModelCard[] = [
56
60
  id: 'step-1-32k',
57
61
  pricing: {
58
62
  currency: 'CNY',
59
- input: 15,
60
- output: 70,
63
+ units: [
64
+ { name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
65
+ { name: 'textOutput', rate: 70, strategy: 'fixed', unit: 'millionTokens' },
66
+ ],
61
67
  },
62
68
  settings: {
63
69
  searchImpl: 'params',
@@ -75,8 +81,10 @@ const stepfunChatModels: AIChatModelCard[] = [
75
81
  id: 'step-1-256k',
76
82
  pricing: {
77
83
  currency: 'CNY',
78
- input: 95,
79
- output: 300,
84
+ units: [
85
+ { name: 'textInput', rate: 95, strategy: 'fixed', unit: 'millionTokens' },
86
+ { name: 'textOutput', rate: 300, strategy: 'fixed', unit: 'millionTokens' },
87
+ ],
80
88
  },
81
89
  settings: {
82
90
  searchImpl: 'params',
@@ -96,8 +104,10 @@ const stepfunChatModels: AIChatModelCard[] = [
96
104
  id: 'step-2-mini',
97
105
  pricing: {
98
106
  currency: 'CNY',
99
- input: 1,
100
- output: 2,
107
+ units: [
108
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
109
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
110
+ ],
101
111
  },
102
112
  releasedAt: '2025-01-14',
103
113
  settings: {
@@ -116,8 +126,10 @@ const stepfunChatModels: AIChatModelCard[] = [
116
126
  id: 'step-2-16k',
117
127
  pricing: {
118
128
  currency: 'CNY',
119
- input: 38,
120
- output: 120,
129
+ units: [
130
+ { name: 'textInput', rate: 38, strategy: 'fixed', unit: 'millionTokens' },
131
+ { name: 'textOutput', rate: 120, strategy: 'fixed', unit: 'millionTokens' },
132
+ ],
121
133
  },
122
134
  settings: {
123
135
  searchImpl: 'params',
@@ -136,8 +148,10 @@ const stepfunChatModels: AIChatModelCard[] = [
136
148
  id: 'step-2-16k-exp',
137
149
  pricing: {
138
150
  currency: 'CNY',
139
- input: 38,
140
- output: 120,
151
+ units: [
152
+ { name: 'textInput', rate: 38, strategy: 'fixed', unit: 'millionTokens' },
153
+ { name: 'textOutput', rate: 120, strategy: 'fixed', unit: 'millionTokens' },
154
+ ],
141
155
  },
142
156
  releasedAt: '2025-01-15',
143
157
  settings: {
@@ -157,8 +171,10 @@ const stepfunChatModels: AIChatModelCard[] = [
157
171
  id: 'step-1v-8k',
158
172
  pricing: {
159
173
  currency: 'CNY',
160
- input: 5,
161
- output: 20,
174
+ units: [
175
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
176
+ { name: 'textOutput', rate: 20, strategy: 'fixed', unit: 'millionTokens' },
177
+ ],
162
178
  },
163
179
  settings: {
164
180
  searchImpl: 'params',
@@ -177,8 +193,10 @@ const stepfunChatModels: AIChatModelCard[] = [
177
193
  id: 'step-1v-32k',
178
194
  pricing: {
179
195
  currency: 'CNY',
180
- input: 15,
181
- output: 70,
196
+ units: [
197
+ { name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
198
+ { name: 'textOutput', rate: 70, strategy: 'fixed', unit: 'millionTokens' },
199
+ ],
182
200
  },
183
201
  settings: {
184
202
  searchImpl: 'params',
@@ -196,8 +214,10 @@ const stepfunChatModels: AIChatModelCard[] = [
196
214
  id: 'step-1o-vision-32k',
197
215
  pricing: {
198
216
  currency: 'CNY',
199
- input: 15,
200
- output: 70,
217
+ units: [
218
+ { name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
219
+ { name: 'textOutput', rate: 70, strategy: 'fixed', unit: 'millionTokens' },
220
+ ],
201
221
  },
202
222
  releasedAt: '2025-01-22',
203
223
  type: 'chat',
@@ -214,8 +234,10 @@ const stepfunChatModels: AIChatModelCard[] = [
214
234
  id: 'step-1o-turbo-vision',
215
235
  pricing: {
216
236
  currency: 'CNY',
217
- input: 8,
218
- output: 35,
237
+ units: [
238
+ { name: 'textInput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
239
+ { name: 'textOutput', rate: 35, strategy: 'fixed', unit: 'millionTokens' },
240
+ ],
219
241
  },
220
242
  releasedAt: '2025-02-14',
221
243
  type: 'chat',
@@ -26,8 +26,10 @@ const taichuChatModels: AIChatModelCard[] = [
26
26
  id: 'taichu_llm',
27
27
  pricing: {
28
28
  currency: 'CNY',
29
- input: 2,
30
- output: 2,
29
+ units: [
30
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
31
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
32
+ ],
31
33
  },
32
34
  type: 'chat',
33
35
  },
@@ -42,8 +44,10 @@ const taichuChatModels: AIChatModelCard[] = [
42
44
  id: 'taichu_vl',
43
45
  pricing: {
44
46
  currency: 'CNY',
45
- input: 5,
46
- output: 5,
47
+ units: [
48
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
49
+ { name: 'textOutput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
50
+ ],
47
51
  },
48
52
  type: 'chat',
49
53
  },
@@ -15,8 +15,10 @@ const tencentCloudChatModels: AIChatModelCard[] = [
15
15
  maxOutput: 16_000,
16
16
  pricing: {
17
17
  currency: 'CNY',
18
- input: 4,
19
- output: 16,
18
+ units: [
19
+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
20
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
21
+ ],
20
22
  },
21
23
  type: 'chat',
22
24
  },
@@ -30,8 +32,10 @@ const tencentCloudChatModels: AIChatModelCard[] = [
30
32
  maxOutput: 16_000,
31
33
  pricing: {
32
34
  currency: 'CNY',
33
- input: 2,
34
- output: 8,
35
+ units: [
36
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
37
+ { name: 'textOutput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
38
+ ],
35
39
  },
36
40
  type: 'chat',
37
41
  },
@@ -43,8 +47,10 @@ const tencentCloudChatModels: AIChatModelCard[] = [
43
47
  maxOutput: 16_000,
44
48
  pricing: {
45
49
  currency: 'CNY',
46
- input: 2,
47
- output: 8,
50
+ units: [
51
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
52
+ { name: 'textOutput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
53
+ ],
48
54
  },
49
55
  type: 'chat',
50
56
  },
@@ -11,8 +11,10 @@ const upstageChatModels: AIChatModelCard[] = [
11
11
  enabled: true,
12
12
  id: 'solar-pro',
13
13
  pricing: {
14
- input: 0.25,
15
- output: 0.25,
14
+ units: [
15
+ { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
16
+ { name: 'textOutput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
17
+ ],
16
18
  },
17
19
  releasedAt: '2024-11-26',
18
20
  type: 'chat',
@@ -28,8 +30,10 @@ const upstageChatModels: AIChatModelCard[] = [
28
30
  enabled: true,
29
31
  id: 'solar-mini',
30
32
  pricing: {
31
- input: 0.15,
32
- output: 0.15,
33
+ units: [
34
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
35
+ { name: 'textOutput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
36
+ ],
33
37
  },
34
38
  releasedAt: '2025-01-23',
35
39
  type: 'chat',
@@ -8,15 +8,16 @@ const v0ChatModels: AIChatModelCard[] = [
8
8
  vision: true,
9
9
  },
10
10
  contextWindowTokens: 512_000,
11
- description:
12
- 'v0-1.5-lg 模型适用于高级思考或推理任务',
11
+ description: 'v0-1.5-lg 模型适用于高级思考或推理任务',
13
12
  displayName: 'v0-1.5-lg',
14
13
  enabled: true,
15
14
  id: 'v0-1.5-lg',
16
15
  maxOutput: 32_000,
17
16
  pricing: {
18
- input: 15,
19
- output: 75,
17
+ units: [
18
+ { name: 'textInput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
19
+ { name: 'textOutput', rate: 75, strategy: 'fixed', unit: 'millionTokens' },
20
+ ],
20
21
  },
21
22
  type: 'chat',
22
23
  },
@@ -27,15 +28,16 @@ const v0ChatModels: AIChatModelCard[] = [
27
28
  vision: true,
28
29
  },
29
30
  contextWindowTokens: 128_000,
30
- description:
31
- 'v0-1.5-md 模型适用于日常任务和用户界面(UI)生成',
31
+ description: 'v0-1.5-md 模型适用于日常任务和用户界面(UI)生成',
32
32
  displayName: 'v0-1.5-md',
33
33
  enabled: true,
34
34
  id: 'v0-1.5-md',
35
35
  maxOutput: 32_000,
36
36
  pricing: {
37
- input: 3,
38
- output: 15,
37
+ units: [
38
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
39
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
40
+ ],
39
41
  },
40
42
  type: 'chat',
41
43
  },
@@ -45,14 +47,15 @@ const v0ChatModels: AIChatModelCard[] = [
45
47
  vision: true,
46
48
  },
47
49
  contextWindowTokens: 128_000,
48
- description:
49
- 'v0-1.0-md 模型是通过 v0 API 提供服务的旧版模型',
50
+ description: 'v0-1.0-md 模型是通过 v0 API 提供服务的旧版模型',
50
51
  displayName: 'v0-1.0-md',
51
52
  id: 'v0-1.0-md',
52
53
  maxOutput: 32_000,
53
54
  pricing: {
54
- input: 3,
55
- output: 15,
55
+ units: [
56
+ { name: 'textInput', rate: 3, strategy: 'fixed', unit: 'millionTokens' },
57
+ { name: 'textOutput', rate: 15, strategy: 'fixed', unit: 'millionTokens' },
58
+ ],
56
59
  },
57
60
  type: 'chat',
58
61
  },
@@ -17,9 +17,11 @@ const vertexaiChatModels: AIChatModelCard[] = [
17
17
  id: 'gemini-2.5-pro',
18
18
  maxOutput: 65_536,
19
19
  pricing: {
20
- cachedInput: 0.31, // prompts <= 200k tokens
21
- input: 1.25, // prompts <= 200k tokens
22
- output: 10, // prompts <= 200k tokens
20
+ units: [
21
+ { name: 'textInput_cacheRead', rate: 0.31, strategy: 'fixed', unit: 'millionTokens' },
22
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
23
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
24
+ ],
23
25
  },
24
26
  releasedAt: '2025-06-17',
25
27
  settings: {
@@ -42,8 +44,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
42
44
  id: 'gemini-2.5-pro-preview-05-06',
43
45
  maxOutput: 65_536,
44
46
  pricing: {
45
- input: 1.25, // prompts <= 200k tokens
46
- output: 10, // prompts <= 200k tokens
47
+ units: [
48
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
49
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
50
+ ],
47
51
  },
48
52
  releasedAt: '2025-05-06',
49
53
  type: 'chat',
@@ -61,8 +65,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
61
65
  id: 'gemini-2.5-pro-preview-03-25',
62
66
  maxOutput: 65_536,
63
67
  pricing: {
64
- input: 1.25, // prompts <= 200k tokens
65
- output: 10, // prompts <= 200k tokens
68
+ units: [
69
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
70
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
71
+ ],
66
72
  },
67
73
  releasedAt: '2025-04-09',
68
74
  type: 'chat',
@@ -81,9 +87,11 @@ const vertexaiChatModels: AIChatModelCard[] = [
81
87
  id: 'gemini-2.5-flash',
82
88
  maxOutput: 65_536,
83
89
  pricing: {
84
- cachedInput: 0.075,
85
- input: 0.3,
86
- output: 2.5,
90
+ units: [
91
+ { name: 'textInput_cacheRead', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },
92
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
93
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
94
+ ],
87
95
  },
88
96
  releasedAt: '2025-06-17',
89
97
  settings: {
@@ -105,8 +113,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
105
113
  id: 'gemini-2.5-flash-preview-04-17',
106
114
  maxOutput: 65_536,
107
115
  pricing: {
108
- input: 0.15,
109
- output: 3.5, // Thinking
116
+ units: [
117
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
118
+ { name: 'textOutput', rate: 3.5, strategy: 'fixed', unit: 'millionTokens' },
119
+ ],
110
120
  },
111
121
  releasedAt: '2025-04-17',
112
122
  type: 'chat',
@@ -125,9 +135,11 @@ const vertexaiChatModels: AIChatModelCard[] = [
125
135
  id: 'gemini-2.5-flash-lite',
126
136
  maxOutput: 64_000,
127
137
  pricing: {
128
- cachedInput: 0.025,
129
- input: 0.1,
130
- output: 0.4,
138
+ units: [
139
+ { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
140
+ { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
141
+ { name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
142
+ ],
131
143
  },
132
144
  releasedAt: '2025-07-22',
133
145
  settings: {
@@ -150,8 +162,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
150
162
  id: 'gemini-2.5-flash-lite-preview-06-17',
151
163
  maxOutput: 64_000,
152
164
  pricing: {
153
- input: 0.1,
154
- output: 0.4,
165
+ units: [
166
+ { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
167
+ { name: 'textOutput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
168
+ ],
155
169
  },
156
170
  releasedAt: '2025-06-17',
157
171
  settings: {
@@ -172,9 +186,11 @@ const vertexaiChatModels: AIChatModelCard[] = [
172
186
  id: 'gemini-2.0-flash',
173
187
  maxOutput: 8192,
174
188
  pricing: {
175
- cachedInput: 0.0375,
176
- input: 0.15,
177
- output: 0.6,
189
+ units: [
190
+ { name: 'textInput_cacheRead', rate: 0.0375, strategy: 'fixed', unit: 'millionTokens' },
191
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
192
+ { name: 'textOutput', rate: 0.6, strategy: 'fixed', unit: 'millionTokens' },
193
+ ],
178
194
  },
179
195
  releasedAt: '2025-02-05',
180
196
  type: 'chat',
@@ -190,9 +206,11 @@ const vertexaiChatModels: AIChatModelCard[] = [
190
206
  id: 'gemini-2.0-flash-lite',
191
207
  maxOutput: 8192,
192
208
  pricing: {
193
- cachedInput: 0.018_75,
194
- input: 0.075,
195
- output: 0.3,
209
+ units: [
210
+ { name: 'textInput_cacheRead', rate: 0.018, strategy: 'fixed', unit: 'millionTokens' },
211
+ { name: 'textInput', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },
212
+ { name: 'textOutput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
213
+ ],
196
214
  },
197
215
  releasedAt: '2025-02-05',
198
216
  type: 'chat',
@@ -208,8 +226,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
208
226
  id: 'gemini-1.5-flash-002',
209
227
  maxOutput: 8192,
210
228
  pricing: {
211
- input: 0.075,
212
- output: 0.3,
229
+ units: [
230
+ { name: 'textInput', rate: 0.075, strategy: 'fixed', unit: 'millionTokens' },
231
+ { name: 'textOutput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
232
+ ],
213
233
  },
214
234
  releasedAt: '2024-09-25',
215
235
  type: 'chat',
@@ -226,8 +246,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
226
246
  id: 'gemini-1.5-pro-002',
227
247
  maxOutput: 8192,
228
248
  pricing: {
229
- input: 1.25,
230
- output: 2.5,
249
+ units: [
250
+ { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
251
+ { name: 'textOutput', rate: 2.5, strategy: 'fixed', unit: 'millionTokens' },
252
+ ],
231
253
  },
232
254
  releasedAt: '2024-09-24',
233
255
  type: 'chat',