@lobehub/chat 1.131.1 → 1.131.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 CHANGED
@@ -2,6 +2,56 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.131.3](https://github.com/lobehub/lobe-chat/compare/v1.131.2...v1.131.3)
6
+
7
+ <sup>Released on **2025-09-21**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Update Responses search tool to web_search.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Update Responses search tool to web_search, closes [#9354](https://github.com/lobehub/lobe-chat/issues/9354) ([58d34ff](https://github.com/lobehub/lobe-chat/commit/58d34ff))
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.131.2](https://github.com/lobehub/lobe-chat/compare/v1.131.1...v1.131.2)
31
+
32
+ <sup>Released on **2025-09-21**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Use ID as name if provider name is empty.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Use ID as name if provider name is empty, closes [#9356](https://github.com/lobehub/lobe-chat/issues/9356) ([7f60544](https://github.com/lobehub/lobe-chat/commit/7f60544))
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.131.1](https://github.com/lobehub/lobe-chat/compare/v1.131.0...v1.131.1)
6
56
 
7
57
  <sup>Released on **2025-09-21**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Update Responses search tool to web_search."
6
+ ]
7
+ },
8
+ "date": "2025-09-21",
9
+ "version": "1.131.3"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Use ID as name if provider name is empty."
15
+ ]
16
+ },
17
+ "date": "2025-09-21",
18
+ "version": "1.131.2"
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.131.1",
3
+ "version": "1.131.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",
@@ -249,7 +249,7 @@ describe('LobeOpenAI', () => {
249
249
  });
250
250
 
251
251
  describe('responses.handlePayload', () => {
252
- it('should add web_search_preview tool when enabledSearch is true', async () => {
252
+ it('should add web_search tool when enabledSearch is true', async () => {
253
253
  const payload = {
254
254
  messages: [{ content: 'Hello', role: 'user' as const }],
255
255
  model: 'gpt-4o', // 使用常规模型,通过 enabledSearch 触发 responses API
@@ -263,7 +263,7 @@ describe('LobeOpenAI', () => {
263
263
  const createCall = (instance['client'].responses.create as Mock).mock.calls[0][0];
264
264
  expect(createCall.tools).toEqual([
265
265
  { type: 'function', name: 'test', description: 'test' },
266
- { type: 'web_search_preview' },
266
+ { type: 'web_search' },
267
267
  ]);
268
268
  });
269
269
 
@@ -82,7 +82,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
82
82
  ? [
83
83
  ...(tools || []),
84
84
  {
85
- type: 'web_search_preview',
85
+ type: 'web_search',
86
86
  ...(oaiSearchContextSize && {
87
87
  search_context_size: oaiSearchContextSize,
88
88
  }),
@@ -36,7 +36,13 @@ const CreateNewProvider = memo<CreateNewProviderProps>(({ onClose, open }) => {
36
36
  setLoading(true);
37
37
 
38
38
  try {
39
- await createNewAiProvider(values);
39
+ // 如果 name 为空,使用 id 作为 name
40
+ const finalValues = {
41
+ ...values,
42
+ name: values.name || values.id,
43
+ };
44
+
45
+ await createNewAiProvider(finalValues);
40
46
  setLoading(false);
41
47
  router.push(`/settings/provider/${values.id}`);
42
48
  message.success(t('createNewAiProvider.createSuccess'));
@@ -71,7 +77,6 @@ const CreateNewProvider = memo<CreateNewProviderProps>(({ onClose, open }) => {
71
77
  label: t('createNewAiProvider.name.title'),
72
78
  minWidth: 400,
73
79
  name: 'name',
74
- rules: [{ message: t('createNewAiProvider.name.required'), required: true }],
75
80
  },
76
81
  {
77
82
  children: (