@lobehub/chat 1.94.3 → 1.94.5

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.
Files changed (67) hide show
  1. package/.github/scripts/create-failure-issue.js +256 -0
  2. package/.github/workflows/auto-i18n.yml +359 -0
  3. package/CHANGELOG.md +58 -0
  4. package/README.md +1 -1
  5. package/README.zh-CN.md +1 -1
  6. package/changelog/v1.json +18 -0
  7. package/locales/ar/setting.json +13 -1
  8. package/locales/bg-BG/setting.json +13 -1
  9. package/locales/de-DE/setting.json +13 -1
  10. package/locales/en-US/setting.json +13 -1
  11. package/locales/es-ES/setting.json +13 -1
  12. package/locales/fa-IR/setting.json +13 -1
  13. package/locales/fr-FR/setting.json +13 -1
  14. package/locales/it-IT/setting.json +13 -1
  15. package/locales/ja-JP/setting.json +13 -1
  16. package/locales/ko-KR/setting.json +13 -1
  17. package/locales/nl-NL/setting.json +13 -1
  18. package/locales/pl-PL/setting.json +13 -1
  19. package/locales/pt-BR/setting.json +13 -1
  20. package/locales/ru-RU/setting.json +13 -1
  21. package/locales/tr-TR/setting.json +13 -1
  22. package/locales/vi-VN/setting.json +13 -1
  23. package/locales/zh-CN/setting.json +13 -1
  24. package/locales/zh-TW/setting.json +13 -1
  25. package/package.json +3 -2
  26. package/scripts/i18nWorkflow/genDefaultLocale.ts +2 -2
  27. package/scripts/i18nWorkflow/genDiff.ts +8 -9
  28. package/scripts/i18nWorkflow/utils.ts +14 -1
  29. package/src/app/[variants]/(main)/settings/common/features/ChatAppearance/ChatTransitionPreview.tsx +111 -0
  30. package/src/app/[variants]/(main)/settings/common/features/ChatAppearance/index.tsx +50 -3
  31. package/src/components/Thinking/index.tsx +4 -2
  32. package/src/config/aiModels/openai.ts +120 -0
  33. package/src/config/modelProviders/anthropic.ts +1 -6
  34. package/src/config/modelProviders/baichuan.ts +4 -8
  35. package/src/config/modelProviders/google.ts +4 -4
  36. package/src/config/modelProviders/lmstudio.ts +4 -4
  37. package/src/config/modelProviders/minimax.ts +3 -3
  38. package/src/config/modelProviders/moonshot.ts +4 -4
  39. package/src/config/modelProviders/openai.ts +1 -3
  40. package/src/config/modelProviders/perplexity.ts +3 -3
  41. package/src/config/modelProviders/qwen.ts +4 -4
  42. package/src/config/modelProviders/search1api.ts +4 -4
  43. package/src/config/modelProviders/spark.ts +4 -4
  44. package/src/config/modelProviders/stepfun.ts +4 -4
  45. package/src/config/modelProviders/vertexai.ts +1 -3
  46. package/src/config/modelProviders/volcengine.ts +4 -4
  47. package/src/config/modelProviders/wenxin.ts +3 -3
  48. package/src/const/models.ts +26 -1
  49. package/src/const/settings/common.ts +1 -0
  50. package/src/features/Conversation/Messages/Assistant/Reasoning/index.tsx +11 -1
  51. package/src/features/Conversation/components/ChatItem/index.tsx +6 -2
  52. package/src/features/Conversation/components/MarkdownElements/LobeThinking/Render.tsx +4 -0
  53. package/src/features/Conversation/components/MarkdownElements/Thinking/Render.tsx +12 -1
  54. package/src/libs/model-runtime/openai/index.ts +33 -11
  55. package/src/libs/model-runtime/types/chat.ts +2 -0
  56. package/src/libs/model-runtime/utils/openaiCompatibleFactory/index.ts +10 -8
  57. package/src/libs/model-runtime/utils/streams/openai/__snapshots__/responsesStream.test.ts.snap +6 -6
  58. package/src/libs/model-runtime/utils/streams/openai/responsesStream.ts +38 -2
  59. package/src/locales/default/setting.ts +12 -0
  60. package/src/services/chat.ts +19 -6
  61. package/src/store/user/slices/settings/selectors/general.test.ts +1 -0
  62. package/src/store/user/slices/settings/selectors/general.ts +2 -0
  63. package/src/types/aiProvider.ts +11 -11
  64. package/src/types/llm.ts +8 -10
  65. package/src/types/user/settings/general.ts +3 -0
  66. package/src/utils/fetch/__tests__/fetchSSE.test.ts +57 -12
  67. package/src/utils/fetch/fetchSSE.ts +22 -15
