@lobehub/chat 1.51.5 → 1.51.7

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.51.7](https://github.com/lobehub/lobe-chat/compare/v1.51.6...v1.51.7)
6
+
7
+ <sup>Released on **2025-02-06**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Add Aliyun deepseek-r1 distill models.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Add Aliyun deepseek-r1 distill models, closes [#5769](https://github.com/lobehub/lobe-chat/issues/5769) ([8b68190](https://github.com/lobehub/lobe-chat/commit/8b68190))
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.51.6](https://github.com/lobehub/lobe-chat/compare/v1.51.5...v1.51.6)
31
+
32
+ <sup>Released on **2025-02-06**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Try to fix discover error.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### What's fixed
44
+
45
+ - **misc**: Try to fix discover error, closes [#5794](https://github.com/lobehub/lobe-chat/issues/5794) ([9b7bd99](https://github.com/lobehub/lobe-chat/commit/9b7bd99))
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.51.5](https://github.com/lobehub/lobe-chat/compare/v1.51.4...v1.51.5)
6
56
 
7
57
  <sup>Released on **2025-02-06**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Add Aliyun deepseek-r1 distill models."
6
+ ]
7
+ },
8
+ "date": "2025-02-06",
9
+ "version": "1.51.7"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Try to fix discover error."
15
+ ]
16
+ },
17
+ "date": "2025-02-06",
18
+ "version": "1.51.6"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
package/next.config.ts CHANGED
@@ -176,11 +176,6 @@ const nextConfig: NextConfig = {
176
176
  permanent: false,
177
177
  source: '/repos',
178
178
  },
179
- {
180
- destination: '/files',
181
- permanent: false,
182
- source: '/repos',
183
- },
184
179
  ],
185
180
  // when external packages in dev mode with turbopack, this config will lead to bundle error
186
181
  serverExternalPackages: isProd ? ['@electric-sql/pglite'] : undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.51.5",
3
+ "version": "1.51.7",
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",
@@ -9,6 +9,7 @@ import { DiscoverService } from '@/server/services/discover';
9
9
  import { translation } from '@/server/translation';
10
10
  import { DiscoverProviderItem } from '@/types/discover';
11
11
  import { PageProps } from '@/types/next';
12
+ import { parsePageLocale } from '@/utils/locale';
12
13
  import { RouteVariants } from '@/utils/server/routeVariants';
13
14
 
14
15
  import DetailLayout from '../../features/DetailLayout';
