@lobehub/chat 1.94.7 → 1.94.9

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.94.9](https://github.com/lobehub/lobe-chat/compare/v1.94.8...v1.94.9)
6
+
7
+ <sup>Released on **2025-06-15**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Add `kimi-thinking-preview` model from Moonshot.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Add `kimi-thinking-preview` model from Moonshot, closes [#8171](https://github.com/lobehub/lobe-chat/issues/8171) ([93d677c](https://github.com/lobehub/lobe-chat/commit/93d677c))
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.94.8](https://github.com/lobehub/lobe-chat/compare/v1.94.7...v1.94.8)
31
+
32
+ <sup>Released on **2025-06-15**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Correctly handle `reasoning_effort`.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Correctly handle `reasoning_effort`, closes [#8180](https://github.com/lobehub/lobe-chat/issues/8180) ([1c04736](https://github.com/lobehub/lobe-chat/commit/1c04736))
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.94.7](https://github.com/lobehub/lobe-chat/compare/v1.94.6...v1.94.7)
6
56
 
7
57
  <sup>Released on **2025-06-12**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Add kimi-thinking-preview model from Moonshot."
6
+ ]
7
+ },
8
+ "date": "2025-06-15",
9
+ "version": "1.94.9"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Correctly handle reasoning_effort."
15
+ ]
16
+ },
17
+ "date": "2025-06-15",
18
+ "version": "1.94.8"
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.94.7",
3
+ "version": "1.94.9",
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",
@@ -121,7 +121,7 @@
121
121
  "dependencies": {
122
122
  "@ant-design/icons": "^5.6.1",
123
123
  "@ant-design/pro-components": "^2.8.7",
124
- "@anthropic-ai/sdk": "^0.53.0",
124
+ "@anthropic-ai/sdk": "^0.54.0",
125
125
  "@auth/core": "^0.38.0",
126
126
  "@aws-sdk/client-bedrock-runtime": "^3.821.0",
127
127
  "@aws-sdk/client-s3": "^3.821.0",
@@ -26,6 +26,25 @@ const moonshotChatModels: AIChatModelCard[] = [
26
26
  },
27
27
  type: 'chat',
28
28
  },
29
+ {
30
+ abilities: {
31
+ reasoning: true,
32
+ vision: true,
33
+ },
34
+ contextWindowTokens: 131_072,
35
+ description:
36
+ 'kimi-thinking-preview 模型是月之暗面提供的具有多模态推理能力和通用推理能力的多模态思考模型,它擅长深度推理,帮助解决更多更难的事情',
37
+ displayName: 'Kimi Thinking Preview',
38
+ enabled: true,
39
+ id: 'kimi-thinking-preview',
40
+ pricing: {
41
+ currency: 'CNY',
42
+ input: 200,
43
+ output: 200,
44
+ },
45
+ releasedAt: '2025-05-06',
46
+ type: 'chat',
47
+ },
29
48
  {
30
49
  abilities: {
31
50
  functionCall: true,
@@ -40,7 +40,9 @@ export const LobeMoonshotAI = createOpenAICompatibleRuntime({
40
40
 
41
41
  const functionCallKeywords = ['moonshot-v1', 'kimi-latest'];
42
42
 
43
- const visionKeywords = ['kimi-latest', 'vision'];
43
+ const visionKeywords = ['kimi-latest', 'kimi-thinking', 'vision'];
44
+
45
+ const reasoningKeywords = ['thinking'];
44
46
 
45
47
  const modelsPage = (await client.models.list()) as any;
46
48
  const modelList: MoonshotModelCard[] = modelsPage.data;
@@ -60,7 +62,10 @@ export const LobeMoonshotAI = createOpenAICompatibleRuntime({
60
62
  knownModel?.abilities?.functionCall ||
61
63
  false,
62
64
  id: model.id,
63
- reasoning: knownModel?.abilities?.reasoning || false,
65
+ reasoning:
66
+ reasoningKeywords.some((keyword) => model.id.toLowerCase().includes(keyword)) ||
67
+ knownModel?.abilities?.reasoning ||
68
+ false,
64
69
  vision:
65
70
  visionKeywords.some((keyword) => model.id.toLowerCase().includes(keyword)) ||
66
71
  knownModel?.abilities?.vision ||
@@ -530,6 +530,11 @@ export const generateAIChat: StateCreator<
530
530
  ? agentConfig.params.max_tokens
531
531
  : undefined;
532
532
 
533
+ // 4. handle reasoning_effort
534
+ agentConfig.params.reasoning_effort = chatConfig.enableReasoningEffort
535
+ ? agentConfig.params.reasoning_effort
536
+ : undefined;
537
+
533
538
  let isFunctionCall = false;
534
539
  let msgTraceId: string | undefined;
535
540
  let output = '';