@@ -4,14 +4,16 @@ import {
4
4
  Form,
5
5
  type FormGroupItemType,
6
6
  Icon,
7
+ Segmented,
7
8
  Select,
8
9
  SliderWithInput,
9
10
  highlighterThemes,
10
11
  mermaidThemes,
11
12
  } from '@lobehub/ui';
12
13
  import { Skeleton } from 'antd';
14
+ import { useTheme } from 'antd-style';
13
15
  import isEqual from 'fast-deep-equal';
14
- import { Loader2Icon } from 'lucide-react';
16
+ import { Loader2Icon, TriangleAlert } from 'lucide-react';
15
17
  import { memo, useState } from 'react';
16
18
  import { useTranslation } from 'react-i18next';
17
19
 
@@ -20,19 +22,64 @@ import { useUserStore } from '@/store/user';
20
22
  import { settingsSelectors } from '@/store/user/selectors';
21
23
 
22
24
  import ChatPreview from './ChatPreview';
25
+ import ChatTransitionPreview from './ChatTransitionPreview';
23
26
  import HighlighterPreview from './HighlighterPreview';
24
27
  import MermaidPreview from './MermaidPreview';
25
28
 
26
29
  const ChatAppearance = memo(() => {
27
30
  const { t } = useTranslation('setting');
28
31
  const { general } = useUserStore(settingsSelectors.currentSettings, isEqual);
32
+ const theme = useTheme();
29
33
  const [setSettings, isUserStateInit] = useUserStore((s) => [s.setSettings, s.isUserStateInit]);
30
34
  const [loading, setLoading] = useState(false);
31
35
 
32
36
  if (!isUserStateInit) return <Skeleton active paragraph={{ rows: 5 }} title={false} />;
33
37
 
34
- const theme: FormGroupItemType = {
38
+ const themeItems: FormGroupItemType = {
35
39
  children: [
40
+ {
41
+ children: (
42
+ <ChatTransitionPreview key={general.transitionMode} mode={general.transitionMode} />
43
+ ),
44
+ noStyle: true,
45
+ },
46
+ {
47
+ children: (
48
+ <Segmented
49
+ block
50
+ options={[
51
+ {
52
+ label: t('settingChatAppearance.transitionMode.options.none.value'),
53
+ value: 'none',
54
+ },
55
+ {
56
+ label: t('settingChatAppearance.transitionMode.options.fadeIn'),
57
+ value: 'fadeIn',
58
+ },
59
+ {
60
+ label: t('settingChatAppearance.transitionMode.options.smooth'),
61
+ value: 'smooth',
62
+ },
63
+ ]}
64
+ />
65
+ ),
66
+ desc: t('settingChatAppearance.transitionMode.desc'),
67
+ label: t('settingChatAppearance.transitionMode.title'),
68
+ name: 'transitionMode',
69
+ tooltip:
70
+ general.transitionMode === 'none'
71
+ ? {
72
+ icon: (
73
+ <TriangleAlert
74
+ color={theme.colorWarning}
75
+ size={14}
76
+ style={{ alignSelf: 'flex-end', marginBlockEnd: 2, marginInlineStart: 8 }}
77
+ />
78
+ ),
79
+ title: t('settingChatAppearance.transitionMode.options.none.desc'),
80
+ }
81
+ : undefined,
82
+ },
36
83
  {
37
84
  children: <ChatPreview fontSize={general.fontSize} />,
38
85
  noStyle: true,
@@ -112,7 +159,7 @@ const ChatAppearance = memo(() => {
112
159
  return (
113
160
  <Form
114
161
  initialValues={general}
115
- items={[theme]}
162
+ items={[themeItems]}
116
163
  itemsType={'group'}
117
164
  onValuesChange={async (value) => {
118
165
  setLoading(true);
@@ -77,9 +77,11 @@ interface ThinkingProps {
77
77
  duration?: number;
78
78
  style?: CSSProperties;
79
79
  thinking?: boolean;
80
+ thinkingAnimated?: boolean;
80
81
  }
81
82
 
82
- const Thinking = memo<ThinkingProps>(({ content, duration, thinking, style, citations }) => {
83
+ const Thinking = memo<ThinkingProps>((props) => {
84
+ const { content, duration, thinking, style, citations, thinkingAnimated } = props;
83
85
  const { t } = useTranslation(['components', 'common']);
84
86
  const { styles, cx, theme } = useStyles();
85
87
 
@@ -154,7 +156,7 @@ const Thinking = memo<ThinkingProps>(({ content, duration, thinking, style, cita
154
156
  }}
155
157
  >
156
158
  {typeof content === 'string' ? (
157
- <Markdown animated={thinking} citations={citations} variant={'chat'}>
159
+ <Markdown animated={thinkingAnimated} citations={citations} variant={'chat'}>
158
160
  {content}
159
161
  </Markdown>
160
162
  ) : (
@@ -59,6 +59,7 @@ export const openaiChatModels: AIChatModelCard[] = [
59
59
  {
60
60
  abilities: {
61
61
  functionCall: true,
62
+ search: true,
62
63
  vision: true,
63
64
  },
64
65
  contextWindowTokens: 1_047_576,
@@ -73,11 +74,15 @@ export const openaiChatModels: AIChatModelCard[] = [
73
74
  output: 8,
74
75
  },
75
76
  releasedAt: '2025-04-14',
77
+ settings: {
78
+ searchImpl: 'params',
79
+ },
76
80
  type: 'chat',
77
81
  },
78
82
  {
79
83
  abilities: {
80
84
  functionCall: true,
85
+ search: true,
81
86
  vision: true,
82
87
  },
83
88
  contextWindowTokens: 1_047_576,
@@ -93,6 +98,9 @@ export const openaiChatModels: AIChatModelCard[] = [
93
98
  output: 1.6,
94
99
  },
95
100
  releasedAt: '2025-04-14',
101
+ settings: {
102
+ searchImpl: 'params',
103
+ },
96
104
  type: 'chat',
97
105
  },
98
106
  {
@@ -135,6 +143,28 @@ export const openaiChatModels: AIChatModelCard[] = [
135
143
  },
136
144
  type: 'chat',
137
145
  },
146
+ {
147
+ abilities: {
148
+ functionCall: true,
149
+ reasoning: true,
150
+ vision: true,
151
+ },
152
+ contextWindowTokens: 200_000,
153
+ description:
154
+ 'o1 系列模型经过强化学习训练,能够在回答前进行思考,并执行复杂的推理任务。o1-pro 模型使用了更多计算资源,以进行更深入的思考,从而持续提供更优质的回答。',
155
+ displayName: 'o1-pro',
156
+ id: 'o1-pro',
157
+ maxOutput: 100_000,
158
+ pricing: {
159
+ input: 150,
160
+ output: 600,
161
+ },
162
+ releasedAt: '2025-03-19',
163
+ settings: {
164
+ extendParams: ['reasoningEffort'],
165
+ },
166
+ type: 'chat',
167
+ },
138
168
  {
139
169
  abilities: {
140
170
  reasoning: true,
@@ -158,6 +188,7 @@ export const openaiChatModels: AIChatModelCard[] = [
158
188
  },
159
189
  {
160
190
  abilities: {
191
+ functionCall: true,
161
192
  reasoning: true,
162
193
  vision: true,
163
194
  },
@@ -220,6 +251,7 @@ export const openaiChatModels: AIChatModelCard[] = [
220
251
  {
221
252
  abilities: {
222
253
  functionCall: true,
254
+ search: true,
223
255
  vision: true,
224
256
  },
225
257
  contextWindowTokens: 128_000,
@@ -234,6 +266,9 @@ export const openaiChatModels: AIChatModelCard[] = [
234
266
  output: 0.6,
235
267
  },
236
268
  releasedAt: '2024-07-18',
269
+ settings: {
270
+ searchImpl: 'params',
271
+ },
237
272
  type: 'chat',
238
273
  },
239
274
  {
@@ -259,6 +294,29 @@ export const openaiChatModels: AIChatModelCard[] = [
259
294
  {
260
295
  abilities: {
261
296
  functionCall: true,
297
+ //search: true,
298
+ },
299
+ contextWindowTokens: 128_000,
300
+ description: 'GPT-4o mini Audio 模型,支持音频输入输出',
301
+ displayName: 'GPT-4o mini Audio',
302
+ id: 'gpt-4o-mini-audio-preview',
303
+ maxOutput: 16_384,
304
+ pricing: {
305
+ input: 0.15,
306
+ output: 0.6,
307
+ },
308
+ releasedAt: '2024-12-17',
309
+ /*
310
+ settings: {
311
+ searchImpl: 'params',
312
+ },
313
+ */
314
+ type: 'chat',
315
+ },
316
+ {
317
+ abilities: {
318
+ functionCall: true,
319
+ search: true,
262
320
  vision: true,
263
321
  },
264
322
  contextWindowTokens: 128_000,
@@ -272,6 +330,9 @@ export const openaiChatModels: AIChatModelCard[] = [
272
330
  output: 10,
273
331
  },
274
332
  releasedAt: '2024-05-13',
333
+ settings: {
334
+ searchImpl: 'params',
335
+ },
275
336
  type: 'chat',
276
337
  },
277
338
  {
@@ -297,6 +358,7 @@ export const openaiChatModels: AIChatModelCard[] = [
297
358
  {
298
359
  abilities: {
299
360
  functionCall: true,
361
+ search: true,
300
362
  vision: true,
301
363
  },
302
364
  contextWindowTokens: 128_000,
@@ -310,11 +372,15 @@ export const openaiChatModels: AIChatModelCard[] = [
310
372
  output: 10,
311
373
  },
312
374
  releasedAt: '2024-11-20',
375
+ settings: {
376
+ searchImpl: 'params',
377
+ },
313
378
  type: 'chat',
314
379
  },
315
380
  {
316
381
  abilities: {
317
382
  functionCall: true,
383
+ search: true,
318
384
  vision: true,
319
385
  },
320
386
  contextWindowTokens: 128_000,
@@ -327,9 +393,16 @@ export const openaiChatModels: AIChatModelCard[] = [
327
393
  output: 15,
328
394
  },
329
395
  releasedAt: '2024-05-13',
396
+ settings: {
397
+ searchImpl: 'params',
398
+ },
330
399
  type: 'chat',
331
400
  },
332
401
  {
402
+ abilities: {
403
+ functionCall: true,
404
+ //search: true,
405
+ },
333
406
  contextWindowTokens: 128_000,
334
407
  description: 'GPT-4o Audio 模型,支持音频输入输出',
335
408
  displayName: 'GPT-4o Audio',
@@ -340,6 +413,11 @@ export const openaiChatModels: AIChatModelCard[] = [
340
413
  output: 10,
341
414
  },
342
415
  releasedAt: '2024-10-01',
416
+ /*
417
+ settings: {
418
+ searchImpl: 'params',
419
+ },
420
+ */
343
421
  type: 'chat',
344
422
  },
345
423
  {
@@ -545,6 +623,48 @@ export const openaiChatModels: AIChatModelCard[] = [
545
623
  },
546
624
  type: 'chat',
547
625
  },
626
+ {
627
+ abilities: {
628
+ functionCall: true,
629
+ reasoning: true,
630
+ vision: true,
631
+ },
632
+ contextWindowTokens: 200_000,
633
+ description: 'codex-mini-latest 是 o4-mini 的微调版本,专门用于 Codex CLI。对于直接通过 API 使用,我们推荐从 gpt-4.1 开始。',
634
+ displayName: 'Codex mini',
635
+ id: 'codex-mini-latest',
636
+ maxOutput: 100_000,
637
+ pricing: {
638
+ input: 1.5,
639
+ output: 6,
640
+ },
641
+ releasedAt: '2025-06-01',
642
+ settings: {
643
+ extendParams: ['reasoningEffort'],
644
+ },
645
+ type: 'chat',
646
+ },
647
+ {
648
+ abilities: {
649
+ functionCall: true,
650
+ reasoning: true,
651
+ vision: true,
652
+ },
653
+ contextWindowTokens: 8192,
654
+ description: 'computer-use-preview 模型是专为“计算机使用工具”设计的专用模型,经过训练以理解并执行计算机相关任务。',
655
+ displayName: 'Computer Use Preview',
656
+ id: 'computer-use-preview',
657
+ maxOutput: 1024,
658
+ pricing: {
659
+ input: 3,
660
+ output: 12,
661
+ },
662
+ releasedAt: '2025-03-11',
663
+ settings: {
664
+ extendParams: ['reasoningEffort'],
665
+ },
666
+ type: 'chat',
667
+ },
548
668
  ];
549
669
 
550
670
  export const openaiEmbeddingModels: AIEmbeddingModelCard[] = [
@@ -196,14 +196,9 @@ const Anthropic: ModelProviderCard = {
196
196
  proxyUrl: {
197
197
  placeholder: 'https://api.anthropic.com',
198
198
  },
199
+ responseAnimation: 'smooth',
199
200
  sdkType: 'anthropic',
200
201
  showModelFetcher: true,
201
- smoothing: {
202
- text: true,
203
- },
204
- },
205
- smoothing: {
206
- text: true,
207
202
  },
208
203
  url: 'https://anthropic.com',
209
204
  };
@@ -100,16 +100,12 @@ const Baichuan: ModelProviderCard = {
100
100
  proxyUrl: {
101
101
  placeholder: 'https://api.baichuan-ai.com/v1',
102
102
  },
103
- sdkType: 'openai',
104
- showModelFetcher: true,
105
- smoothing: {
103
+ responseAnimation: {
106
104
  speed: 2,
107
- text: true,
105
+ text: 'smooth',
108
106
  },
109
- },
110
- smoothing: {
111
- speed: 2,
112
- text: true,
107
+ sdkType: 'openai',
108
+ showModelFetcher: true,
113
109
  },
114
110
  url: 'https://platform.baichuan-ai.com',
115
111
  };
@@ -206,12 +206,12 @@ const Google: ModelProviderCard = {
206
206
  proxyUrl: {
207
207
  placeholder: 'https://generativelanguage.googleapis.com',
208
208
  },
209
- sdkType: 'google',
210
- showModelFetcher: true,
211
- smoothing: {
209
+ responseAnimation: {
212
210
  speed: 50,
213
- text: true,
211
+ text: 'smooth',
214
212
  },
213
+ sdkType: 'google',
214
+ showModelFetcher: true,
215
215
  },
216
216
  url: 'https://ai.google.dev',
217
217
  };
@@ -12,12 +12,12 @@ const LMStudio: ModelProviderCard = {
12
12
  proxyUrl: {
13
13
  placeholder: 'http://127.0.0.1:1234/v1',
14
14
  },
15
- showApiKey: false,
16
- showModelFetcher: true,
17
- smoothing: {
15
+ responseAnimation: {
18
16
  speed: 2,
19
- text: true,
17
+ text: 'smooth',
20
18
  },
19
+ showApiKey: false,
20
+ showModelFetcher: true,
21
21
  },
22
22
  url: 'https://lmstudio.ai',
23
23
  };
@@ -50,11 +50,11 @@ const Minimax: ModelProviderCard = {
50
50
  proxyUrl: {
51
51
  placeholder: 'https://api.minimax.chat/v1',
52
52
  },
53
- sdkType: 'openai',
54
- smoothing: {
53
+ responseAnimation: {
55
54
  speed: 2,
56
- text: true,
55
+ text: 'smooth',
57
56
  },
57
+ sdkType: 'openai',
58
58
  },
59
59
  url: 'https://www.minimaxi.com',
60
60
  };
@@ -42,12 +42,12 @@ const Moonshot: ModelProviderCard = {
42
42
  proxyUrl: {
43
43
  placeholder: 'https://api.moonshot.cn/v1',
44
44
  },
45
- sdkType: 'openai',
46
- showModelFetcher: true,
47
- smoothing: {
45
+ responseAnimation: {
48
46
  speed: 2,
49
- text: true,
47
+ text: 'smooth',
50
48
  },
49
+ sdkType: 'openai',
50
+ showModelFetcher: true,
51
51
  },
52
52
  url: 'https://www.moonshot.cn',
53
53
  };
@@ -332,10 +332,8 @@ const OpenAI: ModelProviderCard = {
332
332
  modelsUrl: 'https://platform.openai.com/docs/models',
333
333
  name: 'OpenAI',
334
334
  settings: {
335
+ responseAnimation: 'smooth',
335
336
  showModelFetcher: true,
336
- smoothing: {
337
- text: true,
338
- },
339
337
  supportResponsesApi: true,
340
338
  },
341
339
  url: 'https://openai.com',
@@ -59,11 +59,11 @@ const Perplexity: ModelProviderCard = {
59
59
  proxyUrl: {
60
60
  placeholder: 'https://api.perplexity.ai',
61
61
  },
62
- sdkType: 'openai',
63
- smoothing: {
62
+ responseAnimation: {
64
63
  speed: 2,
65
- text: true,
64
+ text: 'smooth',
66
65
  },
66
+ sdkType: 'openai',
67
67
  },
68
68
  url: 'https://www.perplexity.ai',
69
69
  };
@@ -425,13 +425,13 @@ const Qwen: ModelProviderCard = {
425
425
  proxyUrl: {
426
426
  placeholder: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
427
427
  },
428
+ responseAnimation: {
429
+ speed: 2,
430
+ text: 'smooth',
431
+ },
428
432
  sdkType: 'openai',
429
433
  showDeployName: true,
430
434
  showModelFetcher: true,
431
- smoothing: {
432
- speed: 2,
433
- text: true,
434
- },
435
435
  },
436
436
  url: 'https://www.aliyun.com/product/bailian',
437
437
  };
@@ -45,12 +45,12 @@ const Search1API: ModelProviderCard = {
45
45
  proxyUrl: {
46
46
  placeholder: 'https://api.search1api.com/v1',
47
47
  },
48
- sdkType: 'openai',
49
- showModelFetcher: true,
50
- smoothing: {
48
+ responseAnimation: {
51
49
  speed: 2,
52
- text: true,
50
+ text: 'smooth',
53
51
  },
52
+ sdkType: 'openai',
53
+ showModelFetcher: true,
54
54
  },
55
55
  url: 'https://www.search1api.com',
56
56
  };
@@ -73,12 +73,12 @@ const Spark: ModelProviderCard = {
73
73
  proxyUrl: {
74
74
  placeholder: 'https://spark-api-open.xf-yun.com/v1',
75
75
  },
76
- sdkType: 'openai',
77
- showModelFetcher: false,
78
- smoothing: {
76
+ responseAnimation: {
79
77
  speed: 2,
80
- text: true,
78
+ text: 'smooth',
81
79
  },
80
+ sdkType: 'openai',
81
+ showModelFetcher: false,
82
82
  },
83
83
  url: 'https://www.xfyun.cn',
84
84
  };
@@ -176,12 +176,12 @@ const Stepfun: ModelProviderCard = {
176
176
  proxyUrl: {
177
177
  placeholder: 'https://api.stepfun.com/v1',
178
178
  },
179
- sdkType: 'openai',
180
- showModelFetcher: true,
181
- smoothing: {
179
+ responseAnimation: {
182
180
  speed: 2,
183
- text: true,
181
+ text: 'smooth',
184
182
  },
183
+ sdkType: 'openai',
184
+ showModelFetcher: true,
185
185
  },
186
186
  url: 'https://stepfun.com',
187
187
  };
@@ -11,10 +11,8 @@ const VertexAI: ModelProviderCard = {
11
11
  name: 'Vertex AI',
12
12
  settings: {
13
13
  disableBrowserRequest: true,
14
+ responseAnimation: 'smooth',
14
15
  showModelFetcher: false,
15
- smoothing: {
16
- text: true,
17
- },
18
16
  },
19
17
  url: 'https://cloud.google.com/vertex-ai',
20
18
  };
@@ -13,12 +13,12 @@ const Doubao: ModelProviderCard = {
13
13
  proxyUrl: {
14
14
  placeholder: 'https://ark.cn-beijing.volces.com/api/v3',
15
15
  },
16
- sdkType: 'openai',
17
- showDeployName: true,
18
- smoothing: {
16
+ responseAnimation: {
19
17
  speed: 2,
20
- text: true,
18
+ text: 'smooth',
21
19
  },
20
+ sdkType: 'openai',
21
+ showDeployName: true,
22
22
  },
23
23
  url: 'https://www.volcengine.com/product/ark',
24
24
  };
@@ -242,11 +242,11 @@ const BaiduWenxin: ModelProviderCard = {
242
242
  proxyUrl: {
243
243
  placeholder: 'https://qianfan.baidubce.com/v2',
244
244
  },
245
- sdkType: 'openai',
246
- smoothing: {
245
+ responseAnimation: {
247
246
  speed: 2,
248
- text: true,
247
+ text: 'smooth',
249
248
  },
249
+ sdkType: 'openai',
250
250
  },
251
251
  url: 'https://cloud.baidu.com/wenxin.html',
252
252
  };
@@ -6,7 +6,32 @@ export const systemToUserModels = new Set([
6
6
  ]);
7
7
 
8
8
  // TODO: 临时写法,后续要重构成 model card 展示配置
9
- export const disableStreamModels = new Set(['o1', 'o1-2024-12-17']);
9
+ export const disableStreamModels = new Set([
10
+ 'o1',
11
+ 'o1-2024-12-17',
12
+ 'o1-pro',
13
+ 'o1-pro-2025-03-19',
14
+ /*
15
+ 官网显示不支持,但是实际试下来支持 Streaming,暂时注释掉
16
+ 'o3-pro',
17
+ 'o3-pro-2025-06-10',
18
+ */
19
+ 'computer-use-preview',
20
+ 'computer-use-preview-2025-03-11',
21
+ ]);
22
+
23
+ /**
24
+ * models use Responses API only
25
+ */
26
+ export const responsesAPIModels = new Set([
27
+ 'o1-pro',
28
+ 'o1-pro-2025-03-19',
29
+ 'o3-pro',
30
+ 'o3-pro-2025-06-10',
31
+ 'codex-mini-latest',
32
+ 'computer-use-preview',
33
+ 'computer-use-preview-2025-03-11',
34
+ ]);
10
35
 
11
36
  /**
12
37
  * models support context caching
@@ -4,4 +4,5 @@ export const DEFAULT_COMMON_SETTINGS: UserGeneralConfig = {
4
4
  fontSize: 14,
5
5
  highlighterTheme: 'lobe-theme',
6
6
  mermaidTheme: 'lobe-theme',
7
+ transitionMode: 'fadeIn',
7
8
  };
@@ -3,6 +3,8 @@ import { memo } from 'react';
3
3
  import Thinking from '@/components/Thinking';
4
4
  import { useChatStore } from '@/store/chat';
5
5
  import { aiChatSelectors } from '@/store/chat/selectors';
6
+ import { useUserStore } from '@/store/user';
7
+ import { userGeneralSettingsSelectors } from '@/store/user/selectors';
6
8
 
7
9
  interface ReasoningProps {
8
10
  content?: string;
@@ -12,8 +14,16 @@ interface ReasoningProps {
12
14
 
13
15
  const Reasoning = memo<ReasoningProps>(({ content = '', duration, id }) => {
14
16
  const isReasoning = useChatStore(aiChatSelectors.isMessageInReasoning(id));
17
+ const transitionMode = useUserStore(userGeneralSettingsSelectors.transitionMode);
15
18
 
16
- return <Thinking content={content} duration={duration} thinking={isReasoning} />;
19
+ return (
20
+ <Thinking
21
+ content={content}
22
+ duration={duration}
23
+ thinking={isReasoning}
24
+ thinkingAnimated={transitionMode === 'fadeIn' && isReasoning}
25
+ />
26
+ );
17
27
  });
18
28
 
19
29
  export default Reasoning;