@lobehub/chat 1.97.15 → 1.97.17

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.
@@ -1,6 +1,47 @@
1
1
  import { AIChatModelCard } from '@/types/aiModel';
2
2
 
3
3
  const zhipuChatModels: AIChatModelCard[] = [
4
+ {
5
+ abilities: {
6
+ reasoning: true,
7
+ search: true,
8
+ vision: true,
9
+ },
10
+ contextWindowTokens: 64_000,
11
+ description: 'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
12
+ displayName: 'GLM-4.1V-Thinking-FlashX',
13
+ id: 'glm-4.1v-thinking-flashx',
14
+ pricing: {
15
+ currency: 'CNY',
16
+ input: 2,
17
+ output: 2,
18
+ },
19
+ settings: {
20
+ searchImpl: 'params',
21
+ },
22
+ type: 'chat',
23
+ },
24
+ {
25
+ abilities: {
26
+ reasoning: true,
27
+ search: true,
28
+ vision: true,
29
+ },
30
+ contextWindowTokens: 64_000,
31
+ description: 'GLM-4.1V-Thinking 系列模型是目前已知10B级别的VLM模型中性能最强的视觉模型,融合了同级别SOTA的各项视觉语言任务,包括视频理解、图片问答、学科解题、OCR文字识别、文档和图表解读、GUI Agent、前端网页Coding、Grounding等,多项任务能力甚至超过8倍参数量的Qwen2.5-VL-72B。通过领先的强化学习技术,模型掌握了通过思维链推理的方式提升回答的准确性和丰富度,从最终效果和可解释性等维度都显著超过传统的非thinking模型。',
32
+ displayName: 'GLM-4.1V-Thinking-Flash',
33
+ enabled: true,
34
+ id: 'glm-4.1v-thinking-flash',
35
+ pricing: {
36
+ currency: 'CNY',
37
+ input: 0,
38
+ output: 0,
39
+ },
40
+ settings: {
41
+ searchImpl: 'params',
42
+ },
43
+ type: 'chat',
44
+ },
4
45
  {
5
46
  abilities: {
6
47
  reasoning: true,
@@ -21,11 +62,11 @@ const zhipuChatModels: AIChatModelCard[] = [
21
62
  reasoning: true,
22
63
  search: true,
23
64
  },
24
- contextWindowTokens: 32_000,
65
+ contextWindowTokens: 128_000,
25
66
  description: '推理模型: 具备强大推理能力,适用于需要深度推理的任务。',
26
67
  displayName: 'GLM-Z1-Air',
27
68
  id: 'glm-z1-air',
28
- maxOutput: 30_000,
69
+ maxOutput: 32_000,
29
70
  pricing: {
30
71
  currency: 'CNY',
31
72
  input: 0.5,
@@ -61,13 +102,34 @@ const zhipuChatModels: AIChatModelCard[] = [
61
102
  reasoning: true,
62
103
  search: true,
63
104
  },
64
- contextWindowTokens: 32_000,
105
+ contextWindowTokens: 128_000,
106
+ description:
107
+ '高速低价:Flash增强版本,超快推理速度,更快并发保障。',
108
+ displayName: 'GLM-Z1-FlashX',
109
+ id: 'glm-z1-flashx',
110
+ maxOutput: 32_000,
111
+ pricing: {
112
+ currency: 'CNY',
113
+ input: 0.1,
114
+ output: 0.1,
115
+ },
116
+ settings: {
117
+ searchImpl: 'params',
118
+ },
119
+ type: 'chat',
120
+ },
121
+ {
122
+ abilities: {
123
+ reasoning: true,
124
+ search: true,
125
+ },
126
+ contextWindowTokens: 128_000,
65
127
  description:
66
128
  'GLM-Z1 系列具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。最大上下文长度为32K。',
67
129
  displayName: 'GLM-Z1-Flash',
68
130
  enabled: true,
69
131
  id: 'glm-z1-flash',
70
- maxOutput: 30_000,
132
+ maxOutput: 32_000,
71
133
  pricing: {
72
134
  currency: 'CNY',
73
135
  input: 0,
@@ -88,7 +150,7 @@ const zhipuChatModels: AIChatModelCard[] = [
88
150
  displayName: 'GLM-4-Flash-250414',
89
151
  enabled: true,
90
152
  id: 'glm-4-flash-250414',
91
- maxOutput: 4000,
153
+ maxOutput: 16_000,
92
154
  pricing: {
93
155
  currency: 'CNY',
94
156
  input: 0,
@@ -106,9 +168,9 @@ const zhipuChatModels: AIChatModelCard[] = [
106
168
  },
107
169
  contextWindowTokens: 128_000,
108
170
  description: 'GLM-4-FlashX 是Flash的增强版本,超快推理速度。',
109
- displayName: 'GLM-4-FlashX',
171
+ displayName: 'GLM-4-FlashX-250414',
110
172
  id: 'glm-4-flashx',
111
- maxOutput: 4000,
173
+ maxOutput: 16_000,
112
174
  pricing: {
113
175
  currency: 'CNY',
114
176
  input: 0.1,
@@ -144,11 +206,11 @@ const zhipuChatModels: AIChatModelCard[] = [
144
206
  functionCall: true,
145
207
  search: true,
146
208
  },
147
- contextWindowTokens: 32_000,
209
+ contextWindowTokens: 128_000,
148
210
  description: 'GLM-4-Air 是性价比高的版本,性能接近GLM-4,提供快速度和实惠的价格。',
149
211
  displayName: 'GLM-4-Air-250414',
150
212
  id: 'glm-4-air-250414',
151
- maxOutput: 4000,
213
+ maxOutput: 16_000,
152
214
  pricing: {
153
215
  currency: 'CNY',
154
216
  input: 0.5,
@@ -211,8 +273,8 @@ const zhipuChatModels: AIChatModelCard[] = [
211
273
  maxOutput: 4000,
212
274
  pricing: {
213
275
  currency: 'CNY',
214
- input: 50,
215
- output: 50,
276
+ input: 5,
277
+ output: 5,
216
278
  },
217
279
  settings: {
218
280
  searchImpl: 'params',
@@ -279,7 +341,7 @@ const zhipuChatModels: AIChatModelCard[] = [
279
341
  abilities: {
280
342
  vision: true,
281
343
  },
282
- contextWindowTokens: 8192,
344
+ contextWindowTokens: 16_000,
283
345
  description: 'GLM-4V-Plus 具备对视频内容及多图片的理解能力,适合多模态任务。',
284
346
  displayName: 'GLM-4V-Plus-0111',
285
347
  id: 'glm-4v-plus-0111',
@@ -9,7 +9,6 @@ const ZhiPu: ModelProviderCard = {
9
9
  contextWindowTokens: 16_384,
10
10
  description: 'GLM-Zero-Preview具备强大的复杂推理能力,在逻辑推理、数学、编程等领域表现优异。',
11
11
  displayName: 'GLM-Zero-Preview',
12
- enabled: true,
13
12
  id: 'glm-zero-preview',
14
13
  pricing: {
15
14
  currency: 'CNY',
@@ -207,7 +206,7 @@ const ZhiPu: ModelProviderCard = {
207
206
  },
208
207
  },
209
208
  ],
210
- checkModel: 'glm-4-flash',
209
+ checkModel: 'glm-4-flash-250414',
211
210
  description:
212
211
  '智谱 AI 提供多模态与语言模型的开放平台,支持广泛的AI应用场景,包括文本处理、图像理解与编程辅助等。',
213
212
  id: 'zhipu',
@@ -12,11 +12,12 @@ export const LobeHunyuanAI = createOpenAICompatibleRuntime({
12
12
  chatCompletion: {
13
13
  handlePayload: (payload) => {
14
14
  // eslint-disable-next-line unused-imports/no-unused-vars, @typescript-eslint/no-unused-vars
15
- const { enabledSearch, frequency_penalty, presence_penalty, ...rest } = payload;
15
+ const { enabledSearch, frequency_penalty, model, presence_penalty, thinking, ...rest } = payload;
16
16
 
17
17
  return {
18
18
  ...rest,
19
19
  frequency_penalty: undefined,
20
+ model,
20
21
  presence_penalty: undefined,
21
22
  stream: true,
22
23
  ...(enabledSearch && {
@@ -28,6 +29,13 @@ export const LobeHunyuanAI = createOpenAICompatibleRuntime({
28
29
  enable_speed_search: process.env.HUNYUAN_ENABLE_SPEED_SEARCH === '1',
29
30
  search_info: true,
30
31
  }),
32
+ ...(model === 'hunyuan-a13b' && {
33
+ enable_thinking: thinking?.type === 'enabled'
34
+ ? true
35
+ : thinking?.type === 'disabled'
36
+ ? false
37
+ : undefined
38
+ }),
31
39
  } as any;
32
40
  },
33
41
  },