@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
@@ -14,8 +14,10 @@ const internlmChatModels: AIChatModelCard[] = [
14
14
  enabled: true,
15
15
  id: 'internlm3-latest',
16
16
  pricing: {
17
- input: 0,
18
- output: 0,
17
+ units: [
18
+ { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
19
+ { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
20
+ ],
19
21
  },
20
22
  type: 'chat',
21
23
  },
@@ -29,8 +31,10 @@ const internlmChatModels: AIChatModelCard[] = [
29
31
  displayName: 'InternLM2.5',
30
32
  id: 'internlm2.5-latest',
31
33
  pricing: {
32
- input: 0,
33
- output: 0,
34
+ units: [
35
+ { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
36
+ { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
37
+ ],
34
38
  },
35
39
  type: 'chat',
36
40
  },
@@ -45,8 +49,10 @@ const internlmChatModels: AIChatModelCard[] = [
45
49
  enabled: true,
46
50
  id: 'internvl3-latest',
47
51
  pricing: {
48
- input: 0,
49
- output: 0,
52
+ units: [
53
+ { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
54
+ { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
55
+ ],
50
56
  },
51
57
  type: 'chat',
52
58
  },
@@ -60,8 +66,10 @@ const internlmChatModels: AIChatModelCard[] = [
60
66
  displayName: 'InternVL2.5',
61
67
  id: 'internvl2.5-latest',
62
68
  pricing: {
63
- input: 0,
64
- output: 0,
69
+ units: [
70
+ { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
71
+ { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
72
+ ],
65
73
  },
66
74
  type: 'chat',
67
75
  },
@@ -13,8 +13,10 @@ const jinaChatModels: AIChatModelCard[] = [
13
13
  enabled: true,
14
14
  id: 'jina-deepsearch-v1',
15
15
  pricing: {
16
- input: 0.02,
17
- output: 0.02,
16
+ units: [
17
+ { name: 'textInput', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },
18
+ { name: 'textOutput', rate: 0.02, strategy: 'fixed', unit: 'millionTokens' },
19
+ ],
18
20
  },
19
21
  settings: {
20
22
  searchImpl: 'internal',
@@ -8,16 +8,17 @@ const minimaxChatModels: AIChatModelCard[] = [
8
8
  search: true,
9
9
  },
10
10
  contextWindowTokens: 1_000_192,
11
- description:
12
- '全新自研推理模型。全球领先:80K思维链 x 1M输入,效果比肩海外顶尖模型。',
11
+ description: '全新自研推理模型。全球领先:80K思维链 x 1M输入,效果比肩海外顶尖模型。',
13
12
  displayName: 'MiniMax-M1',
14
13
  enabled: true,
15
14
  id: 'MiniMax-M1',
16
15
  maxOutput: 40_000,
17
16
  pricing: {
18
17
  currency: 'CNY',
19
- input: 1.2, // 输入长度 32-128k
20
- output: 16,
18
+ units: [
19
+ { name: 'textInput', rate: 1.2, strategy: 'fixed', unit: 'millionTokens' },
20
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
21
+ ],
21
22
  },
22
23
  releasedAt: '2025-06-16',
23
24
  settings: {
@@ -40,8 +41,10 @@ const minimaxChatModels: AIChatModelCard[] = [
40
41
  maxOutput: 40_000,
41
42
  pricing: {
42
43
  currency: 'CNY',
43
- input: 1,
44
- output: 8,
44
+ units: [
45
+ { name: 'textInput', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
46
+ { name: 'textOutput', rate: 8, strategy: 'fixed', unit: 'millionTokens' },
47
+ ],
45
48
  },
46
49
  releasedAt: '2025-01-15',
47
50
  settings: {
@@ -53,8 +56,7 @@ const minimaxChatModels: AIChatModelCard[] = [
53
56
 
54
57
  const minimaxImageModels: AIImageModelCard[] = [
55
58
  {
56
- description:
57
- '全新图像生成模型,画面表现细腻,支持文生图、图生图',
59
+ description: '全新图像生成模型,画面表现细腻,支持文生图、图生图',
58
60
  displayName: 'Image 01',
59
61
  enabled: true,
60
62
  id: 'image-01',
@@ -72,8 +74,7 @@ const minimaxImageModels: AIImageModelCard[] = [
72
74
  type: 'image',
73
75
  },
74
76
  {
75
- description:
76
- '图像生成模型,画面表现细腻,支持文生图并进行画风设置',
77
+ description: '图像生成模型,画面表现细腻,支持文生图并进行画风设置',
77
78
  displayName: 'Image 01 Live',
78
79
  enabled: true,
79
80
  id: 'image-01-live',
@@ -14,8 +14,10 @@ const mistralChatModels: AIChatModelCard[] = [
14
14
  enabled: true,
15
15
  id: 'mistral-medium-latest',
16
16
  pricing: {
17
- input: 0.4,
18
- output: 2,
17
+ units: [
18
+ { name: 'textInput', rate: 0.4, strategy: 'fixed', unit: 'millionTokens' },
19
+ { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
20
+ ],
19
21
  },
20
22
  type: 'chat',
21
23
  },
@@ -29,8 +31,10 @@ const mistralChatModels: AIChatModelCard[] = [
29
31
  displayName: 'Mistral Nemo',
30
32
  id: 'open-mistral-nemo',
31
33
  pricing: {
32
- input: 0.15,
33
- output: 0.15,
34
+ units: [
35
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
36
+ { name: 'textOutput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
37
+ ],
34
38
  },
35
39
  type: 'chat',
36
40
  },
@@ -44,8 +48,10 @@ const mistralChatModels: AIChatModelCard[] = [
44
48
  enabled: true,
45
49
  id: 'mistral-small-latest',
46
50
  pricing: {
47
- input: 0.1,
48
- output: 0.3,
51
+ units: [
52
+ { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
53
+ { name: 'textOutput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
54
+ ],
49
55
  },
50
56
  type: 'chat',
51
57
  },
@@ -60,8 +66,10 @@ const mistralChatModels: AIChatModelCard[] = [
60
66
  enabled: true,
61
67
  id: 'mistral-large-latest',
62
68
  pricing: {
63
- input: 2,
64
- output: 6,
69
+ units: [
70
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
71
+ { name: 'textOutput', rate: 6, strategy: 'fixed', unit: 'millionTokens' },
72
+ ],
65
73
  },
66
74
  type: 'chat',
67
75
  },
@@ -75,8 +83,10 @@ const mistralChatModels: AIChatModelCard[] = [
75
83
  displayName: 'Codestral',
76
84
  id: 'codestral-latest',
77
85
  pricing: {
78
- input: 0.3,
79
- output: 0.9,
86
+ units: [
87
+ { name: 'textInput', rate: 0.3, strategy: 'fixed', unit: 'millionTokens' },
88
+ { name: 'textOutput', rate: 0.9, strategy: 'fixed', unit: 'millionTokens' },
89
+ ],
80
90
  },
81
91
  releasedAt: '2025-01-13',
82
92
  type: 'chat',
@@ -93,8 +103,10 @@ const mistralChatModels: AIChatModelCard[] = [
93
103
  enabled: true,
94
104
  id: 'pixtral-large-latest',
95
105
  pricing: {
96
- input: 2,
97
- output: 6,
106
+ units: [
107
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
108
+ { name: 'textOutput', rate: 6, strategy: 'fixed', unit: 'millionTokens' },
109
+ ],
98
110
  },
99
111
  type: 'chat',
100
112
  },
@@ -109,8 +121,10 @@ const mistralChatModels: AIChatModelCard[] = [
109
121
  displayName: 'Pixtral 12B',
110
122
  id: 'pixtral-12b-2409',
111
123
  pricing: {
112
- input: 0.15,
113
- output: 0.15,
124
+ units: [
125
+ { name: 'textInput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
126
+ { name: 'textOutput', rate: 0.15, strategy: 'fixed', unit: 'millionTokens' },
127
+ ],
114
128
  },
115
129
  type: 'chat',
116
130
  },
@@ -123,8 +137,10 @@ const mistralChatModels: AIChatModelCard[] = [
123
137
  displayName: 'Ministral 3B',
124
138
  id: 'ministral-3b-latest',
125
139
  pricing: {
126
- input: 0.04,
127
- output: 0.04,
140
+ units: [
141
+ { name: 'textInput', rate: 0.04, strategy: 'fixed', unit: 'millionTokens' },
142
+ { name: 'textOutput', rate: 0.04, strategy: 'fixed', unit: 'millionTokens' },
143
+ ],
128
144
  },
129
145
  type: 'chat',
130
146
  },
@@ -137,8 +153,10 @@ const mistralChatModels: AIChatModelCard[] = [
137
153
  displayName: 'Ministral 8B',
138
154
  id: 'ministral-8b-latest',
139
155
  pricing: {
140
- input: 0.1,
141
- output: 0.1,
156
+ units: [
157
+ { name: 'textInput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
158
+ { name: 'textOutput', rate: 0.1, strategy: 'fixed', unit: 'millionTokens' },
159
+ ],
142
160
  },
143
161
  type: 'chat',
144
162
  },
@@ -149,8 +167,10 @@ const mistralChatModels: AIChatModelCard[] = [
149
167
  displayName: 'Codestral Mamba',
150
168
  id: 'open-codestral-mamba',
151
169
  pricing: {
152
- input: 0,
153
- output: 0,
170
+ units: [
171
+ { name: 'textInput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
172
+ { name: 'textOutput', rate: 0, strategy: 'fixed', unit: 'millionTokens' },
173
+ ],
154
174
  },
155
175
  type: 'chat',
156
176
  },
@@ -13,10 +13,12 @@ const moonshotChatModels: AIChatModelCard[] = [
13
13
  enabled: true,
14
14
  id: 'kimi-k2-0711-preview',
15
15
  pricing: {
16
- cachedInput: 1,
17
16
  currency: 'CNY',
18
- input: 4,
19
- output: 16,
17
+ units: [
18
+ { name: 'textInput_cacheRead', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
19
+ { name: 'textInput', rate: 4, strategy: 'fixed', unit: 'millionTokens' },
20
+ { name: 'textOutput', rate: 16, strategy: 'fixed', unit: 'millionTokens' },
21
+ ],
20
22
  },
21
23
  releasedAt: '2025-07-11',
22
24
  type: 'chat',
@@ -33,10 +35,12 @@ const moonshotChatModels: AIChatModelCard[] = [
33
35
  enabled: true,
34
36
  id: 'kimi-latest',
35
37
  pricing: {
36
- cachedInput: 1,
37
38
  currency: 'CNY',
38
- input: 10, // 128k 上下文时
39
- output: 30,
39
+ units: [
40
+ { name: 'textInput_cacheRead', rate: 1, strategy: 'fixed', unit: 'millionTokens' },
41
+ { name: 'textInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
42
+ { name: 'textOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
43
+ ],
40
44
  },
41
45
  releasedAt: '2025-02-17',
42
46
  type: 'chat',
@@ -54,8 +58,10 @@ const moonshotChatModels: AIChatModelCard[] = [
54
58
  id: 'kimi-thinking-preview',
55
59
  pricing: {
56
60
  currency: 'CNY',
57
- input: 200,
58
- output: 200,
61
+ units: [
62
+ { name: 'textInput', rate: 200, strategy: 'fixed', unit: 'millionTokens' },
63
+ { name: 'textOutput', rate: 200, strategy: 'fixed', unit: 'millionTokens' },
64
+ ],
59
65
  },
60
66
  releasedAt: '2025-05-06',
61
67
  type: 'chat',
@@ -70,8 +76,10 @@ const moonshotChatModels: AIChatModelCard[] = [
70
76
  id: 'moonshot-v1-auto',
71
77
  pricing: {
72
78
  currency: 'CNY',
73
- input: 10, // 128k 上下文时
74
- output: 30,
79
+ units: [
80
+ { name: 'textInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
81
+ { name: 'textOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
82
+ ],
75
83
  },
76
84
  type: 'chat',
77
85
  },
@@ -86,8 +94,10 @@ const moonshotChatModels: AIChatModelCard[] = [
86
94
  id: 'moonshot-v1-8k',
87
95
  pricing: {
88
96
  currency: 'CNY',
89
- input: 2,
90
- output: 10,
97
+ units: [
98
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
99
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
100
+ ],
91
101
  },
92
102
  type: 'chat',
93
103
  },
@@ -102,8 +112,10 @@ const moonshotChatModels: AIChatModelCard[] = [
102
112
  id: 'moonshot-v1-32k',
103
113
  pricing: {
104
114
  currency: 'CNY',
105
- input: 5,
106
- output: 20,
115
+ units: [
116
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
117
+ { name: 'textOutput', rate: 20, strategy: 'fixed', unit: 'millionTokens' },
118
+ ],
107
119
  },
108
120
  type: 'chat',
109
121
  },
@@ -118,8 +130,10 @@ const moonshotChatModels: AIChatModelCard[] = [
118
130
  id: 'moonshot-v1-128k',
119
131
  pricing: {
120
132
  currency: 'CNY',
121
- input: 10,
122
- output: 30,
133
+ units: [
134
+ { name: 'textInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
135
+ { name: 'textOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
136
+ ],
123
137
  },
124
138
  type: 'chat',
125
139
  },
@@ -135,8 +149,10 @@ const moonshotChatModels: AIChatModelCard[] = [
135
149
  id: 'moonshot-v1-8k-vision-preview',
136
150
  pricing: {
137
151
  currency: 'CNY',
138
- input: 2,
139
- output: 10,
152
+ units: [
153
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
154
+ { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
155
+ ],
140
156
  },
141
157
  releasedAt: '2025-01-14',
142
158
  type: 'chat',
@@ -153,8 +169,10 @@ const moonshotChatModels: AIChatModelCard[] = [
153
169
  id: 'moonshot-v1-32k-vision-preview',
154
170
  pricing: {
155
171
  currency: 'CNY',
156
- input: 5,
157
- output: 20,
172
+ units: [
173
+ { name: 'textInput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
174
+ { name: 'textOutput', rate: 20, strategy: 'fixed', unit: 'millionTokens' },
175
+ ],
158
176
  },
159
177
  releasedAt: '2025-01-14',
160
178
  type: 'chat',
@@ -171,8 +189,10 @@ const moonshotChatModels: AIChatModelCard[] = [
171
189
  id: 'moonshot-v1-128k-vision-preview',
172
190
  pricing: {
173
191
  currency: 'CNY',
174
- input: 10,
175
- output: 30,
192
+ units: [
193
+ { name: 'textInput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
194
+ { name: 'textOutput', rate: 30, strategy: 'fixed', unit: 'millionTokens' },
195
+ ],
176
196
  },
177
197
  releasedAt: '2025-01-14',
178
198
  type: 'chat',