@lobehub/chat 1.88.11 → 1.88.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,31 @@
|
|
2
2
|
|
3
3
|
# Changelog
|
4
4
|
|
5
|
+
### [Version 1.88.12](https://github.com/lobehub/lobe-chat/compare/v1.88.11...v1.88.12)
|
6
|
+
|
7
|
+
<sup>Released on **2025-05-27**</sup>
|
8
|
+
|
9
|
+
#### 💄 Styles
|
10
|
+
|
11
|
+
- **misc**: Support adjust thinkingBudget in gemini 2.5 flash.
|
12
|
+
|
13
|
+
<br/>
|
14
|
+
|
15
|
+
<details>
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
17
|
+
|
18
|
+
#### Styles
|
19
|
+
|
20
|
+
- **misc**: Support adjust thinkingBudget in gemini 2.5 flash, closes [#7947](https://github.com/lobehub/lobe-chat/issues/7947) ([a9db548](https://github.com/lobehub/lobe-chat/commit/a9db548))
|
21
|
+
|
22
|
+
</details>
|
23
|
+
|
24
|
+
<div align="right">
|
25
|
+
|
26
|
+
[](#readme-top)
|
27
|
+
|
28
|
+
</div>
|
29
|
+
|
5
30
|
### [Version 1.88.11](https://github.com/lobehub/lobe-chat/compare/v1.88.10...v1.88.11)
|
6
31
|
|
7
32
|
<sup>Released on **2025-05-26**</sup>
|
package/changelog/v1.json
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@lobehub/chat",
|
3
|
-
"version": "1.88.
|
3
|
+
"version": "1.88.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",
|
@@ -68,6 +68,7 @@ const googleChatModels: AIChatModelCard[] = [
|
|
68
68
|
},
|
69
69
|
releasedAt: '2025-05-20',
|
70
70
|
settings: {
|
71
|
+
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
71
72
|
searchImpl: 'params',
|
72
73
|
searchProvider: 'google',
|
73
74
|
},
|
@@ -91,6 +92,7 @@ const googleChatModels: AIChatModelCard[] = [
|
|
91
92
|
},
|
92
93
|
releasedAt: '2025-04-17',
|
93
94
|
settings: {
|
95
|
+
extendParams: ['enableReasoning', 'reasoningBudgetToken'],
|
94
96
|
searchImpl: 'params',
|
95
97
|
searchProvider: 'google',
|
96
98
|
},
|
@@ -89,6 +89,7 @@ interface LobeGoogleAIParams {
|
|
89
89
|
|
90
90
|
interface GoogleAIThinkingConfig {
|
91
91
|
includeThoughts?: boolean;
|
92
|
+
thinkingBudget?: number;
|
92
93
|
}
|
93
94
|
|
94
95
|
export class LobeGoogleAI implements LobeRuntimeAI {
|
@@ -113,10 +114,11 @@ export class LobeGoogleAI implements LobeRuntimeAI {
|
|
113
114
|
async chat(rawPayload: ChatStreamPayload, options?: ChatCompetitionOptions) {
|
114
115
|
try {
|
115
116
|
const payload = this.buildPayload(rawPayload);
|
116
|
-
const model = payload
|
117
|
+
const { model, thinking } = payload;
|
117
118
|
|
118
119
|
const thinkingConfig: GoogleAIThinkingConfig = {
|
119
120
|
includeThoughts: true,
|
121
|
+
thinkingBudget: thinking?.type === 'enabled' ? Math.min(thinking.budget_tokens, 24_576) : 0,
|
120
122
|
};
|
121
123
|
|
122
124
|
const contents = await this.buildGoogleMessages(payload.messages);
|