@lobehub/chat 1.131.2 → 1.131.4

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.4](https://github.com/lobehub/lobe-chat/compare/v1.131.3...v1.131.4)
6
+
7
+ <sup>Released on **2025-09-21**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Enhanced AkashChat experience.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Enhanced AkashChat experience, closes [#9330](https://github.com/lobehub/lobe-chat/issues/9330) ([47ec2d8](https://github.com/lobehub/lobe-chat/commit/47ec2d8))
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.3](https://github.com/lobehub/lobe-chat/compare/v1.131.2...v1.131.3)
31
+
32
+ <sup>Released on **2025-09-21**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Update Responses search tool to web_search.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **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))
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.2](https://github.com/lobehub/lobe-chat/compare/v1.131.1...v1.131.2)
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
+ "improvements": [
5
+ "Enhanced AkashChat experience."
6
+ ]
7
+ },
8
+ "date": "2025-09-21",
9
+ "version": "1.131.4"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Update Responses search tool to web_search."
15
+ ]
16
+ },
17
+ "date": "2025-09-21",
18
+ "version": "1.131.3"
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.2",
3
+ "version": "1.131.4",
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",
@@ -12,16 +12,9 @@ const akashChatModels: AIChatModelCard[] = [
12
12
  displayName: 'DeepSeek V3.1',
13
13
  enabled: true,
14
14
  id: 'DeepSeek-V3-1',
15
- type: 'chat',
16
- },
17
- {
18
- abilities: {
19
- functionCall: true,
20
- reasoning: true,
15
+ settings: {
16
+ extendParams: ['enableReasoning'],
21
17
  },
22
- contextWindowTokens: 65_536,
23
- displayName: 'DeepSeek R1 Distill Qwen 32B',
24
- id: 'DeepSeek-R1-Distill-Qwen-32B',
25
18
  type: 'chat',
26
19
  },
27
20
  {
@@ -34,12 +27,12 @@ const akashChatModels: AIChatModelCard[] = [
34
27
  displayName: 'GPT-OSS-120B',
35
28
  enabled: true,
36
29
  id: 'gpt-oss-120b',
30
+ settings: {
31
+ extendParams: ['reasoningEffort'],
32
+ },
37
33
  type: 'chat',
38
34
  },
39
35
  {
40
- abilities: {
41
- functionCall: true,
42
- },
43
36
  contextWindowTokens: 262_144,
44
37
  description:
45
38
  'Qwen3 235B A22B Instruct 2507:面向高级推理与对话指令优化的模型,混合专家架构以在大规模参数下保持推理效率。',
@@ -49,7 +42,15 @@ const akashChatModels: AIChatModelCard[] = [
49
42
  },
50
43
  {
51
44
  abilities: {
52
- functionCall: true,
45
+ reasoning: true,
46
+ },
47
+ contextWindowTokens: 65_536,
48
+ displayName: 'DeepSeek R1 Distill Qwen 32B',
49
+ id: 'DeepSeek-R1-Distill-Qwen-32B',
50
+ type: 'chat',
51
+ },
52
+ {
53
+ abilities: {
53
54
  vision: true,
54
55
  },
55
56
  contextWindowTokens: 131_072,
@@ -1,7 +1,7 @@
1
1
  import { AIChatModelCard } from '../types/aiModel';
2
2
 
3
3
  // https://docs.mistral.ai/getting-started/models/models_overview/
4
- // https://mistral.ai/products/la-plateforme#pricing
4
+ // https://mistral.ai/pricing#api-pricing
5
5
 
6
6
  const mistralChatModels: AIChatModelCard[] = [
7
7
  {
@@ -10,7 +10,7 @@ const mistralChatModels: AIChatModelCard[] = [
10
10
  },
11
11
  contextWindowTokens: 128_000,
12
12
  description: 'Mistral Medium 3 以 8 倍的成本提供最先进的性能,并从根本上简化了企业部署。',
13
- displayName: 'Mistral Medium 3',
13
+ displayName: 'Mistral Medium 3.1',
14
14
  enabled: true,
15
15
  id: 'mistral-medium-latest',
16
16
  pricing: {
@@ -21,6 +21,41 @@ const mistralChatModels: AIChatModelCard[] = [
21
21
  },
22
22
  type: 'chat',
23
23
  },
24
+ {
25
+ abilities: {
26
+ reasoning: true,
27
+ vision: true,
28
+ },
29
+ contextWindowTokens: 128_000,
30
+ description: 'Magistral Medium 1.2 是Mistral AI于2025年9月发布的前沿级推理模型,具有视觉支持。',
31
+ displayName: 'Magistral Medium 1.2',
32
+ enabled: true,
33
+ id: 'magistral-medium-latest',
34
+ pricing: {
35
+ units: [
36
+ { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
37
+ { name: 'textOutput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
38
+ ],
39
+ },
40
+ type: 'chat',
41
+ },
42
+ {
43
+ abilities: {
44
+ reasoning: true,
45
+ vision: true,
46
+ },
47
+ contextWindowTokens: 128_000,
48
+ description: 'Magistral Small 1.2 是Mistral AI于2025年9月发布的开源小型推理模型,具有视觉支持。',
49
+ displayName: 'Magistral Small 1.2',
50
+ id: 'magistral-small-2509',
51
+ pricing: {
52
+ units: [
53
+ { name: 'textInput', rate: 0.5, strategy: 'fixed', unit: 'millionTokens' },
54
+ { name: 'textOutput', rate: 1.5, strategy: 'fixed', unit: 'millionTokens' },
55
+ ],
56
+ },
57
+ type: 'chat',
58
+ },
24
59
  {
25
60
  abilities: {
26
61
  functionCall: true,
@@ -46,7 +81,6 @@ const mistralChatModels: AIChatModelCard[] = [
46
81
  contextWindowTokens: 128_000,
47
82
  description: 'Mistral Small是成本效益高、快速且可靠的选项,适用于翻译、摘要和情感分析等用例。',
48
83
  displayName: 'Mistral Small 3.2',
49
- enabled: true,
50
84
  id: 'mistral-small-latest',
51
85
  pricing: {
52
86
  units: [
@@ -65,7 +99,6 @@ const mistralChatModels: AIChatModelCard[] = [
65
99
  description:
66
100
  'Mistral Large是旗舰大模型,擅长多语言任务、复杂推理和代码生成,是高端应用的理想选择。',
67
101
  displayName: 'Mistral Large 2.1',
68
- enabled: true,
69
102
  id: 'mistral-large-latest',
70
103
  pricing: {
71
104
  units: [
@@ -75,23 +108,6 @@ const mistralChatModels: AIChatModelCard[] = [
75
108
  },
76
109
  type: 'chat',
77
110
  },
78
- {
79
- abilities: {
80
- reasoning: true,
81
- },
82
- contextWindowTokens: 128_000,
83
- description: 'Magistral Medium 1.1 是 Mistral AI 于2025年7月发布的前沿级推理模型。',
84
- displayName: 'Magistral Medium 1.1',
85
- enabled: true,
86
- id: 'magistral-medium-latest',
87
- pricing: {
88
- units: [
89
- { name: 'textInput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
90
- { name: 'textOutput', rate: 5, strategy: 'fixed', unit: 'millionTokens' },
91
- ],
92
- },
93
- type: 'chat',
94
- },
95
111
  {
96
112
  abilities: {
97
113
  functionCall: true,
@@ -119,7 +135,6 @@ const mistralChatModels: AIChatModelCard[] = [
119
135
  description:
120
136
  'Pixtral Large 是一款拥有 1240 亿参数的开源多模态模型,基于 Mistral Large 2 构建。这是我们多模态家族中的第二款模型,展现了前沿水平的图像理解能力。',
121
137
  displayName: 'Pixtral Large',
122
- enabled: true,
123
138
  id: 'pixtral-large-latest',
124
139
  pricing: {
125
140
  units: [
@@ -2,6 +2,10 @@ import { createOpenAICompatibleRuntime } from '../../core/openaiCompatibleFactor
2
2
  import { ModelProvider } from '../../types';
3
3
  import { processMultiProviderModelList } from '../../utils/modelParse';
4
4
 
5
+ const THINKING_MODELS = [
6
+ 'DeepSeek-V3-1',
7
+ ];
8
+
5
9
  export interface AkashChatModelCard {
6
10
  id: string;
7
11
  }
@@ -10,12 +14,22 @@ export const LobeAkashChatAI = createOpenAICompatibleRuntime({
10
14
  baseURL: 'https://chatapi.akash.network/api/v1',
11
15
  chatCompletion: {
12
16
  handlePayload: (payload) => {
13
- const { model, ...rest } = payload;
17
+ const { model, thinking, ...rest } = payload;
18
+
19
+ const thinkingFlag =
20
+ thinking?.type === 'enabled' ? true : thinking?.type === 'disabled' ? false : undefined;
14
21
 
15
22
  return {
16
23
  ...rest,
24
+ allowed_openai_params: ['reasoning_effort'],
25
+ cache: { 'no-cache': true },
17
26
  model,
18
27
  stream: true,
28
+ ...(THINKING_MODELS.some((keyword) => model.includes(keyword))
29
+ ? {
30
+ chat_template_kwargs: { thinking: thinkingFlag },
31
+ }
32
+ : {}),
19
33
  } as any;
20
34
  },
21
35
  },
@@ -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
  }),