@lobehub/chat 1.65.2 → 1.66.1

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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.66.1](https://github.com/lobehub/lobe-chat/compare/v1.66.0...v1.66.1)
6
+
7
+ <sup>Released on **2025-02-27**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Added eu-central-1 region for bedrock.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Added eu-central-1 region for bedrock, closes [#6555](https://github.com/lobehub/lobe-chat/issues/6555) ([6f1e599](https://github.com/lobehub/lobe-chat/commit/6f1e599))
21
+
22
+ </details>
23
+
24
+ <div align="right">
25
+
26
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
27
+
28
+ </div>
29
+
30
+ ## [Version 1.66.0](https://github.com/lobehub/lobe-chat/compare/v1.65.2...v1.66.0)
31
+
32
+ <sup>Released on **2025-02-27**</sup>
33
+
34
+ #### ✨ Features
35
+
36
+ - **misc**: Add online search support for available providers.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's improved
44
+
45
+ - **misc**: Add online search support for available providers, closes [#6475](https://github.com/lobehub/lobe-chat/issues/6475) ([cb0a3bc](https://github.com/lobehub/lobe-chat/commit/cb0a3bc))
46
+
47
+ </details>
48
+
49
+ <div align="right">
50
+
51
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
52
+
53
+ </div>
54
+
5
55
  ### [Version 1.65.2](https://github.com/lobehub/lobe-chat/compare/v1.65.1...v1.65.2)
6
56
 
7
57
  <sup>Released on **2025-02-27**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Added eu-central-1 region for bedrock."
6
+ ]
7
+ },
8
+ "date": "2025-02-27",
9
+ "version": "1.66.1"
10
+ },
11
+ {
12
+ "children": {
13
+ "features": [
14
+ "Add online search support for available providers."
15
+ ]
16
+ },
17
+ "date": "2025-02-27",
18
+ "version": "1.66.0"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.65.2",
3
+ "version": "1.66.1",
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",
@@ -54,7 +54,7 @@ export const useBedrockProvider = (): ProviderItem => {
54
54
  children: (
55
55
  <Select
56
56
  allowClear
57
- options={['us-east-1', 'us-west-2', 'ap-southeast-1'].map((i) => ({
57
+ options={['us-east-1', 'us-west-2', 'ap-southeast-1', 'eu-central-1'].map((i) => ({
58
58
  label: i,
59
59
  value: i,
60
60
  }))}
@@ -68,7 +68,7 @@ const useBedrockCard = (): ProviderItem => {
68
68
  ) : (
69
69
  <Select
70
70
  allowClear
71
- options={['us-east-1', 'us-west-2', 'ap-southeast-1'].map((i) => ({
71
+ options={['us-east-1', 'us-west-2', 'ap-southeast-1', 'eu-central-1'].map((i) => ({
72
72
  label: i,
73
73
  value: i,
74
74
  }))}
@@ -52,6 +52,7 @@ const ai360ChatModels: AIChatModelCard[] = [
52
52
  {
53
53
  abilities: {
54
54
  functionCall: true,
55
+ search: true,
55
56
  },
56
57
  contextWindowTokens: 8000,
57
58
  description:
@@ -64,6 +65,9 @@ const ai360ChatModels: AIChatModelCard[] = [
64
65
  input: 2,
65
66
  output: 5,
66
67
  },
68
+ settings: {
69
+ searchImpl: 'params',
70
+ },
67
71
  type: 'chat',
68
72
  },
69
73
  {
@@ -4,6 +4,7 @@ const baichuanChatModels: AIChatModelCard[] = [
4
4
  {
5
5
  abilities: {
6
6
  functionCall: true,
7
+ search: true,
7
8
  },
8
9
  contextWindowTokens: 32_768,
9
10
  description:
@@ -17,11 +18,15 @@ const baichuanChatModels: AIChatModelCard[] = [
17
18
  input: 100,
18
19
  output: 100,
19
20
  },
21
+ settings: {
22
+ searchImpl: 'params',
23
+ },
20
24
  type: 'chat',
21
25
  },
22
26
  {
23
27
  abilities: {
24
28
  functionCall: true,
29
+ search: true,
25
30
  },
26
31
  contextWindowTokens: 32_768,
27
32
  description:
@@ -35,11 +40,15 @@ const baichuanChatModels: AIChatModelCard[] = [
35
40
  input: 15,
36
41
  output: 15,
37
42
  },
43
+ settings: {
44
+ searchImpl: 'params',
45
+ },
38
46
  type: 'chat',
39
47
  },
40
48
  {
41
49
  abilities: {
42
50
  functionCall: true,
51
+ search: true,
43
52
  },
44
53
  contextWindowTokens: 32_768,
45
54
  description:
@@ -53,11 +62,15 @@ const baichuanChatModels: AIChatModelCard[] = [
53
62
  input: 0.98,
54
63
  output: 0.98,
55
64
  },
65
+ settings: {
66
+ searchImpl: 'params',
67
+ },
56
68
  type: 'chat',
57
69
  },
58
70
  {
59
71
  abilities: {
60
72
  functionCall: true,
73
+ search: true,
61
74
  },
62
75
  contextWindowTokens: 32_768,
63
76
  description:
@@ -70,6 +83,9 @@ const baichuanChatModels: AIChatModelCard[] = [
70
83
  input: 12,
71
84
  output: 12,
72
85
  },
86
+ settings: {
87
+ searchImpl: 'params',
88
+ },
73
89
  type: 'chat',
74
90
  },
75
91
  {
@@ -20,6 +20,9 @@ const hunyuanChatModels: AIChatModelCard[] = [
20
20
  type: 'chat',
21
21
  },
22
22
  {
23
+ abilities: {
24
+ search: true,
25
+ },
23
26
  contextWindowTokens: 32_000,
24
27
  description:
25
28
  '采用更优的路由策略,同时缓解了负载均衡和专家趋同的问题。长文方面,大海捞针指标达到99.9%。MOE-32K 性价比相对更高,在平衡效果、价格的同时,可对实现对长文本输入的处理。',
@@ -33,9 +36,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
33
36
  output: 2,
34
37
  },
35
38
  releasedAt: '2025-02-10',
39
+ settings: {
40
+ searchImpl: 'params',
41
+ },
36
42
  type: 'chat',
37
43
  },
38
44
  {
45
+ abilities: {
46
+ search: true,
47
+ },
39
48
  contextWindowTokens: 256_000,
40
49
  description:
41
50
  '采用更优的路由策略,同时缓解了负载均衡和专家趋同的问题。长文方面,大海捞针指标达到99.9%。MOE-256K 在长度和效果上进一步突破,极大的扩展了可输入长度。',
@@ -49,11 +58,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
49
58
  output: 2,
50
59
  },
51
60
  releasedAt: '2025-02-10',
61
+ settings: {
62
+ searchImpl: 'params',
63
+ },
52
64
  type: 'chat',
53
65
  },
54
66
  {
55
67
  abilities: {
56
68
  functionCall: true,
69
+ search: true,
57
70
  },
58
71
  contextWindowTokens: 32_000,
59
72
  description:
@@ -68,11 +81,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
68
81
  output: 50,
69
82
  },
70
83
  releasedAt: '2025-01-10',
84
+ settings: {
85
+ searchImpl: 'params',
86
+ },
71
87
  type: 'chat',
72
88
  },
73
89
  {
74
90
  abilities: {
75
91
  functionCall: true,
92
+ search: true,
76
93
  },
77
94
  contextWindowTokens: 32_000,
78
95
  description:
@@ -86,11 +103,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
86
103
  output: 50,
87
104
  },
88
105
  releasedAt: '2025-01-10',
106
+ settings: {
107
+ searchImpl: 'params',
108
+ },
89
109
  type: 'chat',
90
110
  },
91
111
  {
92
112
  abilities: {
93
113
  functionCall: true,
114
+ search: true,
94
115
  },
95
116
  contextWindowTokens: 32_000,
96
117
  description:
@@ -104,11 +125,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
104
125
  output: 50,
105
126
  },
106
127
  releasedAt: '2025-01-10',
128
+ settings: {
129
+ searchImpl: 'params',
130
+ },
107
131
  type: 'chat',
108
132
  },
109
133
  {
110
134
  abilities: {
111
135
  functionCall: true,
136
+ search: true,
112
137
  },
113
138
  contextWindowTokens: 32_000,
114
139
  description:
@@ -122,9 +147,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
122
147
  output: 50,
123
148
  },
124
149
  releasedAt: '2024-11-20',
150
+ settings: {
151
+ searchImpl: 'params',
152
+ },
125
153
  type: 'chat',
126
154
  },
127
155
  {
156
+ abilities: {
157
+ search: true,
158
+ },
128
159
  contextWindowTokens: 32_000,
129
160
  description:
130
161
  'Hunyuan-large 模型总参数量约 389B,激活参数量约 52B,是当前业界参数规模最大、效果最好的 Transformer 架构的开源 MoE 模型。',
@@ -138,9 +169,15 @@ const hunyuanChatModels: AIChatModelCard[] = [
138
169
  output: 12,
139
170
  },
140
171
  releasedAt: '2025-02-10',
172
+ settings: {
173
+ searchImpl: 'params',
174
+ },
141
175
  type: 'chat',
142
176
  },
143
177
  {
178
+ abilities: {
179
+ search: true,
180
+ },
144
181
  contextWindowTokens: 134_000,
145
182
  description:
146
183
  '擅长处理长文任务如文档摘要和文档问答等,同时也具备处理通用文本生成任务的能力。在长文本的分析和生成上表现优异,能有效应对复杂和详尽的长文内容处理需求。',
@@ -154,6 +191,9 @@ const hunyuanChatModels: AIChatModelCard[] = [
154
191
  output: 18,
155
192
  },
156
193
  releasedAt: '2024-12-18',
194
+ settings: {
195
+ searchImpl: 'params',
196
+ },
157
197
  type: 'chat',
158
198
  },
159
199
  {
@@ -4,6 +4,7 @@ const moonshotChatModels: AIChatModelCard[] = [
4
4
  {
5
5
  abilities: {
6
6
  functionCall: true,
7
+ search: true,
7
8
  vision: true,
8
9
  },
9
10
  contextWindowTokens: 131_072,
@@ -19,11 +20,15 @@ const moonshotChatModels: AIChatModelCard[] = [
19
20
  output: 60,
20
21
  },
21
22
  releasedAt: '2025-02-17',
23
+ settings: {
24
+ searchImpl: 'params',
25
+ },
22
26
  type: 'chat',
23
27
  },
24
28
  {
25
29
  abilities: {
26
30
  functionCall: true,
31
+ search: true,
27
32
  },
28
33
  contextWindowTokens: 131_072,
29
34
  description:
@@ -35,11 +40,15 @@ const moonshotChatModels: AIChatModelCard[] = [
35
40
  input: 60,
36
41
  output: 60,
37
42
  },
43
+ settings: {
44
+ searchImpl: 'params',
45
+ },
38
46
  type: 'chat',
39
47
  },
40
48
  {
41
49
  abilities: {
42
50
  functionCall: true,
51
+ search: true,
43
52
  },
44
53
  contextWindowTokens: 8192,
45
54
  description:
@@ -51,11 +60,15 @@ const moonshotChatModels: AIChatModelCard[] = [
51
60
  input: 12,
52
61
  output: 12,
53
62
  },
63
+ settings: {
64
+ searchImpl: 'params',
65
+ },
54
66
  type: 'chat',
55
67
  },
56
68
  {
57
69
  abilities: {
58
70
  functionCall: true,
71
+ search: true,
59
72
  },
60
73
  contextWindowTokens: 32_768,
61
74
  description:
@@ -67,11 +80,15 @@ const moonshotChatModels: AIChatModelCard[] = [
67
80
  input: 24,
68
81
  output: 24,
69
82
  },
83
+ settings: {
84
+ searchImpl: 'params',
85
+ },
70
86
  type: 'chat',
71
87
  },
72
88
  {
73
89
  abilities: {
74
90
  functionCall: true,
91
+ search: true,
75
92
  },
76
93
  contextWindowTokens: 131_072,
77
94
  description:
@@ -83,11 +100,15 @@ const moonshotChatModels: AIChatModelCard[] = [
83
100
  input: 60,
84
101
  output: 60,
85
102
  },
103
+ settings: {
104
+ searchImpl: 'params',
105
+ },
86
106
  type: 'chat',
87
107
  },
88
108
  {
89
109
  abilities: {
90
110
  functionCall: true,
111
+ search: true,
91
112
  vision: true,
92
113
  },
93
114
  contextWindowTokens: 8192,
@@ -101,11 +122,15 @@ const moonshotChatModels: AIChatModelCard[] = [
101
122
  output: 12,
102
123
  },
103
124
  releasedAt: '2025-01-14',
125
+ settings: {
126
+ searchImpl: 'params',
127
+ },
104
128
  type: 'chat',
105
129
  },
106
130
  {
107
131
  abilities: {
108
132
  functionCall: true,
133
+ search: true,
109
134
  vision: true,
110
135
  },
111
136
  contextWindowTokens: 32_768,
@@ -119,11 +144,15 @@ const moonshotChatModels: AIChatModelCard[] = [
119
144
  output: 24,
120
145
  },
121
146
  releasedAt: '2025-01-14',
147
+ settings: {
148
+ searchImpl: 'params',
149
+ },
122
150
  type: 'chat',
123
151
  },
124
152
  {
125
153
  abilities: {
126
154
  functionCall: true,
155
+ search: true,
127
156
  vision: true,
128
157
  },
129
158
  contextWindowTokens: 131_072,
@@ -137,6 +166,9 @@ const moonshotChatModels: AIChatModelCard[] = [
137
166
  output: 60,
138
167
  },
139
168
  releasedAt: '2025-01-14',
169
+ settings: {
170
+ searchImpl: 'params',
171
+ },
140
172
  type: 'chat',
141
173
  },
142
174
  ];
@@ -2,6 +2,9 @@ import { AIChatModelCard } from '@/types/aiModel';
2
2
 
3
3
  const sparkChatModels: AIChatModelCard[] = [
4
4
  {
5
+ abilities: {
6
+ search: true,
7
+ },
5
8
  contextWindowTokens: 8192,
6
9
  description:
7
10
  'Spark Lite 是一款轻量级大语言模型,具备极低的延迟与高效的处理能力,完全免费开放,支持实时在线搜索功能。其快速响应的特性使其在低算力设备上的推理应用和模型微调中表现出色,为用户带来出色的成本效益和智能体验,尤其在知识问答、内容生成及搜索场景下表现不俗。',
@@ -9,9 +12,15 @@ const sparkChatModels: AIChatModelCard[] = [
9
12
  enabled: true,
10
13
  id: 'lite',
11
14
  maxOutput: 4096,
15
+ settings: {
16
+ searchImpl: 'internal',
17
+ },
12
18
  type: 'chat',
13
19
  },
14
20
  {
21
+ abilities: {
22
+ search: true,
23
+ },
15
24
  contextWindowTokens: 8192,
16
25
  description:
17
26
  'Spark Pro 是一款为专业领域优化的高性能大语言模型,专注数学、编程、医疗、教育等多个领域,并支持联网搜索及内置天气、日期等插件。其优化后模型在复杂知识问答、语言理解及高层次文本创作中展现出色表现和高效性能,是适合专业应用场景的理想选择。',
@@ -19,9 +28,15 @@ const sparkChatModels: AIChatModelCard[] = [
19
28
  enabled: true,
20
29
  id: 'generalv3',
21
30
  maxOutput: 8192,
31
+ settings: {
32
+ searchImpl: 'internal',
33
+ },
22
34
  type: 'chat',
23
35
  },
24
36
  {
37
+ abilities: {
38
+ search: true,
39
+ },
25
40
  contextWindowTokens: 131_072,
26
41
  description:
27
42
  'Spark Pro 128K 配置了特大上下文处理能力,能够处理多达128K的上下文信息,特别适合需通篇分析和长期逻辑关联处理的长文内容,可在复杂文本沟通中提供流畅一致的逻辑与多样的引用支持。',
@@ -29,11 +44,15 @@ const sparkChatModels: AIChatModelCard[] = [
29
44
  enabled: true,
30
45
  id: 'pro-128k',
31
46
  maxOutput: 4096,
47
+ settings: {
48
+ searchImpl: 'internal',
49
+ },
32
50
  type: 'chat',
33
51
  },
34
52
  {
35
53
  abilities: {
36
54
  functionCall: true,
55
+ search: true,
37
56
  },
38
57
  contextWindowTokens: 8192,
39
58
  description:
@@ -42,11 +61,15 @@ const sparkChatModels: AIChatModelCard[] = [
42
61
  enabled: true,
43
62
  id: 'generalv3.5',
44
63
  maxOutput: 8192,
64
+ settings: {
65
+ searchImpl: 'internal',
66
+ },
45
67
  type: 'chat',
46
68
  },
47
69
  {
48
70
  abilities: {
49
71
  functionCall: true,
72
+ search: true,
50
73
  },
51
74
  contextWindowTokens: 32_768,
52
75
  description:
@@ -55,11 +78,15 @@ const sparkChatModels: AIChatModelCard[] = [
55
78
  enabled: true,
56
79
  id: 'max-32k',
57
80
  maxOutput: 8192,
81
+ settings: {
82
+ searchImpl: 'internal',
83
+ },
58
84
  type: 'chat',
59
85
  },
60
86
  {
61
87
  abilities: {
62
88
  functionCall: true,
89
+ search: true,
63
90
  },
64
91
  contextWindowTokens: 8192,
65
92
  description:
@@ -68,6 +95,9 @@ const sparkChatModels: AIChatModelCard[] = [
68
95
  enabled: true,
69
96
  id: '4.0Ultra',
70
97
  maxOutput: 8192,
98
+ settings: {
99
+ searchImpl: 'internal',
100
+ },
71
101
  type: 'chat',
72
102
  },
73
103
  ];
@@ -6,6 +6,7 @@ const stepfunChatModels: AIChatModelCard[] = [
6
6
  {
7
7
  abilities: {
8
8
  functionCall: true,
9
+ search: true,
9
10
  },
10
11
  contextWindowTokens: 8000,
11
12
  description: '高速模型,适合实时对话。',
@@ -17,11 +18,15 @@ const stepfunChatModels: AIChatModelCard[] = [
17
18
  input: 1,
18
19
  output: 4,
19
20
  },
21
+ settings: {
22
+ searchImpl: 'params',
23
+ },
20
24
  type: 'chat',
21
25
  },
22
26
  {
23
27
  abilities: {
24
28
  functionCall: true,
29
+ search: true,
25
30
  },
26
31
  contextWindowTokens: 8000,
27
32
  description: '小型模型,适合轻量级任务。',
@@ -33,11 +38,15 @@ const stepfunChatModels: AIChatModelCard[] = [
33
38
  input: 5,
34
39
  output: 20,
35
40
  },
41
+ settings: {
42
+ searchImpl: 'params',
43
+ },
36
44
  type: 'chat',
37
45
  },
38
46
  {
39
47
  abilities: {
40
48
  functionCall: true,
49
+ search: true,
41
50
  },
42
51
  contextWindowTokens: 32_000,
43
52
  description: '支持中等长度的对话,适用于多种应用场景。',
@@ -49,11 +58,15 @@ const stepfunChatModels: AIChatModelCard[] = [
49
58
  input: 15,
50
59
  output: 70,
51
60
  },
61
+ settings: {
62
+ searchImpl: 'params',
63
+ },
52
64
  type: 'chat',
53
65
  },
54
66
  {
55
67
  abilities: {
56
68
  functionCall: true,
69
+ search: true,
57
70
  },
58
71
  contextWindowTokens: 128_000,
59
72
  description: '平衡性能与成本,适合一般场景。',
@@ -65,11 +78,15 @@ const stepfunChatModels: AIChatModelCard[] = [
65
78
  input: 40,
66
79
  output: 200,
67
80
  },
81
+ settings: {
82
+ searchImpl: 'params',
83
+ },
68
84
  type: 'chat',
69
85
  },
70
86
  {
71
87
  abilities: {
72
88
  functionCall: true,
89
+ search: true,
73
90
  },
74
91
  contextWindowTokens: 256_000,
75
92
  description: '具备超长上下文处理能力,尤其适合长文档分析。',
@@ -80,11 +97,15 @@ const stepfunChatModels: AIChatModelCard[] = [
80
97
  input: 95,
81
98
  output: 300,
82
99
  },
100
+ settings: {
101
+ searchImpl: 'params',
102
+ },
83
103
  type: 'chat',
84
104
  },
85
105
  {
86
106
  abilities: {
87
107
  functionCall: true,
108
+ search: true,
88
109
  },
89
110
  contextWindowTokens: 16_000,
90
111
  description: '支持大规模上下文交互,适合复杂对话场景。',
@@ -96,11 +117,15 @@ const stepfunChatModels: AIChatModelCard[] = [
96
117
  input: 38,
97
118
  output: 120,
98
119
  },
120
+ settings: {
121
+ searchImpl: 'params',
122
+ },
99
123
  type: 'chat',
100
124
  },
101
125
  {
102
126
  abilities: {
103
127
  functionCall: true,
128
+ search: true,
104
129
  },
105
130
  contextWindowTokens: 8000,
106
131
  description:
@@ -114,11 +139,15 @@ const stepfunChatModels: AIChatModelCard[] = [
114
139
  output: 2,
115
140
  },
116
141
  releasedAt: '2025-01-14',
142
+ settings: {
143
+ searchImpl: 'params',
144
+ },
117
145
  type: 'chat',
118
146
  },
119
147
  {
120
148
  abilities: {
121
149
  functionCall: true,
150
+ search: true,
122
151
  },
123
152
  contextWindowTokens: 16_000,
124
153
  description: 'step-2模型的实验版本,包含最新的特性,滚动更新中。不推荐在正式生产环境使用。',
@@ -131,11 +160,15 @@ const stepfunChatModels: AIChatModelCard[] = [
131
160
  output: 120,
132
161
  },
133
162
  releasedAt: '2025-01-15',
163
+ settings: {
164
+ searchImpl: 'params',
165
+ },
134
166
  type: 'chat',
135
167
  },
136
168
  {
137
169
  abilities: {
138
170
  functionCall: true,
171
+ search: true,
139
172
  vision: true,
140
173
  },
141
174
  contextWindowTokens: 8000,
@@ -148,11 +181,15 @@ const stepfunChatModels: AIChatModelCard[] = [
148
181
  input: 5,
149
182
  output: 20,
150
183
  },
184
+ settings: {
185
+ searchImpl: 'params',
186
+ },
151
187
  type: 'chat',
152
188
  },
153
189
  {
154
190
  abilities: {
155
191
  functionCall: true,
192
+ search: true,
156
193
  vision: true,
157
194
  },
158
195
  contextWindowTokens: 32_000,
@@ -164,11 +201,15 @@ const stepfunChatModels: AIChatModelCard[] = [
164
201
  input: 15,
165
202
  output: 70,
166
203
  },
204
+ settings: {
205
+ searchImpl: 'params',
206
+ },
167
207
  type: 'chat',
168
208
  },
169
209
  {
170
210
  abilities: {
171
211
  functionCall: true,
212
+ search: true,
172
213
  vision: true,
173
214
  },
174
215
  contextWindowTokens: 32_000,
@@ -182,6 +223,9 @@ const stepfunChatModels: AIChatModelCard[] = [
182
223
  output: 70,
183
224
  },
184
225
  releasedAt: '2025-01-22',
226
+ settings: {
227
+ searchImpl: 'params',
228
+ },
185
229
  type: 'chat',
186
230
  },
187
231
  {
@@ -20,6 +20,7 @@ const zhipuChatModels: AIChatModelCard[] = [
20
20
  {
21
21
  abilities: {
22
22
  functionCall: true,
23
+ search: true,
23
24
  },
24
25
  contextWindowTokens: 128_000,
25
26
  description: 'GLM-4-Flash 是处理简单任务的理想选择,速度最快且免费。',
@@ -31,11 +32,15 @@ const zhipuChatModels: AIChatModelCard[] = [
31
32
  input: 0,
32
33
  output: 0,
33
34
  },
35
+ settings: {
36
+ searchImpl: 'params',
37
+ },
34
38
  type: 'chat',
35
39
  },
36
40
  {
37
41
  abilities: {
38
42
  functionCall: true,
43
+ search: true,
39
44
  },
40
45
  contextWindowTokens: 128_000,
41
46
  description: 'GLM-4-FlashX 是Flash的增强版本,超快推理速度。',
@@ -47,11 +52,15 @@ const zhipuChatModels: AIChatModelCard[] = [
47
52
  input: 0.1,
48
53
  output: 0.1,
49
54
  },
55
+ settings: {
56
+ searchImpl: 'params',
57
+ },
50
58
  type: 'chat',
51
59
  },
52
60
  {
53
61
  abilities: {
54
62
  functionCall: true,
63
+ search: true,
55
64
  },
56
65
  contextWindowTokens: 1_024_000,
57
66
  description: 'GLM-4-Long 支持超长文本输入,适合记忆型任务与大规模文档处理。',
@@ -62,11 +71,15 @@ const zhipuChatModels: AIChatModelCard[] = [
62
71
  input: 1,
63
72
  output: 1,
64
73
  },
74
+ settings: {
75
+ searchImpl: 'params',
76
+ },
65
77
  type: 'chat',
66
78
  },
67
79
  {
68
80
  abilities: {
69
81
  functionCall: true,
82
+ search: true,
70
83
  },
71
84
  contextWindowTokens: 128_000,
72
85
  description: 'GLM-4-Air 是性价比高的版本,性能接近GLM-4,提供快速度和实惠的价格。',
@@ -78,11 +91,15 @@ const zhipuChatModels: AIChatModelCard[] = [
78
91
  input: 1,
79
92
  output: 1,
80
93
  },
94
+ settings: {
95
+ searchImpl: 'params',
96
+ },
81
97
  type: 'chat',
82
98
  },
83
99
  {
84
100
  abilities: {
85
101
  functionCall: true,
102
+ search: true,
86
103
  },
87
104
  contextWindowTokens: 8192,
88
105
  description: 'GLM-4-AirX 提供 GLM-4-Air 的高效版本,推理速度可达其2.6倍。',
@@ -94,11 +111,15 @@ const zhipuChatModels: AIChatModelCard[] = [
94
111
  input: 10,
95
112
  output: 10,
96
113
  },
114
+ settings: {
115
+ searchImpl: 'params',
116
+ },
97
117
  type: 'chat',
98
118
  },
99
119
  {
100
120
  abilities: {
101
121
  functionCall: true,
122
+ search: true,
102
123
  },
103
124
  contextWindowTokens: 128_000,
104
125
  description:
@@ -110,11 +131,15 @@ const zhipuChatModels: AIChatModelCard[] = [
110
131
  input: 100,
111
132
  output: 100,
112
133
  },
134
+ settings: {
135
+ searchImpl: 'params',
136
+ },
113
137
  type: 'chat',
114
138
  },
115
139
  {
116
140
  abilities: {
117
141
  functionCall: true,
142
+ search: true,
118
143
  },
119
144
  contextWindowTokens: 128_000,
120
145
  description: 'GLM-4-Plus 作为高智能旗舰,具备强大的处理长文本和复杂任务的能力,性能全面提升。',
@@ -126,11 +151,15 @@ const zhipuChatModels: AIChatModelCard[] = [
126
151
  input: 50,
127
152
  output: 50,
128
153
  },
154
+ settings: {
155
+ searchImpl: 'params',
156
+ },
129
157
  type: 'chat',
130
158
  },
131
159
  {
132
160
  abilities: {
133
161
  functionCall: true,
162
+ search: true,
134
163
  },
135
164
  contextWindowTokens: 128_000,
136
165
  description: 'GLM-4-0520 是最新模型版本,专为高度复杂和多样化任务设计,表现卓越。',
@@ -141,11 +170,15 @@ const zhipuChatModels: AIChatModelCard[] = [
141
170
  input: 100,
142
171
  output: 100,
143
172
  },
173
+ settings: {
174
+ searchImpl: 'params',
175
+ },
144
176
  type: 'chat',
145
177
  },
146
178
  {
147
179
  abilities: {
148
180
  functionCall: true,
181
+ search: true,
149
182
  },
150
183
  contextWindowTokens: 128_000,
151
184
  description: 'GLM-4 是发布于2024年1月的旧旗舰版本,目前已被更强的 GLM-4-0520 取代。',
@@ -156,6 +189,9 @@ const zhipuChatModels: AIChatModelCard[] = [
156
189
  input: 100,
157
190
  output: 100,
158
191
  },
192
+ settings: {
193
+ searchImpl: 'params',
194
+ },
159
195
  type: 'chat',
160
196
  },
161
197
  {
@@ -77,7 +77,7 @@ const BedrockForm = memo(() => {
77
77
  onChange={(region) => {
78
78
  setConfig('bedrock', { region });
79
79
  }}
80
- options={['us-east-1', 'us-west-2', 'ap-southeast-1'].map((i) => ({
80
+ options={['us-east-1', 'us-west-2', 'ap-southeast-1', 'eu-central-1'].map((i) => ({
81
81
  label: i,
82
82
  value: i,
83
83
  }))}
@@ -13,9 +13,22 @@ export const LobeAi360AI = LobeOpenAICompatibleFactory({
13
13
  baseURL: 'https://api.360.cn/v1',
14
14
  chatCompletion: {
15
15
  handlePayload: (payload) => {
16
+ const { enabledSearch, tools, ...rest } = payload;
17
+
18
+ const ai360Tools = enabledSearch ? [
19
+ ...(tools || []),
20
+ {
21
+ type: "web_search",
22
+ web_search: {
23
+ search_mode: "auto",
24
+ },
25
+ }
26
+ ] : tools;
27
+
16
28
  return {
17
- ...payload,
18
- stream: !payload.tools,
29
+ ...rest,
30
+ stream: !ai360Tools,
31
+ tools: ai360Tools,
19
32
  } as any;
20
33
  },
21
34
  },
@@ -1,5 +1,3 @@
1
- import OpenAI from 'openai';
2
-
3
1
  import { ChatStreamPayload, ModelProvider } from '../types';
4
2
  import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
5
3
 
@@ -17,14 +15,26 @@ export const LobeBaichuanAI = LobeOpenAICompatibleFactory({
17
15
  baseURL: 'https://api.baichuan-ai.com/v1',
18
16
  chatCompletion: {
19
17
  handlePayload: (payload: ChatStreamPayload) => {
20
- const { temperature, ...rest } = payload;
18
+ const { enabledSearch, temperature, tools, ...rest } = payload;
19
+
20
+ const baichuanTools = enabledSearch ? [
21
+ ...(tools || []),
22
+ {
23
+ type: "web_search",
24
+ web_search: {
25
+ enable: true,
26
+ search_mode: process.env.BAICHUAN_SEARCH_MODE || "performance_first", // performance_first or quality_first
27
+ },
28
+ }
29
+ ] : tools;
21
30
 
22
31
  return {
23
32
  ...rest,
24
33
  // [baichuan] frequency_penalty must be between 1 and 2.
25
34
  frequency_penalty: undefined,
26
35
  temperature: temperature !== undefined ? temperature / 2 : undefined,
27
- } as OpenAI.ChatCompletionCreateParamsStreaming;
36
+ tools: baichuanTools,
37
+ } as any;
28
38
  },
29
39
  },
30
40
  debug: {
@@ -9,6 +9,24 @@ export interface HunyuanModelCard {
9
9
 
10
10
  export const LobeHunyuanAI = LobeOpenAICompatibleFactory({
11
11
  baseURL: 'https://api.hunyuan.cloud.tencent.com/v1',
12
+ chatCompletion: {
13
+ handlePayload: (payload) => {
14
+ const { enabledSearch, ...rest } = payload;
15
+
16
+ return {
17
+ ...rest,
18
+ ...(enabledSearch && {
19
+ /*
20
+ citation: true,
21
+ enable_multimedia: true,
22
+ search_info: true
23
+ */
24
+ enable_enhancement: true,
25
+ enable_speed_search: process.env.HUNYUAN_ENABLE_SPEED_SEARCH === '1',
26
+ }),
27
+ } as any;
28
+ },
29
+ },
12
30
  debug: {
13
31
  chatCompletion: () => process.env.DEBUG_HUNYUAN_CHAT_COMPLETION === '1',
14
32
  },
@@ -12,23 +12,14 @@ export const LobeMinimaxAI = LobeOpenAICompatibleFactory({
12
12
  baseURL: 'https://api.minimax.chat/v1',
13
13
  chatCompletion: {
14
14
  handlePayload: (payload) => {
15
- const { temperature, top_p, ...params } = payload;
15
+ const { max_tokens, temperature, top_p, ...params } = payload;
16
16
 
17
17
  return {
18
18
  ...params,
19
19
  frequency_penalty: undefined,
20
- max_tokens: payload.max_tokens !== undefined ? payload.max_tokens : getMinimaxMaxOutputs(payload.model),
20
+ max_tokens: max_tokens !== undefined ? max_tokens : getMinimaxMaxOutputs(payload.model),
21
21
  presence_penalty: undefined,
22
- stream: true,
23
22
  temperature: temperature === undefined || temperature <= 0 ? undefined : temperature / 2,
24
- tools: params.tools?.map((tool) => ({
25
- function: {
26
- description: tool.function.description,
27
- name: tool.function.name,
28
- parameters: JSON.stringify(tool.function.parameters),
29
- },
30
- type: 'function',
31
- })),
32
23
  top_p: top_p !== undefined && top_p > 0 && top_p <= 1 ? top_p : undefined,
33
24
  } as any;
34
25
  },
@@ -1,5 +1,3 @@
1
- import OpenAI from 'openai';
2
-
3
1
  import { ChatStreamPayload, ModelProvider } from '../types';
4
2
  import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
5
3
 
@@ -13,12 +11,23 @@ export const LobeMoonshotAI = LobeOpenAICompatibleFactory({
13
11
  baseURL: 'https://api.moonshot.cn/v1',
14
12
  chatCompletion: {
15
13
  handlePayload: (payload: ChatStreamPayload) => {
16
- const { temperature, ...rest } = payload;
14
+ const { enabledSearch, temperature, tools, ...rest } = payload;
15
+
16
+ const moonshotTools = enabledSearch ? [
17
+ ...(tools || []),
18
+ {
19
+ function: {
20
+ name: "$web_search",
21
+ },
22
+ type: "builtin_function",
23
+ }
24
+ ] : tools;
17
25
 
18
26
  return {
19
27
  ...rest,
20
28
  temperature: temperature !== undefined ? temperature / 2 : undefined,
21
- } as OpenAI.ChatCompletionCreateParamsStreaming;
29
+ tools: moonshotTools,
30
+ } as any;
22
31
  },
23
32
  },
24
33
  debug: {
@@ -50,6 +50,10 @@ export const LobeQwenAI = LobeOpenAICompatibleFactory({
50
50
  ...(enabledSearch && {
51
51
  enable_search: enabledSearch,
52
52
  search_options: {
53
+ /*
54
+ enable_citation: true,
55
+ enable_source: true,
56
+ */
53
57
  search_strategy: process.env.QWEN_SEARCH_STRATEGY || 'standard', // standard or pro
54
58
  },
55
59
  }),
@@ -11,9 +11,22 @@ export const LobeStepfunAI = LobeOpenAICompatibleFactory({
11
11
  baseURL: 'https://api.stepfun.com/v1',
12
12
  chatCompletion: {
13
13
  handlePayload: (payload) => {
14
+ const { enabledSearch, tools, ...rest } = payload;
15
+
16
+ const stepfunTools = enabledSearch ? [
17
+ ...(tools || []),
18
+ {
19
+ function: {
20
+ description: "use web_search to search information on the internet",
21
+ },
22
+ type: "web_search",
23
+ }
24
+ ] : tools;
25
+
14
26
  return {
15
- ...payload,
16
- stream: !payload.tools,
27
+ ...rest,
28
+ stream: !stepfunTools,
29
+ tools: stepfunTools,
17
30
  } as any;
18
31
  },
19
32
  },
@@ -1,6 +1,4 @@
1
- import OpenAI from 'openai';
2
-
3
- import { ChatStreamPayload, ModelProvider } from '../types';
1
+ import { ModelProvider } from '../types';
4
2
  import { LobeOpenAICompatibleFactory } from '../utils/openaiCompatibleFactory';
5
3
 
6
4
  import type { ChatModelCard } from '@/types/llm';
@@ -14,9 +12,21 @@ export interface ZhipuModelCard {
14
12
  export const LobeZhipuAI = LobeOpenAICompatibleFactory({
15
13
  baseURL: 'https://open.bigmodel.cn/api/paas/v4',
16
14
  chatCompletion: {
17
- handlePayload: ({ max_tokens, model, temperature, top_p, ...payload }: ChatStreamPayload) =>
18
- ({
19
- ...payload,
15
+ handlePayload: (payload) => {
16
+ const { enabledSearch, max_tokens, model, temperature, tools, top_p, ...rest } = payload;
17
+
18
+ const zhipuTools = enabledSearch ? [
19
+ ...(tools || []),
20
+ {
21
+ type: "web_search",
22
+ web_search: {
23
+ enable: true,
24
+ },
25
+ }
26
+ ] : tools;
27
+
28
+ return {
29
+ ...rest,
20
30
  max_tokens:
21
31
  max_tokens === undefined ? undefined :
22
32
  (model.includes('glm-4v') && Math.min(max_tokens, 1024)) ||
@@ -24,6 +34,7 @@ export const LobeZhipuAI = LobeOpenAICompatibleFactory({
24
34
  max_tokens,
25
35
  model,
26
36
  stream: true,
37
+ tools: zhipuTools,
27
38
  ...(model === 'glm-4-alltools'
28
39
  ? {
29
40
  temperature:
@@ -36,7 +47,8 @@ export const LobeZhipuAI = LobeOpenAICompatibleFactory({
36
47
  temperature: temperature !== undefined ? temperature / 2 : undefined,
37
48
  top_p,
38
49
  }),
39
- }) as OpenAI.ChatCompletionCreateParamsStreaming,
50
+ } as any;
51
+ },
40
52
  },
41
53
  constructorOptions: {
42
54
  defaultHeaders: {