@lobehub/chat 1.111.7 → 1.111.8

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/.i18nrc.js CHANGED
@@ -25,7 +25,7 @@ module.exports = defineConfig({
25
25
  ],
26
26
  temperature: 0,
27
27
  saveImmediately: true,
28
- modelName: 'gpt-4.1-mini',
28
+ modelName: 'gpt-5-mini',
29
29
  experimental: {
30
30
  jsonMode: true,
31
31
  },
package/CHANGELOG.md CHANGED
@@ -2,6 +2,31 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.111.8](https://github.com/lobehub/lobe-chat/compare/v1.111.7...v1.111.8)
6
+
7
+ <sup>Released on **2025-08-11**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Support new GPT-5 Verbosity params.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Support new GPT-5 Verbosity params, closes [#8715](https://github.com/lobehub/lobe-chat/issues/8715) ([0a724aa](https://github.com/lobehub/lobe-chat/commit/0a724aa))
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
+
5
30
  ### [Version 1.111.7](https://github.com/lobehub/lobe-chat/compare/v1.111.6...v1.111.7)
6
31
 
7
32
  <sup>Released on **2025-08-11**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Support new GPT-5 Verbosity params."
6
+ ]
7
+ },
8
+ "date": "2025-08-11",
9
+ "version": "1.111.8"
10
+ },
2
11
  {
3
12
  "children": {
4
13
  "improvements": [
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "شدة الاستدلال"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "مستوى تفصيل المخرجات النصية"
51
+ },
49
52
  "thinking": {
50
53
  "title": "مفتاح التفكير العميق"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Интензитет на разсъждение"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Ниво на подробност на изходния текст"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Превключвател за дълбоко мислене"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Argumentationsstärke"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Detaillierungsgrad des Ausgabetextes"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Tiefdenk-Schalter"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Reasoning Intensity"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Output Text Detail Level"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Deep Thinking Switch"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Intensidad de razonamiento"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Nivel de detalle del texto de salida"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Interruptor de pensamiento profundo"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "شدت استدلال"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "سطح جزئیات متن خروجی"
51
+ },
49
52
  "thinking": {
50
53
  "title": "کلید تفکر عمیق"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Intensité du raisonnement"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Niveau de détail du texte de sortie"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Interrupteur de réflexion approfondie"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Intensità del ragionamento"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Livello di dettaglio dell'output testuale"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Interruttore di pensiero profondo"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "推論の強度"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "出力テキストの詳細レベル"
51
+ },
49
52
  "thinking": {
50
53
  "title": "深い思考のスイッチ"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "추론 강도"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "출력 텍스트 상세 수준"
51
+ },
49
52
  "thinking": {
50
53
  "title": "심층 사고 스위치"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Redeneringsinspanning"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Gedetailleerdheid van de uitvoer"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Diepdenkschakelaar"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Intensywność rozumowania"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Poziom szczegółowości tekstu wyjściowego"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Przełącznik głębokiego myślenia"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Intensidade de Raciocínio"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Nível de detalhamento do texto de saída"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Interruptor de Pensamento Profundo"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Интенсивность рассуждений"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Уровень подробности выводимого текста"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Переключатель глубокого мышления"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Akıl Yürütme Gücü"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Çıktı metninin ayrıntı düzeyi"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Derin Düşünme Anahtarı"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "Cường độ suy luận"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "Mức độ chi tiết của văn bản đầu ra"
51
+ },
49
52
  "thinking": {
50
53
  "title": "Công tắc suy nghĩ sâu"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "推理强度"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "输出文本详细程度"
51
+ },
49
52
  "thinking": {
50
53
  "title": "深度思考开关"
51
54
  },
@@ -46,6 +46,9 @@
46
46
  "reasoningEffort": {
47
47
  "title": "推理強度"
48
48
  },
49
+ "textVerbosity": {
50
+ "title": "輸出文本詳細程度"
51
+ },
49
52
  "thinking": {
50
53
  "title": "深度思考開關"
51
54
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.111.7",
3
+ "version": "1.111.8",
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",
@@ -56,16 +56,33 @@ export class LobeAzureOpenAI implements LobeRuntimeAI {
56
56
  }));
57
57
 
58
58
  try {
59
- const response = await this.client.chat.completions.create({
59
+ // Create parameters with proper typing for OpenAI SDK, handling reasoning_effort compatibility
60
+ const { reasoning_effort, ...otherParams } = params;
61
+
62
+ // Convert 'minimal' to 'low' for OpenAI SDK compatibility
63
+ const compatibleReasoningEffort = reasoning_effort === 'minimal' ? 'low' : reasoning_effort;
64
+
65
+ const baseParams = {
60
66
  messages: await convertOpenAIMessages(
61
67
  updatedMessages as OpenAI.ChatCompletionMessageParam[],
62
68
  ),
63
69
  model,
64
- ...params,
70
+ ...otherParams,
65
71
  max_completion_tokens: undefined,
66
- stream: enableStreaming,
67
- tool_choice: params.tools ? 'auto' : undefined,
68
- });
72
+ tool_choice: params.tools ? ('auto' as const) : undefined,
73
+ };
74
+
75
+ // Add reasoning_effort only if it exists and cast to proper type
76
+ const openaiParams = compatibleReasoningEffort
77
+ ? {
78
+ ...baseParams,
79
+ reasoning_effort: compatibleReasoningEffort as 'low' | 'medium' | 'high',
80
+ }
81
+ : baseParams;
82
+
83
+ const response = enableStreaming
84
+ ? await this.client.chat.completions.create({ ...openaiParams, stream: true })
85
+ : await this.client.chat.completions.create({ ...openaiParams, stream: false });
69
86
  if (enableStreaming) {
70
87
  const stream = response as Stream<OpenAI.ChatCompletionChunk>;
71
88
  const [prod, debug] = stream.tee();
@@ -60,7 +60,7 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
60
60
  provider: ModelProvider.OpenAI,
61
61
  responses: {
62
62
  handlePayload: (payload) => {
63
- const { enabledSearch, model, tools, ...rest } = payload;
63
+ const { enabledSearch, model, tools, verbosity, ...rest } = payload;
64
64
 
65
65
  const openaiTools = enabledSearch
66
66
  ? [
@@ -85,6 +85,9 @@ export const LobeOpenAI = createOpenAICompatibleRuntime({
85
85
  tools: openaiTools as any,
86
86
  // computer-use series must set truncation as auto
87
87
  ...(model.startsWith('computer-use') && { truncation: 'auto' }),
88
+ text: verbosity
89
+ ? { verbosity }
90
+ : undefined,
88
91
  }) as any;
89
92
  }
90
93
 
@@ -107,7 +107,7 @@ export interface ChatStreamPayload {
107
107
  effort?: string;
108
108
  summary?: string;
109
109
  };
110
- reasoning_effort?: 'low' | 'medium' | 'high';
110
+ reasoning_effort?: 'minimal' | 'low' | 'medium' | 'high';
111
111
  responseMode?: 'stream' | 'json';
112
112
  /**
113
113
  * @title 是否开启流式请求
@@ -119,6 +119,9 @@ export interface ChatStreamPayload {
119
119
  * @default 1
120
120
  */
121
121
  temperature: number;
122
+ text?: {
123
+ verbosity?: 'low' | 'medium' | 'high';
124
+ };
122
125
  /**
123
126
  * use for Claude and Gemini
124
127
  */
@@ -135,6 +138,7 @@ export interface ChatStreamPayload {
135
138
  */
136
139
  top_p?: number;
137
140
  truncation?: 'auto' | 'disabled';
141
+ verbosity?: 'low' | 'medium' | 'high';
138
142
  }
139
143
 
140
144
  export interface ChatMethodOptions {
@@ -26,6 +26,11 @@ export interface LobeAgentChatConfig {
26
26
  enableReasoningEffort?: boolean;
27
27
  reasoningBudgetToken?: number;
28
28
  reasoningEffort?: 'low' | 'medium' | 'high';
29
+ gpt5ReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high';
30
+ /**
31
+ * 输出文本详细程度控制
32
+ */
33
+ textVerbosity?: 'low' | 'medium' | 'high';
29
34
  thinking?: 'disabled' | 'auto' | 'enabled';
30
35
  thinkingBudget?: number;
31
36
  /**
@@ -71,4 +76,5 @@ export const AgentChatConfigSchema = z.object({
71
76
  })
72
77
  .optional(),
73
78
  searchMode: z.enum(['off', 'on', 'auto']).optional(),
79
+ textVerbosity: z.enum(['low', 'medium', 'high']).optional(),
74
80
  });
@@ -210,6 +210,8 @@ export type ExtendParamsType =
210
210
  | 'enableReasoning'
211
211
  | 'disableContextCaching'
212
212
  | 'reasoningEffort'
213
+ | 'gpt5ReasoningEffort'
214
+ | 'textVerbosity'
213
215
  | 'thinking'
214
216
  | 'thinkingBudget';
215
217
 
@@ -20,12 +20,12 @@ const aihubmixModels: AIChatModelCard[] = [
20
20
  units: [
21
21
  { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
22
22
  { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
23
- { name: 'textInput_cacheRead', rate: 0.13, strategy: 'fixed', unit: 'millionTokens' },
23
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
24
24
  ],
25
25
  },
26
26
  releasedAt: '2025-08-07',
27
27
  settings: {
28
- extendParams: ['reasoningEffort'],
28
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
29
29
  searchImpl: 'params',
30
30
  },
31
31
  type: 'chat',
@@ -48,12 +48,12 @@ const aihubmixModels: AIChatModelCard[] = [
48
48
  units: [
49
49
  { name: 'textInput', rate: 0.25, strategy: 'fixed', unit: 'millionTokens' },
50
50
  { name: 'textOutput', rate: 2, strategy: 'fixed', unit: 'millionTokens' },
51
- { name: 'textInput_cacheRead', rate: 0.03, strategy: 'fixed', unit: 'millionTokens' },
51
+ { name: 'textInput_cacheRead', rate: 0.025, strategy: 'fixed', unit: 'millionTokens' },
52
52
  ],
53
53
  },
54
54
  releasedAt: '2025-08-07',
55
55
  settings: {
56
- extendParams: ['reasoningEffort'],
56
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
57
57
  searchImpl: 'params',
58
58
  },
59
59
  type: 'chat',
@@ -61,13 +61,13 @@ const aihubmixModels: AIChatModelCard[] = [
61
61
  {
62
62
  abilities: {
63
63
  functionCall: true,
64
+ imageOutput: true,
64
65
  reasoning: true,
65
66
  vision: true,
66
67
  },
67
68
  contextWindowTokens: 400_000,
68
69
  description: '最快、最经济高效的 GPT-5 版本。非常适合需要快速响应且成本敏感的应用场景。',
69
70
  displayName: 'GPT-5 nano',
70
- enabled: true,
71
71
  id: 'gpt-5-nano',
72
72
  maxOutput: 128_000,
73
73
  pricing: {
@@ -78,10 +78,14 @@ const aihubmixModels: AIChatModelCard[] = [
78
78
  ],
79
79
  },
80
80
  releasedAt: '2025-08-07',
81
+ settings: {
82
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
83
+ },
81
84
  type: 'chat',
82
85
  },
83
86
  {
84
87
  abilities: {
88
+ reasoning: true,
85
89
  vision: true,
86
90
  },
87
91
  contextWindowTokens: 400_000,
@@ -95,7 +99,7 @@ const aihubmixModels: AIChatModelCard[] = [
95
99
  units: [
96
100
  { name: 'textInput', rate: 1.25, strategy: 'fixed', unit: 'millionTokens' },
97
101
  { name: 'textOutput', rate: 10, strategy: 'fixed', unit: 'millionTokens' },
98
- { name: 'textInput_cacheRead', rate: 0.13, strategy: 'fixed', unit: 'millionTokens' },
102
+ { name: 'textInput_cacheRead', rate: 0.125, strategy: 'fixed', unit: 'millionTokens' },
99
103
  ],
100
104
  },
101
105
  releasedAt: '2025-08-07',
@@ -112,7 +116,6 @@ const aihubmixModels: AIChatModelCard[] = [
112
116
  description:
113
117
  'o4-mini 是我们最新的小型 o 系列模型。 它专为快速有效的推理而优化,在编码和视觉任务中表现出极高的效率和性能。',
114
118
  displayName: 'o4-mini',
115
- enabled: true,
116
119
  id: 'o4-mini',
117
120
  maxOutput: 100_000,
118
121
  pricing: {
@@ -193,7 +196,6 @@ const aihubmixModels: AIChatModelCard[] = [
193
196
  description:
194
197
  'o3 是一款全能强大的模型,在多个领域表现出色。它为数学、科学、编程和视觉推理任务树立了新标杆。它也擅长技术写作和指令遵循。用户可利用它分析文本、代码和图像,解决多步骤的复杂问题。',
195
198
  displayName: 'o3',
196
- enabled: true,
197
199
  id: 'o3',
198
200
  maxOutput: 100_000,
199
201
  pricing: {
@@ -699,7 +701,6 @@ const aihubmixModels: AIChatModelCard[] = [
699
701
  description:
700
702
  '基于Qwen3的思考模式开源模型,相较上一版本(通义千问3-235B-A22B)逻辑能力、通用能力、知识增强及创作能力均有大幅提升,适用于高难度强推理场景。',
701
703
  displayName: 'Qwen3 235B A22B Thinking 2507',
702
- enabled: true,
703
704
  id: 'qwen3-235b-a22b-thinking-2507',
704
705
  maxOutput: 32_768,
705
706
  organization: 'Qwen',
@@ -721,7 +722,6 @@ const aihubmixModels: AIChatModelCard[] = [
721
722
  description:
722
723
  '基于Qwen3的非思考模式开源模型,相较上一版本(通义千问3-235B-A22B)主观创作能力与模型安全性均有小幅度提升。',
723
724
  displayName: 'Qwen3 235B A22B Instruct 2507',
724
- enabled: true,
725
725
  id: 'qwen3-235b-a22b-instruct-2507',
726
726
  maxOutput: 32_768,
727
727
  organization: 'Qwen',
@@ -744,7 +744,6 @@ const aihubmixModels: AIChatModelCard[] = [
744
744
  description:
745
745
  '基于Qwen3的思考模式开源模型,相较上一版本(通义千问3-30B-A3B)逻辑能力、通用能力、知识增强及创作能力均有大幅提升,适用于高难度强推理场景。',
746
746
  displayName: 'Qwen3 30B A3B Thinking 2507',
747
- enabled: true,
748
747
  id: 'qwen3-30b-a3b-thinking-2507',
749
748
  maxOutput: 32_768,
750
749
  organization: 'Qwen',
@@ -766,7 +765,6 @@ const aihubmixModels: AIChatModelCard[] = [
766
765
  description:
767
766
  '相较上一版本(Qwen3-30B-A3B)中英文和多语言整体通用能力有大幅提升。主观开放类任务专项优化,显著更加符合用户偏好,能够提供更有帮助性的回复。',
768
767
  displayName: 'Qwen3 30B A3B Instruct 2507',
769
- enabled: true,
770
768
  id: 'qwen3-30b-a3b-instruct-2507',
771
769
  maxOutput: 32_768,
772
770
  organization: 'Qwen',
@@ -42,7 +42,7 @@ export const openaiChatModels: AIChatModelCard[] = [
42
42
  },
43
43
  releasedAt: '2025-08-07',
44
44
  settings: {
45
- extendParams: ['reasoningEffort'],
45
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
46
46
  searchImpl: 'params',
47
47
  },
48
48
  type: 'chat',
@@ -70,7 +70,7 @@ export const openaiChatModels: AIChatModelCard[] = [
70
70
  },
71
71
  releasedAt: '2025-08-07',
72
72
  settings: {
73
- extendParams: ['reasoningEffort'],
73
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
74
74
  searchImpl: 'params',
75
75
  },
76
76
  type: 'chat',
@@ -78,6 +78,7 @@ export const openaiChatModels: AIChatModelCard[] = [
78
78
  {
79
79
  abilities: {
80
80
  functionCall: true,
81
+ imageOutput: true,
81
82
  reasoning: true,
82
83
  vision: true,
83
84
  },
@@ -94,10 +95,14 @@ export const openaiChatModels: AIChatModelCard[] = [
94
95
  ],
95
96
  },
96
97
  releasedAt: '2025-08-07',
98
+ settings: {
99
+ extendParams: ['gpt5ReasoningEffort', 'textVerbosity'],
100
+ },
97
101
  type: 'chat',
98
102
  },
99
103
  {
100
104
  abilities: {
105
+ reasoning: true,
101
106
  vision: true,
102
107
  },
103
108
  contextWindowTokens: 400_000,
@@ -128,7 +133,6 @@ export const openaiChatModels: AIChatModelCard[] = [
128
133
  description:
129
134
  'o4-mini 是我们最新的小型 o 系列模型。 它专为快速有效的推理而优化,在编码和视觉任务中表现出极高的效率和性能。',
130
135
  displayName: 'o4-mini',
131
- enabled: true,
132
136
  id: 'o4-mini',
133
137
  maxOutput: 100_000,
134
138
  pricing: {
@@ -209,7 +213,6 @@ export const openaiChatModels: AIChatModelCard[] = [
209
213
  description:
210
214
  'o3 是一款全能强大的模型,在多个领域表现出色。它为数学、科学、编程和视觉推理任务树立了新标杆。它也擅长技术写作和指令遵循。用户可利用它分析文本、代码和图像,解决多步骤的复杂问题。',
211
215
  displayName: 'o3',
212
- enabled: true,
213
216
  id: 'o3',
214
217
  maxOutput: 100_000,
215
218
  pricing: {
@@ -11,8 +11,10 @@ import { agentChatConfigSelectors, agentSelectors } from '@/store/agent/selector
11
11
  import { aiModelSelectors, useAiInfraStore } from '@/store/aiInfra';
12
12
 
13
13
  import ContextCachingSwitch from './ContextCachingSwitch';
14
+ import GPT5ReasoningEffortSlider from './GPT5ReasoningEffortSlider';
14
15
  import ReasoningEffortSlider from './ReasoningEffortSlider';
15
16
  import ReasoningTokenSlider from './ReasoningTokenSlider';
17
+ import TextVerbositySlider from './TextVerbositySlider';
16
18
  import ThinkingBudgetSlider from './ThinkingBudgetSlider';
17
19
  import ThinkingSlider from './ThinkingSlider';
18
20
 
@@ -95,6 +97,28 @@ const ControlsForm = memo(() => {
95
97
  paddingBottom: 0,
96
98
  },
97
99
  },
100
+ {
101
+ children: <GPT5ReasoningEffortSlider />,
102
+ desc: 'reasoning_effort',
103
+ label: t('extendParams.reasoningEffort.title'),
104
+ layout: 'horizontal',
105
+ minWidth: undefined,
106
+ name: 'gpt5ReasoningEffort',
107
+ style: {
108
+ paddingBottom: 0,
109
+ },
110
+ },
111
+ {
112
+ children: <TextVerbositySlider />,
113
+ desc: 'text_verbosity',
114
+ label: t('extendParams.textVerbosity.title'),
115
+ layout: 'horizontal',
116
+ minWidth: undefined,
117
+ name: 'textVerbosity',
118
+ style: {
119
+ paddingBottom: 0,
120
+ },
121
+ },
98
122
  {
99
123
  children: <ThinkingBudgetSlider />,
100
124
  label: t('extendParams.reasoningBudgetToken.title'),
@@ -0,0 +1,58 @@
1
+ import { Slider } from 'antd';
2
+ import { memo, useCallback } from 'react';
3
+ import { Flexbox } from 'react-layout-kit';
4
+
5
+ import { useAgentStore } from '@/store/agent';
6
+ import { agentChatConfigSelectors } from '@/store/agent/selectors';
7
+
8
+ const GPT5ReasoningEffortSlider = memo(() => {
9
+ const [config, updateAgentChatConfig] = useAgentStore((s) => [
10
+ agentChatConfigSelectors.currentChatConfig(s),
11
+ s.updateAgentChatConfig,
12
+ ]);
13
+
14
+ const gpt5ReasoningEffort = config.gpt5ReasoningEffort || 'medium'; // Default to 'medium' if not set
15
+
16
+ const marks = {
17
+ 0: 'minimal',
18
+ 1: 'low',
19
+ 2: 'medium',
20
+ 3: 'high',
21
+ };
22
+
23
+ const effortValues = ['minimal', 'low', 'medium', 'high'];
24
+ const indexValue = effortValues.indexOf(gpt5ReasoningEffort);
25
+ const currentValue = indexValue === -1 ? 2 : indexValue;
26
+
27
+ const updateGPT5ReasoningEffort = useCallback(
28
+ (value: number) => {
29
+ const effort = effortValues[value] as 'minimal' | 'low' | 'medium' | 'high';
30
+ updateAgentChatConfig({ gpt5ReasoningEffort: effort });
31
+ },
32
+ [updateAgentChatConfig],
33
+ );
34
+
35
+ return (
36
+ <Flexbox
37
+ align={'center'}
38
+ gap={12}
39
+ horizontal
40
+ paddingInline={'0 20px'}
41
+ style={{ minWidth: 200, width: '100%' }}
42
+ >
43
+ <Flexbox flex={1}>
44
+ <Slider
45
+ marks={marks}
46
+ max={3}
47
+ min={0}
48
+ onChange={updateGPT5ReasoningEffort}
49
+ step={1}
50
+ tooltip={{ open: false }}
51
+ value={currentValue}
52
+ />
53
+ </Flexbox>
54
+ </Flexbox>
55
+ );
56
+ });
57
+
58
+ export default GPT5ReasoningEffortSlider;
@@ -0,0 +1,57 @@
1
+ import { Slider } from 'antd';
2
+ import { memo, useCallback } from 'react';
3
+ import { Flexbox } from 'react-layout-kit';
4
+
5
+ import { useAgentStore } from '@/store/agent';
6
+ import { agentChatConfigSelectors } from '@/store/agent/selectors';
7
+
8
+ const TextVerbositySlider = memo(() => {
9
+ const [config, updateAgentChatConfig] = useAgentStore((s) => [
10
+ agentChatConfigSelectors.currentChatConfig(s),
11
+ s.updateAgentChatConfig,
12
+ ]);
13
+
14
+ const textVerbosity = config.textVerbosity || 'medium'; // Default to 'medium' if not set
15
+
16
+ const marks = {
17
+ 0: 'low',
18
+ 1: 'medium',
19
+ 2: 'high',
20
+ };
21
+
22
+ const verbosityValues = ['low', 'medium', 'high'];
23
+ const indexValue = verbosityValues.indexOf(textVerbosity);
24
+ const currentValue = indexValue === -1 ? 1 : indexValue;
25
+
26
+ const updateTextVerbosity = useCallback(
27
+ (value: number) => {
28
+ const verbosity = verbosityValues[value] as 'low' | 'medium' | 'high';
29
+ updateAgentChatConfig({ textVerbosity: verbosity });
30
+ },
31
+ [updateAgentChatConfig],
32
+ );
33
+
34
+ return (
35
+ <Flexbox
36
+ align={'center'}
37
+ gap={12}
38
+ horizontal
39
+ paddingInline={'0 20px'}
40
+ style={{ minWidth: 200, width: '100%' }}
41
+ >
42
+ <Flexbox flex={1}>
43
+ <Slider
44
+ marks={marks}
45
+ max={2}
46
+ min={0}
47
+ onChange={updateTextVerbosity}
48
+ step={1}
49
+ tooltip={{ open: false }}
50
+ value={currentValue}
51
+ />
52
+ </Flexbox>
53
+ </Flexbox>
54
+ );
55
+ });
56
+
57
+ export default TextVerbositySlider;
@@ -47,6 +47,9 @@ export default {
47
47
  reasoningEffort: {
48
48
  title: '推理强度',
49
49
  },
50
+ textVerbosity: {
51
+ title: '输出文本详细程度',
52
+ },
50
53
  thinking: {
51
54
  title: '深度思考开关',
52
55
  },
@@ -280,6 +280,14 @@ class ChatService {
280
280
  extendParams.reasoning_effort = chatConfig.reasoningEffort;
281
281
  }
282
282
 
283
+ if (modelExtendParams!.includes('gpt5ReasoningEffort') && chatConfig.gpt5ReasoningEffort) {
284
+ extendParams.reasoning_effort = chatConfig.gpt5ReasoningEffort;
285
+ }
286
+
287
+ if (modelExtendParams!.includes('textVerbosity') && chatConfig.textVerbosity) {
288
+ extendParams.verbosity = chatConfig.textVerbosity;
289
+ }
290
+
283
291
  if (modelExtendParams!.includes('thinking') && chatConfig.thinking) {
284
292
  extendParams.thinking = { type: chatConfig.thinking };
285
293
  }