@@ -26,9 +27,10 @@ export const generateMetadata = async (props: Props) => {
26
27
 
27
28
  const { slugs } = params;
28
29
  const identifier = decodeURIComponent(slugs.join('/'));
29
- const { t, locale } = await translation('metadata', searchParams?.hl);
30
+ const { t } = await translation('metadata', searchParams?.hl);
30
31
  const { t: td } = await translation('models', searchParams?.hl);
31
32
 
33
+ const locale = await parsePageLocale(props);
32
34
  const discoverService = new DiscoverService();
33
35
  const data = await discoverService.getModelById(locale, identifier);
34
36
  if (!data) return;
@@ -70,9 +72,11 @@ const Page = async (props: Props) => {
70
72
  const { slugs } = params;
71
73
 
72
74
  const identifier = decodeURIComponent(slugs.join('/'));
73
- const { t, locale } = await translation('metadata', searchParams?.hl);
75
+ const { t } = await translation('metadata', searchParams?.hl);
74
76
  const { t: td } = await translation('models', searchParams?.hl);
77
+
75
78
  const mobile = await RouteVariants.getIsMobile(props);
79
+ const locale = await parsePageLocale(props);
76
80
 
77
81
  const discoverService = new DiscoverService();
78
82
  const data = await discoverService.getModelById(locale, identifier);
@@ -7,6 +7,7 @@ import { metadataModule } from '@/server/metadata';
7
7
  import { DiscoverService } from '@/server/services/discover';
8
8
  import { translation } from '@/server/translation';
9
9
  import { DiscoverPageProps } from '@/types/discover';
10
+ import { parsePageLocale } from '@/utils/locale';
10
11
  import { RouteVariants } from '@/utils/server/routeVariants';
11
12
 
12
13
  import List from '../features/List';
@@ -15,7 +16,8 @@ export const generateMetadata = async (props: DiscoverPageProps) => {
15
16
  const params = await props.params;
16
17
  const searchParams = await props.searchParams;
17
18
 
18
- const { t, locale } = await translation('metadata', searchParams?.hl);
19
+ const { t } = await translation('metadata', searchParams?.hl);
20
+ const locale = await parsePageLocale(props);
19
21
 
20
22
  const discoverService = new DiscoverService();
21
23
  const list = await discoverService.getProviderList(locale);
@@ -34,8 +36,9 @@ const Page = async (props: DiscoverPageProps) => {
34
36
  const params = await props.params;
35
37
  const searchParams = await props.searchParams;
36
38
 
37
- const { t, locale } = await translation('metadata', searchParams?.hl);
39
+ const { t } = await translation('metadata', searchParams?.hl);
38
40
  const mobile = await RouteVariants.getIsMobile(props);
41
+ const locale = await parsePageLocale(props);
39
42
 
40
43
  const discoverService = new DiscoverService();
41
44
  const list = await discoverService.getProviderList(locale);
@@ -62,10 +65,8 @@ const Page = async (props: DiscoverPageProps) => {
62
65
 
63
66
  export const generateStaticParams = async () => {
64
67
  const discoverService = new DiscoverService();
65
- const cates = await discoverService.getProviderList(DEFAULT_LANG);
66
- return cates.map((cate) => ({
67
- slug: cate.identifier,
68
- }));
68
+ const categories = await discoverService.getProviderList(DEFAULT_LANG);
69
+ return categories.map((cate) => ({ slug: cate.identifier }));
69
70
  };
70
71
 
71
72
  Page.DisplayName = 'DiscoverModelsCategory';
@@ -8,6 +8,7 @@ import { memo, useEffect, useState } from 'react';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import urlJoin from 'url-join';
10
10
 
11
+ import { withSuspense } from '@/components/withSuspense';
11
12
  import { useQueryRoute } from '@/hooks/useQueryRoute';
12
13
  import { DiscoverTab } from '@/types/discover';
13
14
 
@@ -79,4 +80,4 @@ const StoreSearchBar = memo<StoreSearchBarProps>(({ mobile, onBlur, onFocus, ...
79
80
  );
80
81
  });
81
82
 
82
- export default StoreSearchBar;
83
+ export default withSuspense(StoreSearchBar);
@@ -10,5 +10,3 @@ const MainLayout = ServerLayout<PropsWithChildren>({ Desktop, Mobile });
10
10
  MainLayout.displayName = 'DiscoverStoreLayout';
11
11
 
12
12
  export default MainLayout;
13
-
14
- export const dynamic = 'force-static';
@@ -71,3 +71,5 @@ const Page = async (props: Props) => {
71
71
  Page.DisplayName = 'DiscoverSearch';
72
72
 
73
73
  export default Page;
74
+
75
+ export const dynamic = 'force-static';
@@ -411,10 +411,11 @@ const qwenChatModels: AIChatModelCard[] = [
411
411
  abilities: {
412
412
  reasoning: true,
413
413
  },
414
- contextWindowTokens: 65_536,
414
+ contextWindowTokens: 131_072,
415
415
  description:
416
416
  'DeepSeek-R1 在后训练阶段大规模使用了强化学习技术,在仅有极少标注数据的情况下,极大提升了模型推理能力,尤其在数学、代码、自然语言推理等任务上。',
417
417
  displayName: 'DeepSeek R1',
418
+ enabled: true,
418
419
  id: 'deepseek-r1',
419
420
  maxOutput: 8192,
420
421
  pricing: {
@@ -429,10 +430,11 @@ const qwenChatModels: AIChatModelCard[] = [
429
430
  abilities: {
430
431
  functionCall: true,
431
432
  },
432
- contextWindowTokens: 65_536,
433
+ contextWindowTokens: 131_072,
433
434
  description:
434
435
  'DeepSeek-V3 为自研 MoE 模型,671B 参数,激活 37B,在 14.8T token 上进行了预训练,在长文本、代码、数学、百科、中文能力上表现优秀。',
435
436
  displayName: 'DeepSeek V3',
437
+ enabled: true,
436
438
  id: 'deepseek-v3',
437
439
  maxOutput: 8192,
438
440
  pricing: {
@@ -443,6 +445,103 @@ const qwenChatModels: AIChatModelCard[] = [
443
445
  releasedAt: '2025-01-27',
444
446
  type: 'chat',
445
447
  },
448
+ {
449
+ abilities: {
450
+ reasoning: true,
451
+ },
452
+ contextWindowTokens: 131_072,
453
+ description:
454
+ 'DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。',
455
+ displayName: 'DeepSeek R1 Distill Qwen 1.5B',
456
+ id: 'deepseek-r1-distill-qwen-1.5b',
457
+ maxOutput: 8192,
458
+ pricing: {
459
+ currency: 'CNY',
460
+ input: 0,
461
+ output: 0,
462
+ },
463
+ type: 'chat',
464
+ },
465
+ {
466
+ abilities: {
467
+ reasoning: true
468
+ },
469
+ contextWindowTokens: 131_072,
470
+ description: "DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。",
471
+ displayName: "DeepSeek R1 Distill Qwen 7B",
472
+ id: "deepseek-r1-distill-qwen-7b",
473
+ maxOutput: 8192,
474
+ pricing: {
475
+ currency: "CNY",
476
+ input: 0,
477
+ output: 0
478
+ },
479
+ type: "chat"
480
+ },
481
+ {
482
+ abilities: {
483
+ reasoning: true
484
+ },
485
+ contextWindowTokens: 131_072,
486
+ description: "DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。",
487
+ displayName: "DeepSeek R1 Distill Llama 8B",
488
+ id: "deepseek-r1-distill-llama-8b",
489
+ maxOutput: 8192,
490
+ pricing: {
491
+ currency: "CNY",
492
+ input: 0,
493
+ output: 0
494
+ },
495
+ type: "chat"
496
+ },
497
+ {
498
+ abilities: {
499
+ reasoning: true
500
+ },
501
+ contextWindowTokens: 131_072,
502
+ description: "DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。",
503
+ displayName: "DeepSeek R1 Distill Qwen 14B",
504
+ id: "deepseek-r1-distill-qwen-14b",
505
+ maxOutput: 8192,
506
+ pricing: {
507
+ currency: "CNY",
508
+ input: 0,
509
+ output: 0
510
+ },
511
+ type: "chat"
512
+ },
513
+ {
514
+ abilities: {
515
+ reasoning: true
516
+ },
517
+ contextWindowTokens: 131_072,
518
+ description: "DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。",
519
+ displayName: "DeepSeek R1 Distill Qwen 32B",
520
+ id: "deepseek-r1-distill-qwen-32b",
521
+ maxOutput: 8192,
522
+ pricing: {
523
+ currency: "CNY",
524
+ input: 0,
525
+ output: 0
526
+ },
527
+ type: "chat"
528
+ },
529
+ {
530
+ abilities: {
531
+ reasoning: true
532
+ },
533
+ contextWindowTokens: 131_072,
534
+ description: "DeepSeek-R1-Distill 系列模型通过知识蒸馏技术,将 DeepSeek-R1 生成的样本对 Qwen、Llama 等开源模型进行微调后得到。",
535
+ displayName: "DeepSeek R1 Distill Llama 70B",
536
+ id: "deepseek-r1-distill-llama-70b",
537
+ maxOutput: 8192,
538
+ pricing: {
539
+ currency: "CNY",
540
+ input: 0,
541
+ output: 0
542
+ },
543
+ type: "chat"
544
+ }
446
545
  ];
447
546
 
448
547
  export const allModels = [...qwenChatModels];