@lobehub/chat 1.84.10 → 1.84.12

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.84.12](https://github.com/lobehub/lobe-chat/compare/v1.84.11...v1.84.12)
6
+
7
+ <sup>Released on **2025-04-30**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Support Qwen3 `thinking_budget` param.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Support Qwen3 `thinking_budget` param, closes [#7643](https://github.com/lobehub/lobe-chat/issues/7643) ([4570ceb](https://github.com/lobehub/lobe-chat/commit/4570ceb))
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.84.11](https://github.com/lobehub/lobe-chat/compare/v1.84.10...v1.84.11)
31
+
32
+ <sup>Released on **2025-04-30**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Allow copy/edit when generate error.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Allow copy/edit when generate error, closes [#7664](https://github.com/lobehub/lobe-chat/issues/7664) ([f518650](https://github.com/lobehub/lobe-chat/commit/f518650))
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.84.10](https://github.com/lobehub/lobe-chat/compare/v1.84.9...v1.84.10)
6
56
 
7
57
  <sup>Released on **2025-04-30**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Support Qwen3 thinking_budget param."
6
+ ]
7
+ },
8
+ "date": "2025-04-30",
9
+ "version": "1.84.12"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Allow copy/edit when generate error."
15
+ ]
16
+ },
17
+ "date": "2025-04-30",
18
+ "version": "1.84.11"
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.84.10",
3
+ "version": "1.84.12",
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",
@@ -16,14 +16,14 @@ const qwenChatModels: AIChatModelCard[] = [
16
16
  id: 'qwen3-235b-a22b',
17
17
  maxOutput: 8192,
18
18
  organization: 'Qwen',
19
- pricing: { // Thinking mode pricing
19
+ pricing: {
20
20
  currency: 'CNY',
21
- input: 40,
22
- output: 12,
21
+ input: 4,
22
+ output: 40, // Thinking mode pricing
23
23
  },
24
24
  releasedAt: '2025-04-28',
25
25
  settings: {
26
- extendParams: ['enableReasoning'],
26
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
27
27
  },
28
28
  type: 'chat',
29
29
  },
@@ -40,14 +40,14 @@ const qwenChatModels: AIChatModelCard[] = [
40
40
  id: 'qwen3-32b',
41
41
  maxOutput: 8192,
42
42
  organization: 'Qwen',
43
- pricing: { // Thinking mode pricing
43
+ pricing: {
44
44
  currency: 'CNY',
45
- input: 20,
46
- output: 8,
45
+ input: 2,
46
+ output: 20, // Thinking mode pricing
47
47
  },
48
48
  releasedAt: '2025-04-28',
49
49
  settings: {
50
- extendParams: ['enableReasoning'],
50
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
51
51
  },
52
52
  type: 'chat',
53
53
  },
@@ -59,19 +59,19 @@ const qwenChatModels: AIChatModelCard[] = [
59
59
  contextWindowTokens: 131_072,
60
60
  description:
61
61
  'Qwen3是一款能力大幅提升的新一代通义千问大模型,在推理、通用、Agent和多语言等多个核心能力上均达到业界领先水平,并支持思考模式切换。',
62
- displayName: 'Qwen3 30B A3B',
62
+ displayName: 'Qwen3 30B',
63
63
  enabled: true,
64
64
  id: 'qwen3-30b-a3b',
65
65
  maxOutput: 8192,
66
66
  organization: 'Qwen',
67
- pricing: { // Thinking mode pricing
67
+ pricing: {
68
68
  currency: 'CNY',
69
- input: 15,
70
- output: 6,
69
+ input: 1.5,
70
+ output: 15, // Thinking mode pricing
71
71
  },
72
72
  releasedAt: '2025-04-28',
73
73
  settings: {
74
- extendParams: ['enableReasoning'],
74
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
75
75
  },
76
76
  type: 'chat',
77
77
  },
@@ -87,14 +87,14 @@ const qwenChatModels: AIChatModelCard[] = [
87
87
  id: 'qwen3-14b',
88
88
  maxOutput: 8192,
89
89
  organization: 'Qwen',
90
- pricing: { // Thinking mode pricing
90
+ pricing: {
91
91
  currency: 'CNY',
92
- input: 10,
93
- output: 4,
92
+ input: 1,
93
+ output: 10, // Thinking mode pricing
94
94
  },
95
95
  releasedAt: '2025-04-28',
96
96
  settings: {
97
- extendParams: ['enableReasoning'],
97
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
98
98
  },
99
99
  type: 'chat',
100
100
  },
@@ -110,14 +110,14 @@ const qwenChatModels: AIChatModelCard[] = [
110
110
  id: 'qwen3-8b',
111
111
  maxOutput: 8192,
112
112
  organization: 'Qwen',
113
- pricing: { // Thinking mode pricing
113
+ pricing: {
114
114
  currency: 'CNY',
115
- input: 5,
116
- output: 2,
115
+ input: 0.5,
116
+ output: 5, // Thinking mode pricing
117
117
  },
118
118
  releasedAt: '2025-04-28',
119
119
  settings: {
120
- extendParams: ['enableReasoning'],
120
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
121
121
  },
122
122
  type: 'chat',
123
123
  },
@@ -133,14 +133,14 @@ const qwenChatModels: AIChatModelCard[] = [
133
133
  id: 'qwen3-4b',
134
134
  maxOutput: 8192,
135
135
  organization: 'Qwen',
136
- pricing: { // Thinking mode pricing
136
+ pricing: {
137
137
  currency: 'CNY',
138
- input: 3,
139
- output: 1.2,
138
+ input: 0.3,
139
+ output: 3, // Thinking mode pricing
140
140
  },
141
141
  releasedAt: '2025-04-28',
142
142
  settings: {
143
- extendParams: ['enableReasoning'],
143
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
144
144
  },
145
145
  type: 'chat',
146
146
  },
@@ -156,14 +156,14 @@ const qwenChatModels: AIChatModelCard[] = [
156
156
  id: 'qwen3-1.7b',
157
157
  maxOutput: 8192,
158
158
  organization: 'Qwen',
159
- pricing: { // Thinking mode pricing
159
+ pricing: {
160
160
  currency: 'CNY',
161
- input: 3,
162
- output: 1.2,
161
+ input: 0.3,
162
+ output: 3, // Thinking mode pricing
163
163
  },
164
164
  releasedAt: '2025-04-28',
165
165
  settings: {
166
- extendParams: ['enableReasoning'],
166
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
167
167
  },
168
168
  type: 'chat',
169
169
  },
@@ -179,14 +179,14 @@ const qwenChatModels: AIChatModelCard[] = [
179
179
  id: 'qwen3-0.6b',
180
180
  maxOutput: 8192,
181
181
  organization: 'Qwen',
182
- pricing: { // Thinking mode pricing
182
+ pricing: {
183
183
  currency: 'CNY',
184
- input: 3,
185
- output: 1.2,
184
+ input: 0.3,
185
+ output: 3, // Thinking mode pricing
186
186
  },
187
187
  releasedAt: '2025-04-28',
188
188
  settings: {
189
- extendParams: ['enableReasoning'],
189
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
190
190
  },
191
191
  type: 'chat',
192
192
  },
@@ -235,7 +235,7 @@ const qwenChatModels: AIChatModelCard[] = [
235
235
  },
236
236
  releasedAt: '2025-04-28',
237
237
  settings: {
238
- extendParams: ['enableReasoning'],
238
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
239
239
  searchImpl: 'params',
240
240
  },
241
241
  type: 'chat',
@@ -260,7 +260,7 @@ const qwenChatModels: AIChatModelCard[] = [
260
260
  },
261
261
  releasedAt: '2025-04-28',
262
262
  settings: {
263
- extendParams: ['enableReasoning'],
263
+ extendParams: ['enableReasoning', 'reasoningBudgetToken'],
264
264
  searchImpl: 'params',
265
265
  },
266
266
  type: 'chat',
@@ -296,6 +296,7 @@ const qwenChatModels: AIChatModelCard[] = [
296
296
  description:
297
297
  '通义千问超大规模语言模型,支持长文本上下文,以及基于长文档、多文档等多个场景的对话功能。',
298
298
  displayName: 'Qwen Long',
299
+ enabled: true,
299
300
  id: 'qwen-long',
300
301
  maxOutput: 6000,
301
302
  organization: 'Qwen',
@@ -5,7 +5,15 @@ import { memo } from 'react';
5
5
  import { useChatListActionsBar } from '../hooks/useChatListActionsBar';
6
6
 
7
7
  export const ErrorActionsBar = memo<ChatActionsBarProps>(({ onActionClick }) => {
8
- const { regenerate, del } = useChatListActionsBar();
8
+ const { regenerate, copy, edit, del } = useChatListActionsBar();
9
9
 
10
- return <ActionIconGroup items={[regenerate, del]} onActionClick={onActionClick} />;
10
+ return (
11
+ <ActionIconGroup
12
+ items={[regenerate, del]}
13
+ menu={{
14
+ items: [edit, copy],
15
+ }}
16
+ onActionClick={onActionClick}
17
+ />
18
+ );
11
19
  });
@@ -30,8 +30,11 @@ export const LobeQwenAI = LobeOpenAICompatibleFactory({
30
30
  ...rest,
31
31
  ...( ['qwen3','qwen-turbo','qwen-plus']
32
32
  .some(keyword => model.toLowerCase().includes(keyword))
33
- ? { enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false }
34
- : {}),
33
+ ? {
34
+ enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
35
+ thinking_budget: thinking?.budget_tokens === 0 ? 0 : (thinking?.budget_tokens || undefined),
36
+ }
37
+ : {}),
35
38
  frequency_penalty: undefined,
36
39
  model,
37
40
  presence_penalty: QwenLegacyModels.has(model)
@@ -41,19 +41,22 @@ export const LobeSiliconCloudAI = LobeOpenAICompatibleFactory({
41
41
  },
42
42
  handlePayload: (payload) => {
43
43
  const { max_tokens, model, thinking, ...rest } = payload;
44
- const thinkingBudget = thinking?.budget_tokens === 0 ? 1 : (thinking?.budget_tokens || undefined)
44
+ const thinkingBudget =
45
+ thinking?.budget_tokens === 0 ? 1 : thinking?.budget_tokens || undefined;
45
46
 
46
47
  return {
47
48
  ...rest,
48
- ...( ['qwen3'].some(keyword => model.toLowerCase().includes(keyword))
49
- ? {
50
- enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
51
- thinking_budget: thinkingBudget === undefined ? undefined : Math.min(Math.max(thinkingBudget, 1), 32_768),
52
- }
49
+ ...(['qwen3'].some((keyword) => model.toLowerCase().includes(keyword))
50
+ ? {
51
+ enable_thinking: thinking !== undefined ? thinking.type === 'enabled' : false,
52
+ thinking_budget:
53
+ thinkingBudget === undefined
54
+ ? undefined
55
+ : Math.min(Math.max(thinkingBudget, 1), 32_768),
56
+ }
53
57
  : {}),
54
- max_tokens: max_tokens === undefined
55
- ? undefined
56
- : Math.min(Math.max(max_tokens, 1), 16_384),
58
+ max_tokens:
59
+ max_tokens === undefined ? undefined : Math.min(Math.max(max_tokens, 1), 16_384),
57
60
  model,
58
61
  stream: !payload.tools,
59
62
  } as any;