@lobehub/chat 1.106.2 → 1.106.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/CHANGELOG.md +34 -0
- package/changelog/v1.json +12 -0
- package/package.json +1 -1
- package/src/config/aiModels/google.ts +0 -48
- package/src/config/aiModels/groq.ts +4 -0
- package/src/config/aiModels/hunyuan.ts +22 -0
- package/src/config/aiModels/moonshot.ts +0 -36
- package/src/config/aiModels/qwen.ts +110 -11
- package/src/config/aiModels/siliconcloud.ts +101 -0
- package/src/config/aiModels/stepfun.ts +0 -53
- package/src/config/aiModels/volcengine.ts +21 -0
- package/src/config/aiModels/zhipu.ts +132 -11
- package/src/config/modelProviders/moonshot.ts +1 -0
- package/src/libs/model-runtime/moonshot/index.ts +10 -1
- package/src/libs/model-runtime/utils/modelParse.ts +2 -2
- package/src/libs/model-runtime/zhipu/index.ts +57 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,40 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.106.3](https://github.com/lobehub/lobe-chat/compare/v1.106.2...v1.106.3)
|
6
|
+
|
7
|
+
<sup>Released on **2025-07-29**</sup>
|
8
|
+
|
9
|
+
#### 🐛 Bug Fixes
|
10
|
+
|
11
|
+
- **misc**: Moonshot assistant messages must not be empty.
|
12
|
+
|
13
|
+
#### 💄 Styles
|
14
|
+
|
15
|
+
- **misc**: Add volcengine kimi-k2 model, Add Zhipu GLM-4.5 models.
|
16
|
+
|
17
|
+
<br/>
|
18
|
+
|
19
|
+
<details>
|
20
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
21
|
+
|
22
|
+
#### What's fixed
|
23
|
+
|
24
|
+
- **misc**: Moonshot assistant messages must not be empty, closes [#8419](https://github.com/lobehub/lobe-chat/issues/8419) ([a796495](https://github.com/lobehub/lobe-chat/commit/a796495))
|
25
|
+
|
26
|
+
#### Styles
|
27
|
+
|
28
|
+
- **misc**: Add volcengine kimi-k2 model, closes [#8591](https://github.com/lobehub/lobe-chat/issues/8591) ([9630167](https://github.com/lobehub/lobe-chat/commit/9630167))
|
29
|
+
- **misc**: Add Zhipu GLM-4.5 models, closes [#8590](https://github.com/lobehub/lobe-chat/issues/8590) ([4f4620c](https://github.com/lobehub/lobe-chat/commit/4f4620c))
|
30
|
+
|
31
|
+
</details>
|
32
|
+
|
33
|
+
<div align="right">
|
34
|
+
|
35
|
+
[](#readme-top)
|
36
|
+
|
37
|
+
</div>
|
38
|
+
|
5
39
|
### [Version 1.106.2](https://github.com/lobehub/lobe-chat/compare/v1.106.1...v1.106.2)
|
6
40
|
|
7
41
|
<sup>Released on **2025-07-29**</sup>
|
package/changelog/v1.json
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
[
|
2
|
+
{
|
3
|
+
"children": {
|
4
|
+
"fixes": [
|
5
|
+
"Moonshot assistant messages must not be empty."
|
6
|
+
],
|
7
|
+
"improvements": [
|
8
|
+
"Add volcengine kimi-k2 model, Add Zhipu GLM-4.5 models."
|
9
|
+
]
|
10
|
+
},
|
11
|
+
"date": "2025-07-29",
|
12
|
+
"version": "1.106.3"
|
13
|
+
},
|
2
14
|
{
|
3
15
|
"children": {
|
4
16
|
"fixes": [
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.106.
|
3
|
+
"version": "1.106.3",
|
4
4
|
"description": "Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
5
5
|
"keywords": [
|
6
6
|
"framework",
|
@@ -131,53 +131,6 @@ const googleChatModels: AIChatModelCard[] = [
|
|
131
131
|
},
|
132
132
|
type: 'chat',
|
133
133
|
},
|
134
|
-
{
|
135
|
-
abilities: {
|
136
|
-
functionCall: true,
|
137
|
-
reasoning: true,
|
138
|
-
search: true,
|
139
|
-
vision: true,
|
140
|
-
},
|
141
|
-
contextWindowTokens: 1_048_576 + 65_536,
|
142
|
-
description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
|
143
|
-
displayName: 'Gemini 2.5 Flash Preview 04-17',
|
144
|
-
id: 'gemini-2.5-flash-preview-04-17',
|
145
|
-
maxOutput: 65_536,
|
146
|
-
pricing: {
|
147
|
-
cachedInput: 0.0375,
|
148
|
-
input: 0.15,
|
149
|
-
output: 3.5, // Thinking
|
150
|
-
},
|
151
|
-
releasedAt: '2025-04-17',
|
152
|
-
settings: {
|
153
|
-
extendParams: ['thinkingBudget'],
|
154
|
-
searchImpl: 'params',
|
155
|
-
searchProvider: 'google',
|
156
|
-
},
|
157
|
-
type: 'chat',
|
158
|
-
},
|
159
|
-
{
|
160
|
-
abilities: {
|
161
|
-
functionCall: true,
|
162
|
-
reasoning: true,
|
163
|
-
search: true,
|
164
|
-
vision: true,
|
165
|
-
},
|
166
|
-
contextWindowTokens: 1_048_576 + 65_536,
|
167
|
-
description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
|
168
|
-
displayName: 'Gemini 2.5 Flash Preview 04-17 for cursor testing',
|
169
|
-
id: 'gemini-2.5-flash-preview-04-17-thinking',
|
170
|
-
maxOutput: 65_536,
|
171
|
-
pricing: {
|
172
|
-
input: 0.15,
|
173
|
-
output: 3.5,
|
174
|
-
},
|
175
|
-
settings: {
|
176
|
-
searchImpl: 'params',
|
177
|
-
searchProvider: 'google',
|
178
|
-
},
|
179
|
-
type: 'chat',
|
180
|
-
},
|
181
134
|
{
|
182
135
|
abilities: {
|
183
136
|
functionCall: true,
|
@@ -188,7 +141,6 @@ const googleChatModels: AIChatModelCard[] = [
|
|
188
141
|
contextWindowTokens: 1_048_576 + 65_536,
|
189
142
|
description: 'Gemini 2.5 Flash-Lite 是 Google 最小、性价比最高的模型,专为大规模使用而设计。',
|
190
143
|
displayName: 'Gemini 2.5 Flash-Lite',
|
191
|
-
enabled: true,
|
192
144
|
id: 'gemini-2.5-flash-lite',
|
193
145
|
maxOutput: 65_536,
|
194
146
|
pricing: {
|
@@ -33,6 +33,7 @@ const groqChatModels: AIChatModelCard[] = [
|
|
33
33
|
displayName: 'Kimi K2 Instruct',
|
34
34
|
enabled: true,
|
35
35
|
id: 'moonshotai/kimi-k2-instruct',
|
36
|
+
maxOutput: 16_384,
|
36
37
|
pricing: {
|
37
38
|
input: 1,
|
38
39
|
output: 3,
|
@@ -53,6 +54,9 @@ const groqChatModels: AIChatModelCard[] = [
|
|
53
54
|
type: 'chat',
|
54
55
|
},
|
55
56
|
{
|
57
|
+
abilities: {
|
58
|
+
functionCall: true,
|
59
|
+
},
|
56
60
|
contextWindowTokens: 131_072,
|
57
61
|
displayName: 'Llama 4 Maverick (17Bx128E)',
|
58
62
|
enabled: true,
|
@@ -44,6 +44,28 @@ const hunyuanChatModels: AIChatModelCard[] = [
|
|
44
44
|
},
|
45
45
|
type: 'chat',
|
46
46
|
},
|
47
|
+
{
|
48
|
+
abilities: {
|
49
|
+
reasoning: true,
|
50
|
+
search: true,
|
51
|
+
},
|
52
|
+
contextWindowTokens: 92_000,
|
53
|
+
description:
|
54
|
+
'大幅提升高难度数学、逻辑和代码能力,优化模型输出稳定性,提升模型长文能力。',
|
55
|
+
displayName: 'Hunyuan T1 20250711',
|
56
|
+
id: 'hunyuan-t1-20250711',
|
57
|
+
maxOutput: 64_000,
|
58
|
+
pricing: {
|
59
|
+
currency: 'CNY',
|
60
|
+
input: 1,
|
61
|
+
output: 4,
|
62
|
+
},
|
63
|
+
releasedAt: '2025-07-11',
|
64
|
+
settings: {
|
65
|
+
searchImpl: 'params',
|
66
|
+
},
|
67
|
+
type: 'chat',
|
68
|
+
},
|
47
69
|
{
|
48
70
|
abilities: {
|
49
71
|
reasoning: true,
|
@@ -5,7 +5,6 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
5
5
|
{
|
6
6
|
abilities: {
|
7
7
|
functionCall: true,
|
8
|
-
search: true,
|
9
8
|
},
|
10
9
|
contextWindowTokens: 131_072,
|
11
10
|
description:
|
@@ -20,15 +19,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
20
19
|
output: 16,
|
21
20
|
},
|
22
21
|
releasedAt: '2025-07-11',
|
23
|
-
settings: {
|
24
|
-
searchImpl: 'params',
|
25
|
-
},
|
26
22
|
type: 'chat',
|
27
23
|
},
|
28
24
|
{
|
29
25
|
abilities: {
|
30
26
|
functionCall: true,
|
31
|
-
search: true,
|
32
27
|
vision: true,
|
33
28
|
},
|
34
29
|
contextWindowTokens: 131_072,
|
@@ -44,9 +39,6 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
44
39
|
output: 30,
|
45
40
|
},
|
46
41
|
releasedAt: '2025-02-17',
|
47
|
-
settings: {
|
48
|
-
searchImpl: 'params',
|
49
|
-
},
|
50
42
|
type: 'chat',
|
51
43
|
},
|
52
44
|
{
|
@@ -71,7 +63,6 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
71
63
|
{
|
72
64
|
abilities: {
|
73
65
|
functionCall: true,
|
74
|
-
search: true,
|
75
66
|
},
|
76
67
|
contextWindowTokens: 131_072,
|
77
68
|
description: 'Moonshot V1 Auto 可以根据当前上下文占用的 Tokens 数量来选择合适的模型',
|
@@ -82,15 +73,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
82
73
|
input: 10, // 128k 上下文时
|
83
74
|
output: 30,
|
84
75
|
},
|
85
|
-
settings: {
|
86
|
-
searchImpl: 'params',
|
87
|
-
},
|
88
76
|
type: 'chat',
|
89
77
|
},
|
90
78
|
{
|
91
79
|
abilities: {
|
92
80
|
functionCall: true,
|
93
|
-
search: true,
|
94
81
|
},
|
95
82
|
contextWindowTokens: 8192,
|
96
83
|
description:
|
@@ -102,15 +89,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
102
89
|
input: 2,
|
103
90
|
output: 10,
|
104
91
|
},
|
105
|
-
settings: {
|
106
|
-
searchImpl: 'params',
|
107
|
-
},
|
108
92
|
type: 'chat',
|
109
93
|
},
|
110
94
|
{
|
111
95
|
abilities: {
|
112
96
|
functionCall: true,
|
113
|
-
search: true,
|
114
97
|
},
|
115
98
|
contextWindowTokens: 32_768,
|
116
99
|
description:
|
@@ -122,15 +105,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
122
105
|
input: 5,
|
123
106
|
output: 20,
|
124
107
|
},
|
125
|
-
settings: {
|
126
|
-
searchImpl: 'params',
|
127
|
-
},
|
128
108
|
type: 'chat',
|
129
109
|
},
|
130
110
|
{
|
131
111
|
abilities: {
|
132
112
|
functionCall: true,
|
133
|
-
search: true,
|
134
113
|
},
|
135
114
|
contextWindowTokens: 131_072,
|
136
115
|
description:
|
@@ -142,15 +121,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
142
121
|
input: 10,
|
143
122
|
output: 30,
|
144
123
|
},
|
145
|
-
settings: {
|
146
|
-
searchImpl: 'params',
|
147
|
-
},
|
148
124
|
type: 'chat',
|
149
125
|
},
|
150
126
|
{
|
151
127
|
abilities: {
|
152
128
|
functionCall: true,
|
153
|
-
search: true,
|
154
129
|
vision: true,
|
155
130
|
},
|
156
131
|
contextWindowTokens: 8192,
|
@@ -164,15 +139,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
164
139
|
output: 10,
|
165
140
|
},
|
166
141
|
releasedAt: '2025-01-14',
|
167
|
-
settings: {
|
168
|
-
searchImpl: 'params',
|
169
|
-
},
|
170
142
|
type: 'chat',
|
171
143
|
},
|
172
144
|
{
|
173
145
|
abilities: {
|
174
146
|
functionCall: true,
|
175
|
-
search: true,
|
176
147
|
vision: true,
|
177
148
|
},
|
178
149
|
contextWindowTokens: 32_768,
|
@@ -186,15 +157,11 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
186
157
|
output: 20,
|
187
158
|
},
|
188
159
|
releasedAt: '2025-01-14',
|
189
|
-
settings: {
|
190
|
-
searchImpl: 'params',
|
191
|
-
},
|
192
160
|
type: 'chat',
|
193
161
|
},
|
194
162
|
{
|
195
163
|
abilities: {
|
196
164
|
functionCall: true,
|
197
|
-
search: true,
|
198
165
|
vision: true,
|
199
166
|
},
|
200
167
|
contextWindowTokens: 131_072,
|
@@ -208,9 +175,6 @@ const moonshotChatModels: AIChatModelCard[] = [
|
|
208
175
|
output: 30,
|
209
176
|
},
|
210
177
|
releasedAt: '2025-01-14',
|
211
|
-
settings: {
|
212
|
-
searchImpl: 'params',
|
213
|
-
},
|
214
178
|
type: 'chat',
|
215
179
|
},
|
216
180
|
];
|
@@ -3,6 +3,89 @@ import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
|
|
3
3
|
// https://help.aliyun.com/zh/model-studio/models?spm=a2c4g.11186623
|
4
4
|
|
5
5
|
const qwenChatModels: AIChatModelCard[] = [
|
6
|
+
{
|
7
|
+
abilities: {
|
8
|
+
functionCall: true,
|
9
|
+
},
|
10
|
+
contextWindowTokens: 131_072,
|
11
|
+
description:
|
12
|
+
'总参数 1T,激活参数 32B。 非思维模型中,在前沿知识、数学和编码方面达到了顶尖水平,更擅长通用 Agent 任务。 针对代理任务进行了精心优化,不仅能回答问题,还能采取行动。 最适用于即兴、通用聊天和代理体验,是一款无需长时间思考的反射级模型。',
|
13
|
+
displayName: 'Kimi K2 Instruct',
|
14
|
+
enabled: true,
|
15
|
+
id: 'Moonshot-Kimi-K2-Instruct',
|
16
|
+
maxOutput: 8192,
|
17
|
+
organization: 'Qwen',
|
18
|
+
pricing: {
|
19
|
+
currency: 'CNY',
|
20
|
+
input: 4,
|
21
|
+
output: 16,
|
22
|
+
},
|
23
|
+
releasedAt: '2025-07-17',
|
24
|
+
type: 'chat',
|
25
|
+
},
|
26
|
+
{
|
27
|
+
abilities: {
|
28
|
+
functionCall: true,
|
29
|
+
},
|
30
|
+
config: {
|
31
|
+
deploymentName: 'qwen3-coder-plus',
|
32
|
+
},
|
33
|
+
contextWindowTokens: 1_048_576,
|
34
|
+
description: '通义千问代码模型。最新的 Qwen3-Coder-Plus 系列模型是基于 Qwen3 的代码生成模型,具有强大的Coding Agent能力,擅长工具调用和环境交互,能够实现自主编程,代码能力卓越的同时兼具通用能力。',
|
35
|
+
displayName: 'Qwen3 Coder Plus',
|
36
|
+
id: 'qwen3-coder-plus',
|
37
|
+
maxOutput: 65_536,
|
38
|
+
organization: 'Qwen',
|
39
|
+
pricing: {
|
40
|
+
cachedInput: 2.4, // tokens 32K ~ 128K
|
41
|
+
currency: 'CNY',
|
42
|
+
input: 6,
|
43
|
+
output: 24,
|
44
|
+
},
|
45
|
+
releasedAt: '2025-07-23',
|
46
|
+
type: 'chat',
|
47
|
+
},
|
48
|
+
{
|
49
|
+
abilities: {
|
50
|
+
functionCall: true,
|
51
|
+
reasoning: true,
|
52
|
+
},
|
53
|
+
contextWindowTokens: 131_072,
|
54
|
+
description:
|
55
|
+
'基于Qwen3的思考模式开源模型,相较上一版本(通义千问3-235B-A22B)逻辑能力、通用能力、知识增强及创作能力均有大幅提升,适用于高难度强推理场景。',
|
56
|
+
displayName: 'Qwen3 235B A22B Thinking 2507',
|
57
|
+
enabled: true,
|
58
|
+
id: 'qwen3-235b-a22b-thinking-2507',
|
59
|
+
maxOutput: 32_768,
|
60
|
+
organization: 'Qwen',
|
61
|
+
pricing: {
|
62
|
+
currency: 'CNY',
|
63
|
+
input: 2,
|
64
|
+
output: 20,
|
65
|
+
},
|
66
|
+
releasedAt: '2025-07-25',
|
67
|
+
type: 'chat',
|
68
|
+
},
|
69
|
+
{
|
70
|
+
abilities: {
|
71
|
+
functionCall: true,
|
72
|
+
},
|
73
|
+
contextWindowTokens: 131_072,
|
74
|
+
description:
|
75
|
+
'基于Qwen3的非思考模式开源模型,相较上一版本(通义千问3-235B-A22B)主观创作能力与模型安全性均有小幅度提升。',
|
76
|
+
displayName: 'Qwen3 235B A22B Instruct 2507',
|
77
|
+
enabled: true,
|
78
|
+
id: 'qwen3-235b-a22b-instruct-2507',
|
79
|
+
maxOutput: 32_768,
|
80
|
+
organization: 'Qwen',
|
81
|
+
pricing: {
|
82
|
+
currency: 'CNY',
|
83
|
+
input: 2,
|
84
|
+
output: 8,
|
85
|
+
},
|
86
|
+
releasedAt: '2025-07-22',
|
87
|
+
type: 'chat',
|
88
|
+
},
|
6
89
|
{
|
7
90
|
abilities: {
|
8
91
|
functionCall: true,
|
@@ -12,7 +95,6 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
12
95
|
description:
|
13
96
|
'Qwen3是一款能力大幅提升的新一代通义千问大模型,在推理、通用、Agent和多语言等多个核心能力上均达到业界领先水平,并支持思考模式切换。',
|
14
97
|
displayName: 'Qwen3 235B A22B',
|
15
|
-
enabled: true,
|
16
98
|
id: 'qwen3-235b-a22b',
|
17
99
|
maxOutput: 8192,
|
18
100
|
organization: 'Qwen',
|
@@ -59,7 +141,6 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
59
141
|
description:
|
60
142
|
'Qwen3是一款能力大幅提升的新一代通义千问大模型,在推理、通用、Agent和多语言等多个核心能力上均达到业界领先水平,并支持思考模式切换。',
|
61
143
|
displayName: 'Qwen3 30B A3B',
|
62
|
-
enabled: true,
|
63
144
|
id: 'qwen3-30b-a3b',
|
64
145
|
maxOutput: 8192,
|
65
146
|
organization: 'Qwen',
|
@@ -223,21 +304,22 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
223
304
|
search: true,
|
224
305
|
},
|
225
306
|
config: {
|
226
|
-
deploymentName: 'qwen-turbo-2025-
|
307
|
+
deploymentName: 'qwen-turbo-2025-07-15',
|
227
308
|
},
|
228
|
-
contextWindowTokens: 1_000_000,
|
309
|
+
contextWindowTokens: 1_000_000, // Non-thinking mode
|
229
310
|
description: '通义千问超大规模语言模型,支持中文、英文等不同语言输入。',
|
230
311
|
displayName: 'Qwen Turbo',
|
231
312
|
enabled: true,
|
232
313
|
id: 'qwen-turbo',
|
233
|
-
maxOutput:
|
314
|
+
maxOutput: 16_384,
|
234
315
|
organization: 'Qwen',
|
235
316
|
pricing: {
|
317
|
+
cachedInput: 0.12,
|
236
318
|
currency: 'CNY',
|
237
319
|
input: 0.3,
|
238
320
|
output: 3, // Thinking mode pricing
|
239
321
|
},
|
240
|
-
releasedAt: '2025-
|
322
|
+
releasedAt: '2025-07-15',
|
241
323
|
settings: {
|
242
324
|
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
243
325
|
searchImpl: 'params',
|
@@ -251,21 +333,22 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
251
333
|
search: true,
|
252
334
|
},
|
253
335
|
config: {
|
254
|
-
deploymentName: 'qwen-plus-2025-
|
336
|
+
deploymentName: 'qwen-plus-2025-07-14',
|
255
337
|
},
|
256
338
|
contextWindowTokens: 131_072,
|
257
339
|
description: '通义千问超大规模语言模型增强版,支持中文、英文等不同语言输入。',
|
258
340
|
displayName: 'Qwen Plus',
|
259
341
|
enabled: true,
|
260
342
|
id: 'qwen-plus',
|
261
|
-
maxOutput:
|
343
|
+
maxOutput: 16_384,
|
262
344
|
organization: 'Qwen',
|
263
345
|
pricing: {
|
346
|
+
cachedInput: 0.32,
|
264
347
|
currency: 'CNY',
|
265
348
|
input: 0.8,
|
266
349
|
output: 8, // Thinking mode pricing
|
267
350
|
},
|
268
|
-
releasedAt: '2025-
|
351
|
+
releasedAt: '2025-07-14',
|
269
352
|
settings: {
|
270
353
|
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
271
354
|
searchImpl: 'params',
|
@@ -289,6 +372,7 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
289
372
|
maxOutput: 8192,
|
290
373
|
organization: 'Qwen',
|
291
374
|
pricing: {
|
375
|
+
cachedInput: 0.96,
|
292
376
|
currency: 'CNY',
|
293
377
|
input: 2.4,
|
294
378
|
output: 9.6,
|
@@ -330,7 +414,6 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
330
414
|
description:
|
331
415
|
'Qwen-Omni 系列模型支持输入多种模态的数据,包括视频、音频、图片、文本,并输出音频与文本。',
|
332
416
|
displayName: 'Qwen Omni Turbo',
|
333
|
-
enabled: true,
|
334
417
|
id: 'qwen-omni-turbo',
|
335
418
|
maxOutput: 2048,
|
336
419
|
organization: 'Qwen',
|
@@ -374,6 +457,7 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
374
457
|
maxOutput: 8192,
|
375
458
|
organization: 'Qwen',
|
376
459
|
pricing: {
|
460
|
+
cachedInput: 0.6,
|
377
461
|
currency: 'CNY',
|
378
462
|
input: 1.5,
|
379
463
|
output: 4.5,
|
@@ -391,11 +475,11 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
391
475
|
description:
|
392
476
|
'通义千问超大规模视觉语言模型。相比增强版,再次提升视觉推理能力和指令遵循能力,提供更高的视觉感知和认知水平。',
|
393
477
|
displayName: 'Qwen VL Max',
|
394
|
-
enabled: true,
|
395
478
|
id: 'qwen-vl-max',
|
396
479
|
maxOutput: 8192,
|
397
480
|
organization: 'Qwen',
|
398
481
|
pricing: {
|
482
|
+
cachedInput: 1.2,
|
399
483
|
currency: 'CNY',
|
400
484
|
input: 3,
|
401
485
|
output: 9,
|
@@ -710,6 +794,21 @@ const qwenChatModels: AIChatModelCard[] = [
|
|
710
794
|
input: 4,
|
711
795
|
output: 12,
|
712
796
|
},
|
797
|
+
releasedAt: '2025-07-23',
|
798
|
+
type: 'chat',
|
799
|
+
},
|
800
|
+
{
|
801
|
+
contextWindowTokens: 262_144,
|
802
|
+
description: '通义千问代码模型开源版。最新的 qwen3-coder-480b-a35b-instruct 是基于 Qwen3 的代码生成模型,具有强大的Coding Agent能力,擅长工具调用和环境交互,能够实现自主编程、代码能力卓越的同时兼具通用能力。',
|
803
|
+
displayName: 'Qwen3 Coder 480B A35B',
|
804
|
+
id: 'qwen3-coder-480b-a35b-instruct',
|
805
|
+
maxOutput: 65_536,
|
806
|
+
organization: 'Qwen',
|
807
|
+
pricing: {
|
808
|
+
currency: 'CNY',
|
809
|
+
input: 9, // tokens 32K ~ 128K
|
810
|
+
output: 36,
|
811
|
+
},
|
713
812
|
type: 'chat',
|
714
813
|
},
|
715
814
|
{
|
@@ -2,6 +2,42 @@ import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
|
|
2
2
|
|
3
3
|
// https://siliconflow.cn/zh-cn/models
|
4
4
|
const siliconcloudChatModels: AIChatModelCard[] = [
|
5
|
+
{
|
6
|
+
abilities: {
|
7
|
+
functionCall: true,
|
8
|
+
reasoning: true,
|
9
|
+
},
|
10
|
+
contextWindowTokens: 131_072,
|
11
|
+
description:
|
12
|
+
'GLM-4.5 是一款专为智能体应用打造的基础模型,使用了混合专家(Mixture-of-Experts)架构。在工具调用、网页浏览、软件工程、前端编程领域进行了深度优化,支持无缝接入 Claude Code、Roo Code 等代码智能体中使用。GLM-4.5 采用混合推理模式,可以适应复杂推理和日常使用等多种应用场景。',
|
13
|
+
displayName: 'GLM-4.5',
|
14
|
+
id: 'zai-org/GLM-4.5',
|
15
|
+
pricing: {
|
16
|
+
currency: 'CNY',
|
17
|
+
input: 3.5,
|
18
|
+
output: 14,
|
19
|
+
},
|
20
|
+
releasedAt: '2025-07-28',
|
21
|
+
type: 'chat',
|
22
|
+
},
|
23
|
+
{
|
24
|
+
abilities: {
|
25
|
+
functionCall: true,
|
26
|
+
reasoning: true,
|
27
|
+
},
|
28
|
+
contextWindowTokens: 131_072,
|
29
|
+
description:
|
30
|
+
'GLM-4.5-Air 是一款专为智能体应用打造的基础模型,使用了混合专家(Mixture-of-Experts)架构。在工具调用、网页浏览、软件工程、前端编程领域进行了深度优化,支持无缝接入 Claude Code、Roo Code 等代码智能体中使用。GLM-4.5 采用混合推理模式,可以适应复杂推理和日常使用等多种应用场景。',
|
31
|
+
displayName: 'GLM-4.5-Air',
|
32
|
+
id: 'zai-org/GLM-4.5-Air',
|
33
|
+
pricing: {
|
34
|
+
currency: 'CNY',
|
35
|
+
input: 1,
|
36
|
+
output: 6,
|
37
|
+
},
|
38
|
+
releasedAt: '2025-07-28',
|
39
|
+
type: 'chat',
|
40
|
+
},
|
5
41
|
{
|
6
42
|
abilities: {
|
7
43
|
reasoning: true,
|
@@ -33,6 +69,34 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|
33
69
|
releasedAt: '2025-06-30',
|
34
70
|
type: 'chat',
|
35
71
|
},
|
72
|
+
{
|
73
|
+
contextWindowTokens: 131_072,
|
74
|
+
description:
|
75
|
+
'Kimi K2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
|
76
|
+
displayName: 'Kimi K2 Instruct',
|
77
|
+
id: 'moonshotai/Kimi-K2-Instruct',
|
78
|
+
pricing: {
|
79
|
+
currency: 'CNY',
|
80
|
+
input: 4,
|
81
|
+
output: 16,
|
82
|
+
},
|
83
|
+
releasedAt: '2025-07-11',
|
84
|
+
type: 'chat',
|
85
|
+
},
|
86
|
+
{
|
87
|
+
contextWindowTokens: 131_072,
|
88
|
+
description:
|
89
|
+
'Kimi K2 是一款具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
|
90
|
+
displayName: 'Kimi K2 Instruct (Pro)',
|
91
|
+
id: 'Pro/moonshotai/Kimi-K2-Instruct',
|
92
|
+
pricing: {
|
93
|
+
currency: 'CNY',
|
94
|
+
input: 4,
|
95
|
+
output: 16,
|
96
|
+
},
|
97
|
+
releasedAt: '2025-07-11',
|
98
|
+
type: 'chat',
|
99
|
+
},
|
36
100
|
{
|
37
101
|
abilities: {
|
38
102
|
reasoning: true,
|
@@ -101,6 +165,43 @@ const siliconcloudChatModels: AIChatModelCard[] = [
|
|
101
165
|
releasedAt: '2025-05-26',
|
102
166
|
type: 'chat',
|
103
167
|
},
|
168
|
+
{
|
169
|
+
abilities: {
|
170
|
+
functionCall: true,
|
171
|
+
reasoning: true,
|
172
|
+
},
|
173
|
+
contextWindowTokens: 262_144,
|
174
|
+
description:
|
175
|
+
'Qwen3-235B-A22B-Thinking-2507 是由阿里巴巴通义千问团队开发的 Qwen3 系列大型语言模型中的一员,专注于高难度的复杂推理任务。该模型基于混合专家(MoE)架构,总参数量达 2350 亿,而在处理每个 token 时仅激活约 220 亿参数,从而在保持强大性能的同时提高了计算效率。作为一个专门的“思考”模型,它在逻辑推理、数学、科学、编程和学术基准测试等需要人类专业知识的任务上表现显著提升,达到了开源思考模型中的顶尖水平。此外,模型还增强了通用能力,如指令遵循、工具使用和文本生成,并原生支持 256K 的长上下文理解能力,非常适合用于需要深度推理和处理长文档的场景。',
|
176
|
+
displayName: 'Qwen3 235B A22B Thinking 2507',
|
177
|
+
id: 'Qwen/Qwen3-235B-A22B-Thinking-2507',
|
178
|
+
organization: 'Qwen',
|
179
|
+
pricing: {
|
180
|
+
currency: 'CNY',
|
181
|
+
input: 2.5,
|
182
|
+
output: 10,
|
183
|
+
},
|
184
|
+
releasedAt: '2025-07-25',
|
185
|
+
type: 'chat',
|
186
|
+
},
|
187
|
+
{
|
188
|
+
abilities: {
|
189
|
+
functionCall: true,
|
190
|
+
},
|
191
|
+
contextWindowTokens: 262_144,
|
192
|
+
description:
|
193
|
+
'Qwen3-235B-A22B-Instruct-2507 是由阿里云通义千问团队开发的 Qwen3 系列中的一款旗舰级混合专家(MoE)大语言模型。该模型拥有 2350 亿总参数,每次推理激活 220 亿参数。它是作为 Qwen3-235B-A22B 非思考模式的更新版本发布的,专注于在指令遵循、逻辑推理、文本理解、数学、科学、编程及工具使用等通用能力上实现显著提升。此外,模型增强了对多语言长尾知识的覆盖,并能更好地对齐用户在主观和开放性任务上的偏好,以生成更有帮助和更高质量的文本。',
|
194
|
+
displayName: 'Qwen3 235B A22B Instruct 2507',
|
195
|
+
id: 'Qwen/Qwen3-235B-A22B-Instruct-2507',
|
196
|
+
organization: 'Qwen',
|
197
|
+
pricing: {
|
198
|
+
currency: 'CNY',
|
199
|
+
input: 2.5,
|
200
|
+
output: 10,
|
201
|
+
},
|
202
|
+
releasedAt: '2025-07-21',
|
203
|
+
type: 'chat',
|
204
|
+
},
|
104
205
|
{
|
105
206
|
abilities: {
|
106
207
|
functionCall: true,
|
@@ -26,25 +26,6 @@ const stepfunChatModels: AIChatModelCard[] = [
|
|
26
26
|
// },
|
27
27
|
type: 'chat',
|
28
28
|
},
|
29
|
-
{
|
30
|
-
abilities: {
|
31
|
-
functionCall: true,
|
32
|
-
search: true,
|
33
|
-
},
|
34
|
-
contextWindowTokens: 8000,
|
35
|
-
description: '高速模型,适合实时对话。',
|
36
|
-
displayName: 'Step 1 Flash',
|
37
|
-
id: 'step-1-flash', // 将在2025年4月30日下线
|
38
|
-
pricing: {
|
39
|
-
currency: 'CNY',
|
40
|
-
input: 1,
|
41
|
-
output: 4,
|
42
|
-
},
|
43
|
-
settings: {
|
44
|
-
searchImpl: 'params',
|
45
|
-
},
|
46
|
-
type: 'chat',
|
47
|
-
},
|
48
29
|
{
|
49
30
|
abilities: {
|
50
31
|
functionCall: true,
|
@@ -83,25 +64,6 @@ const stepfunChatModels: AIChatModelCard[] = [
|
|
83
64
|
},
|
84
65
|
type: 'chat',
|
85
66
|
},
|
86
|
-
{
|
87
|
-
abilities: {
|
88
|
-
functionCall: true,
|
89
|
-
search: true,
|
90
|
-
},
|
91
|
-
contextWindowTokens: 128_000,
|
92
|
-
description: '平衡性能与成本,适合一般场景。',
|
93
|
-
displayName: 'Step 1 128K',
|
94
|
-
id: 'step-1-128k', // 将在2025年4月30日下线
|
95
|
-
pricing: {
|
96
|
-
currency: 'CNY',
|
97
|
-
input: 40,
|
98
|
-
output: 200,
|
99
|
-
},
|
100
|
-
settings: {
|
101
|
-
searchImpl: 'params',
|
102
|
-
},
|
103
|
-
type: 'chat',
|
104
|
-
},
|
105
67
|
{
|
106
68
|
abilities: {
|
107
69
|
functionCall: true,
|
@@ -240,21 +202,6 @@ const stepfunChatModels: AIChatModelCard[] = [
|
|
240
202
|
releasedAt: '2025-01-22',
|
241
203
|
type: 'chat',
|
242
204
|
},
|
243
|
-
{
|
244
|
-
abilities: {
|
245
|
-
vision: true,
|
246
|
-
},
|
247
|
-
contextWindowTokens: 32_000,
|
248
|
-
description: '该模型拥有强大的视频理解能力。',
|
249
|
-
displayName: 'Step 1.5V Mini',
|
250
|
-
id: 'step-1.5v-mini',
|
251
|
-
pricing: {
|
252
|
-
currency: 'CNY',
|
253
|
-
input: 8,
|
254
|
-
output: 35,
|
255
|
-
},
|
256
|
-
type: 'chat',
|
257
|
-
},
|
258
205
|
{
|
259
206
|
abilities: {
|
260
207
|
vision: true,
|
@@ -4,6 +4,27 @@ import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
|
|
4
4
|
// pricing https://console.volcengine.com/ark/region:ark+cn-beijing/openManagement
|
5
5
|
|
6
6
|
const doubaoChatModels: AIChatModelCard[] = [
|
7
|
+
{
|
8
|
+
abilities: {
|
9
|
+
functionCall: true,
|
10
|
+
},
|
11
|
+
config: {
|
12
|
+
deploymentName: 'kimi-k2-250711',
|
13
|
+
},
|
14
|
+
contextWindowTokens: 256_000,
|
15
|
+
description:
|
16
|
+
'Kimi-K2 是一款Moonshot AI推出的具备超强代码和 Agent 能力的 MoE 架构基础模型,总参数 1T,激活参数 32B。在通用知识推理、编程、数学、Agent 等主要类别的基准性能测试中,K2 模型的性能超过其他主流开源模型。',
|
17
|
+
displayName: 'Kimi K2',
|
18
|
+
enabled: true,
|
19
|
+
id: 'kimi-k2',
|
20
|
+
maxOutput: 16_384,
|
21
|
+
pricing: {
|
22
|
+
currency: 'CNY',
|
23
|
+
input: 4,
|
24
|
+
output: 16,
|
25
|
+
},
|
26
|
+
type: 'chat',
|
27
|
+
},
|
7
28
|
{
|
8
29
|
abilities: {
|
9
30
|
functionCall: true,
|
@@ -1,17 +1,140 @@
|
|
1
1
|
import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
|
2
2
|
|
3
3
|
const zhipuChatModels: AIChatModelCard[] = [
|
4
|
+
{
|
5
|
+
abilities: {
|
6
|
+
functionCall: true,
|
7
|
+
reasoning: true,
|
8
|
+
search: true,
|
9
|
+
},
|
10
|
+
contextWindowTokens: 128_000,
|
11
|
+
description:
|
12
|
+
'智谱最新旗舰模型,支持思考模式切换,综合能力达到开源模型的 SOTA 水平,上下文长度可达128K。',
|
13
|
+
displayName: 'GLM-4.5',
|
14
|
+
enabled: true,
|
15
|
+
id: 'glm-4.5',
|
16
|
+
maxOutput: 32_768,
|
17
|
+
pricing: {
|
18
|
+
cachedInput: 0.8,
|
19
|
+
currency: 'CNY',
|
20
|
+
input: 4, // 输入长度 [32k, 128k]
|
21
|
+
output: 16,
|
22
|
+
},
|
23
|
+
settings: {
|
24
|
+
extendParams: ['enableReasoning'],
|
25
|
+
searchImpl: 'params',
|
26
|
+
},
|
27
|
+
type: 'chat',
|
28
|
+
},
|
29
|
+
{
|
30
|
+
abilities: {
|
31
|
+
functionCall: true,
|
32
|
+
reasoning: true,
|
33
|
+
search: true,
|
34
|
+
},
|
35
|
+
contextWindowTokens: 128_000,
|
36
|
+
description:
|
37
|
+
'GLM-4.5 的极速版,在性能强劲的同时,生成速度可达 100 tokens/秒。',
|
38
|
+
displayName: 'GLM-4.5-X',
|
39
|
+
id: 'glm-4.5-x',
|
40
|
+
maxOutput: 32_768,
|
41
|
+
pricing: {
|
42
|
+
cachedInput: 3.2,
|
43
|
+
currency: 'CNY',
|
44
|
+
input: 16, // 输入长度 [32k, 128k]
|
45
|
+
output: 64,
|
46
|
+
},
|
47
|
+
settings: {
|
48
|
+
extendParams: ['enableReasoning'],
|
49
|
+
searchImpl: 'params',
|
50
|
+
},
|
51
|
+
type: 'chat',
|
52
|
+
},
|
53
|
+
{
|
54
|
+
abilities: {
|
55
|
+
functionCall: true,
|
56
|
+
reasoning: true,
|
57
|
+
search: true,
|
58
|
+
},
|
59
|
+
contextWindowTokens: 128_000,
|
60
|
+
description:
|
61
|
+
'GLM-4.5 的轻量版,兼顾性能与性价比,可灵活切换混合思考模型。',
|
62
|
+
displayName: 'GLM-4.5-Air',
|
63
|
+
id: 'glm-4.5-air',
|
64
|
+
maxOutput: 32_768,
|
65
|
+
pricing: {
|
66
|
+
cachedInput: 0.24,
|
67
|
+
currency: 'CNY',
|
68
|
+
input: 1.2, // 输入长度 [32k, 128k]
|
69
|
+
output: 8,
|
70
|
+
},
|
71
|
+
settings: {
|
72
|
+
extendParams: ['enableReasoning'],
|
73
|
+
searchImpl: 'params',
|
74
|
+
},
|
75
|
+
type: 'chat',
|
76
|
+
},
|
77
|
+
{
|
78
|
+
abilities: {
|
79
|
+
functionCall: true,
|
80
|
+
reasoning: true,
|
81
|
+
search: true,
|
82
|
+
},
|
83
|
+
contextWindowTokens: 128_000,
|
84
|
+
description:
|
85
|
+
'GLM-4.5-Air 的极速版,响应速度更快,专为大规模高速度需求打造。',
|
86
|
+
displayName: 'GLM-4.5-AirX',
|
87
|
+
id: 'glm-4.5-airx',
|
88
|
+
maxOutput: 32_768,
|
89
|
+
pricing: {
|
90
|
+
cachedInput: 1.6,
|
91
|
+
currency: 'CNY',
|
92
|
+
input: 8, // 输入长度 [32k, 128k]
|
93
|
+
output: 32,
|
94
|
+
},
|
95
|
+
settings: {
|
96
|
+
extendParams: ['enableReasoning'],
|
97
|
+
searchImpl: 'params',
|
98
|
+
},
|
99
|
+
type: 'chat',
|
100
|
+
},
|
101
|
+
{
|
102
|
+
abilities: {
|
103
|
+
functionCall: true,
|
104
|
+
reasoning: true,
|
105
|
+
search: true,
|
106
|
+
},
|
107
|
+
contextWindowTokens: 128_000,
|
108
|
+
description:
|
109
|
+
'GLM-4.5 的免费版,推理、代码、智能体等任务表现出色。',
|
110
|
+
displayName: 'GLM-4.5-Flash',
|
111
|
+
enabled: true,
|
112
|
+
id: 'glm-4.5-flash',
|
113
|
+
maxOutput: 32_768,
|
114
|
+
pricing: {
|
115
|
+
cachedInput: 0,
|
116
|
+
currency: 'CNY',
|
117
|
+
input: 0,
|
118
|
+
output: 0,
|
119
|
+
},
|
120
|
+
settings: {
|
121
|
+
extendParams: ['enableReasoning'],
|
122
|
+
searchImpl: 'params',
|
123
|
+
},
|
124
|
+
type: 'chat',
|
125
|
+
},
|
4
126
|
{
|
5
127
|
abilities: {
|
6
128
|
reasoning: true,
|
7
129
|
search: true,
|
8
130
|
vision: true,
|
9
131
|
},
|
10
|
-
contextWindowTokens:
|
132
|
+
contextWindowTokens: 65_536,
|
11
133
|
description:
|
12
134
|
'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
|
13
135
|
displayName: 'GLM-4.1V-Thinking-FlashX',
|
14
136
|
id: 'glm-4.1v-thinking-flashx',
|
137
|
+
maxOutput: 16_384,
|
15
138
|
pricing: {
|
16
139
|
currency: 'CNY',
|
17
140
|
input: 2,
|
@@ -28,12 +151,13 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
28
151
|
search: true,
|
29
152
|
vision: true,
|
30
153
|
},
|
31
|
-
contextWindowTokens:
|
154
|
+
contextWindowTokens: 65_536,
|
32
155
|
description:
|
33
156
|
'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
|
34
157
|
displayName: 'GLM-4.1V-Thinking-Flash',
|
35
158
|
enabled: true,
|
36
159
|
id: 'glm-4.1v-thinking-flash',
|
160
|
+
maxOutput: 16_384,
|
37
161
|
pricing: {
|
38
162
|
currency: 'CNY',
|
39
163
|
input: 0,
|
@@ -68,7 +192,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
68
192
|
description: '推理模型: 具备强大推理能力,适用于需要深度推理的任务。',
|
69
193
|
displayName: 'GLM-Z1-Air',
|
70
194
|
id: 'glm-z1-air',
|
71
|
-
maxOutput:
|
195
|
+
maxOutput: 32_768,
|
72
196
|
pricing: {
|
73
197
|
currency: 'CNY',
|
74
198
|
input: 0.5,
|
@@ -84,7 +208,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
84
208
|
reasoning: true,
|
85
209
|
search: true,
|
86
210
|
},
|
87
|
-
contextWindowTokens:
|
211
|
+
contextWindowTokens: 32_768,
|
88
212
|
description: '极速推理:具有超快的推理速度和强大的推理效果。',
|
89
213
|
displayName: 'GLM-Z1-AirX',
|
90
214
|
id: 'glm-z1-airx',
|
@@ -108,7 +232,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
108
232
|
description: '高速低价:Flash增强版本,超快推理速度,更快并发保障。',
|
109
233
|
displayName: 'GLM-Z1-FlashX',
|
110
234
|
id: 'glm-z1-flashx',
|
111
|
-
maxOutput:
|
235
|
+
maxOutput: 32_768,
|
112
236
|
pricing: {
|
113
237
|
currency: 'CNY',
|
114
238
|
input: 0.1,
|
@@ -126,11 +250,10 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
126
250
|
},
|
127
251
|
contextWindowTokens: 128_000,
|
128
252
|
description:
|
129
|
-
'GLM-Z1
|
253
|
+
'GLM-Z1 系列具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。',
|
130
254
|
displayName: 'GLM-Z1-Flash',
|
131
|
-
enabled: true,
|
132
255
|
id: 'glm-z1-flash',
|
133
|
-
maxOutput:
|
256
|
+
maxOutput: 32_768,
|
134
257
|
pricing: {
|
135
258
|
currency: 'CNY',
|
136
259
|
input: 0,
|
@@ -149,7 +272,6 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
149
272
|
contextWindowTokens: 128_000,
|
150
273
|
description: 'GLM-4-Flash 是处理简单任务的理想选择,速度最快且免费。',
|
151
274
|
displayName: 'GLM-4-Flash-250414',
|
152
|
-
enabled: true,
|
153
275
|
id: 'glm-4-flash-250414',
|
154
276
|
maxOutput: 16_000,
|
155
277
|
pricing: {
|
@@ -328,7 +450,6 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
328
450
|
description:
|
329
451
|
'GLM-4V-Flash 专注于高效的单一图像理解,适用于快速图像解析的场景,例如实时图像分析或批量图像处理。',
|
330
452
|
displayName: 'GLM-4V-Flash',
|
331
|
-
enabled: true,
|
332
453
|
id: 'glm-4v-flash',
|
333
454
|
pricing: {
|
334
455
|
currency: 'CNY',
|
@@ -374,7 +495,7 @@ const zhipuChatModels: AIChatModelCard[] = [
|
|
374
495
|
'CodeGeeX-4 是强大的AI编程助手,支持多种编程语言的智能问答与代码补全,提升开发效率。',
|
375
496
|
displayName: 'CodeGeeX-4',
|
376
497
|
id: 'codegeex-4',
|
377
|
-
maxOutput:
|
498
|
+
maxOutput: 32_768,
|
378
499
|
pricing: {
|
379
500
|
currency: 'CNY',
|
380
501
|
input: 0.1,
|
@@ -11,7 +11,15 @@ export const LobeMoonshotAI = createOpenAICompatibleRuntime({
|
|
11
11
|
baseURL: 'https://api.moonshot.cn/v1',
|
12
12
|
chatCompletion: {
|
13
13
|
handlePayload: (payload: ChatStreamPayload) => {
|
14
|
-
const { enabledSearch, temperature, tools, ...rest } = payload;
|
14
|
+
const { enabledSearch, messages, temperature, tools, ...rest } = payload;
|
15
|
+
|
16
|
+
// 为 assistant 空消息添加一个空格 (#8418)
|
17
|
+
const filteredMessages = messages.map(message => {
|
18
|
+
if (message.role === 'assistant' && (!message.content || message.content === '')) {
|
19
|
+
return { ...message, content: ' ' };
|
20
|
+
}
|
21
|
+
return message;
|
22
|
+
});
|
15
23
|
|
16
24
|
const moonshotTools = enabledSearch
|
17
25
|
? [
|
@@ -27,6 +35,7 @@ export const LobeMoonshotAI = createOpenAICompatibleRuntime({
|
|
27
35
|
|
28
36
|
return {
|
29
37
|
...rest,
|
38
|
+
messages: filteredMessages,
|
30
39
|
temperature: temperature !== undefined ? temperature / 2 : undefined,
|
31
40
|
tools: moonshotTools,
|
32
41
|
} as any;
|
@@ -7,7 +7,7 @@ export interface ModelProcessorConfig {
|
|
7
7
|
visionKeywords?: readonly string[];
|
8
8
|
}
|
9
9
|
|
10
|
-
//
|
10
|
+
// 模型能力标签关键词配置
|
11
11
|
export const MODEL_LIST_CONFIGS = {
|
12
12
|
anthropic: {
|
13
13
|
functionCallKeywords: ['claude'],
|
@@ -64,7 +64,7 @@ export const MODEL_LIST_CONFIGS = {
|
|
64
64
|
},
|
65
65
|
zhipu: {
|
66
66
|
functionCallKeywords: ['glm-4', 'glm-z1'],
|
67
|
-
reasoningKeywords: ['glm-zero', 'glm-z1'],
|
67
|
+
reasoningKeywords: ['glm-zero', 'glm-z1', 'glm-4.5'],
|
68
68
|
visionKeywords: ['glm-4v'],
|
69
69
|
},
|
70
70
|
} as const;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import { ModelProvider } from '../types';
|
2
2
|
import { MODEL_LIST_CONFIGS, processModelList } from '../utils/modelParse';
|
3
3
|
import { createOpenAICompatibleRuntime } from '../utils/openaiCompatibleFactory';
|
4
|
+
import { OpenAIStream } from '../utils/streams/openai';
|
5
|
+
import { convertIterableToStream } from '../utils/streams/protocol';
|
4
6
|
|
5
7
|
export interface ZhipuModelCard {
|
6
8
|
description: string;
|
@@ -12,7 +14,8 @@ export const LobeZhipuAI = createOpenAICompatibleRuntime({
|
|
12
14
|
baseURL: 'https://open.bigmodel.cn/api/paas/v4',
|
13
15
|
chatCompletion: {
|
14
16
|
handlePayload: (payload) => {
|
15
|
-
const { enabledSearch, max_tokens, model, temperature, tools, top_p, ...rest } =
|
17
|
+
const { enabledSearch, max_tokens, model, temperature, thinking, tools, top_p, ...rest } =
|
18
|
+
payload;
|
16
19
|
|
17
20
|
const zhipuTools = enabledSearch
|
18
21
|
? [
|
@@ -39,6 +42,7 @@ export const LobeZhipuAI = createOpenAICompatibleRuntime({
|
|
39
42
|
max_tokens,
|
40
43
|
model,
|
41
44
|
stream: true,
|
45
|
+
thinking: model.includes('-4.5') ? { type: thinking?.type } : undefined,
|
42
46
|
tools: zhipuTools,
|
43
47
|
...(model === 'glm-4-alltools'
|
44
48
|
? {
|
@@ -54,6 +58,58 @@ export const LobeZhipuAI = createOpenAICompatibleRuntime({
|
|
54
58
|
}),
|
55
59
|
} as any;
|
56
60
|
},
|
61
|
+
handleStream: (stream, { callbacks, inputStartAt }) => {
|
62
|
+
const readableStream =
|
63
|
+
stream instanceof ReadableStream ? stream : convertIterableToStream(stream);
|
64
|
+
|
65
|
+
// GLM-4.5 系列模型在 tool_calls 中返回的 index 为 -1,需要在进入 OpenAIStream 之前修正
|
66
|
+
// 因为 OpenAIStream 内部会过滤掉 index < 0 的 tool_calls (openai.ts:58-60)
|
67
|
+
const preprocessedStream = readableStream.pipeThrough(
|
68
|
+
new TransformStream({
|
69
|
+
transform(chunk, controller) {
|
70
|
+
// 处理原始的 OpenAI ChatCompletionChunk 格式
|
71
|
+
if (chunk.choices && chunk.choices[0]) {
|
72
|
+
const choice = chunk.choices[0];
|
73
|
+
if (choice.delta?.tool_calls && Array.isArray(choice.delta.tool_calls)) {
|
74
|
+
// 修正负数 index,将 -1 转换为基于数组位置的正数 index
|
75
|
+
const fixedToolCalls = choice.delta.tool_calls.map(
|
76
|
+
(toolCall: any, globalIndex: number) => ({
|
77
|
+
...toolCall,
|
78
|
+
index: toolCall.index < 0 ? globalIndex : toolCall.index,
|
79
|
+
}),
|
80
|
+
);
|
81
|
+
|
82
|
+
// 创建修正后的 chunk
|
83
|
+
const fixedChunk = {
|
84
|
+
...chunk,
|
85
|
+
choices: [
|
86
|
+
{
|
87
|
+
...choice,
|
88
|
+
delta: {
|
89
|
+
...choice.delta,
|
90
|
+
tool_calls: fixedToolCalls,
|
91
|
+
},
|
92
|
+
},
|
93
|
+
],
|
94
|
+
};
|
95
|
+
|
96
|
+
controller.enqueue(fixedChunk);
|
97
|
+
} else {
|
98
|
+
controller.enqueue(chunk);
|
99
|
+
}
|
100
|
+
} else {
|
101
|
+
controller.enqueue(chunk);
|
102
|
+
}
|
103
|
+
},
|
104
|
+
}),
|
105
|
+
);
|
106
|
+
|
107
|
+
return OpenAIStream(preprocessedStream, {
|
108
|
+
callbacks,
|
109
|
+
inputStartAt,
|
110
|
+
provider: 'zhipu',
|
111
|
+
});
|
112
|
+
},
|
57
113
|
},
|
58
114
|
debug: {
|
59
115
|
chatCompletion: () => process.env.DEBUG_ZHIPU_CHAT_COMPLETION === '1',
|