@lobehub/chat 1.84.22 → 1.84.24

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 (71) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/changelog/v1.json +18 -0
  3. package/docker-compose/local/docker-compose.yml +2 -2
  4. package/docs/self-hosting/server-database/dokploy.mdx +2 -2
  5. package/docs/self-hosting/server-database/dokploy.zh-CN.mdx +98 -98
  6. package/locales/ar/hotkey.json +4 -0
  7. package/locales/ar/models.json +55 -13
  8. package/locales/ar/providers.json +0 -3
  9. package/locales/bg-BG/hotkey.json +4 -0
  10. package/locales/bg-BG/models.json +55 -13
  11. package/locales/bg-BG/providers.json +0 -3
  12. package/locales/de-DE/hotkey.json +4 -0
  13. package/locales/de-DE/models.json +55 -13
  14. package/locales/de-DE/providers.json +0 -3
  15. package/locales/en-US/hotkey.json +4 -0
  16. package/locales/en-US/models.json +55 -13
  17. package/locales/en-US/providers.json +0 -3
  18. package/locales/es-ES/hotkey.json +4 -0
  19. package/locales/es-ES/models.json +55 -13
  20. package/locales/es-ES/providers.json +0 -3
  21. package/locales/fa-IR/hotkey.json +4 -0
  22. package/locales/fa-IR/models.json +55 -13
  23. package/locales/fa-IR/providers.json +0 -3
  24. package/locales/fr-FR/hotkey.json +4 -0
  25. package/locales/fr-FR/models.json +55 -13
  26. package/locales/fr-FR/providers.json +0 -3
  27. package/locales/it-IT/hotkey.json +4 -0
  28. package/locales/it-IT/models.json +55 -13
  29. package/locales/it-IT/providers.json +0 -3
  30. package/locales/ja-JP/hotkey.json +4 -0
  31. package/locales/ja-JP/models.json +55 -13
  32. package/locales/ja-JP/providers.json +0 -3
  33. package/locales/ko-KR/hotkey.json +4 -0
  34. package/locales/ko-KR/models.json +55 -13
  35. package/locales/ko-KR/providers.json +0 -3
  36. package/locales/nl-NL/hotkey.json +4 -0
  37. package/locales/nl-NL/models.json +55 -13
  38. package/locales/nl-NL/providers.json +0 -3
  39. package/locales/pl-PL/hotkey.json +4 -0
  40. package/locales/pl-PL/models.json +55 -13
  41. package/locales/pl-PL/providers.json +0 -3
  42. package/locales/pt-BR/hotkey.json +4 -0
  43. package/locales/pt-BR/models.json +55 -13
  44. package/locales/pt-BR/providers.json +0 -3
  45. package/locales/ru-RU/hotkey.json +4 -0
  46. package/locales/ru-RU/models.json +55 -13
  47. package/locales/ru-RU/providers.json +0 -3
  48. package/locales/tr-TR/hotkey.json +4 -0
  49. package/locales/tr-TR/models.json +55 -13
  50. package/locales/tr-TR/providers.json +0 -3
  51. package/locales/vi-VN/hotkey.json +4 -0
  52. package/locales/vi-VN/models.json +55 -13
  53. package/locales/vi-VN/providers.json +0 -3
  54. package/locales/zh-CN/hotkey.json +4 -0
  55. package/locales/zh-CN/models.json +55 -13
  56. package/locales/zh-CN/providers.json +0 -3
  57. package/locales/zh-TW/hotkey.json +4 -0
  58. package/locales/zh-TW/models.json +55 -13
  59. package/locales/zh-TW/providers.json +0 -3
  60. package/package.json +1 -1
  61. package/src/config/aiModels/google.ts +37 -13
  62. package/src/config/aiModels/mistral.ts +22 -47
  63. package/src/config/aiModels/vertexai.ts +47 -74
  64. package/src/config/modelProviders/vertexai.ts +1 -1
  65. package/src/const/hotkeys.ts +7 -0
  66. package/src/const/url.ts +1 -1
  67. package/src/features/HotkeyHelperPanel/index.tsx +21 -17
  68. package/src/features/User/UserPanel/useMenu.tsx +2 -1
  69. package/src/locales/default/hotkey.ts +4 -0
  70. package/src/services/__tests__/_url.test.ts +23 -0
  71. package/src/types/hotkey.ts +1 -0
@@ -5,59 +5,59 @@ const vertexaiChatModels: AIChatModelCard[] = [
5
5
  {
6
6
  abilities: {
7
7
  functionCall: true,
8
+ reasoning: true,
8
9
  vision: true,
9
10
  },
10
- contextWindowTokens: 2_097_152 + 8192,
11
+ contextWindowTokens: 1_048_576 + 65_536,
11
12
  description:
12
- 'Gemini 2.0 Pro Experimental 是 Google 最新的实验性多模态AI模型,与历史版本相比有一定的质量提升,特别是对于世界知识、代码和长上下文。',
13
- displayName: 'Gemini 2.0 Pro Experimental 02-05',
13
+ 'Gemini 2.5 Pro Preview 是 Google 最先进的思维模型,能够对代码、数学和STEM领域的复杂问题进行推理,以及使用长上下文分析大型数据集、代码库和文档。',
14
+ displayName: 'Gemini 2.5 Pro Preview 05-06',
14
15
  enabled: true,
15
- id: 'gemini-2.0-pro-exp-02-05',
16
- maxOutput: 8192,
16
+ id: 'gemini-2.5-pro-preview-05-06',
17
+ maxOutput: 65_536,
17
18
  pricing: {
18
- cachedInput: 0,
19
- input: 0,
20
- output: 0,
19
+ input: 1.25, // prompts <= 200k tokens
20
+ output: 10, // prompts <= 200k tokens
21
21
  },
22
- releasedAt: '2025-02-05',
22
+ releasedAt: '2025-05-06',
23
23
  type: 'chat',
24
24
  },
25
25
  {
26
26
  abilities: {
27
27
  functionCall: true,
28
+ reasoning: true,
28
29
  vision: true,
29
30
  },
30
- contextWindowTokens: 1_048_576 + 8192,
31
+ contextWindowTokens: 1_048_576 + 65_536,
31
32
  description:
32
- 'Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。',
33
- displayName: 'Gemini 2.0 Flash',
34
- enabled: true,
35
- id: 'gemini-2.0-flash',
36
- maxOutput: 8192,
33
+ 'Gemini 2.5 Pro Preview 是 Google 最先进的思维模型,能够对代码、数学和STEM领域的复杂问题进行推理,以及使用长上下文分析大型数据集、代码库和文档。',
34
+ displayName: 'Gemini 2.5 Pro Preview 03-25',
35
+ id: 'gemini-2.5-pro-preview-03-25',
36
+ maxOutput: 65_536,
37
37
  pricing: {
38
- cachedInput: 0.0375,
39
- input: 0.15,
40
- output: 0.6,
38
+ input: 1.25, // prompts <= 200k tokens
39
+ output: 10, // prompts <= 200k tokens
41
40
  },
42
- releasedAt: '2025-02-05',
41
+ releasedAt: '2025-04-09',
43
42
  type: 'chat',
44
43
  },
45
44
  {
46
45
  abilities: {
47
46
  functionCall: true,
47
+ reasoning: true,
48
48
  vision: true,
49
49
  },
50
- contextWindowTokens: 1_048_576 + 8192,
51
- description: 'Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。',
52
- displayName: 'Gemini 2.0 Flash-Lite',
53
- id: 'gemini-2.0-flash-lite',
54
- maxOutput: 8192,
50
+ contextWindowTokens: 1_048_576 + 65_536,
51
+ description: 'Gemini 2.5 Flash Preview 是 Google 性价比最高的模型,提供全面的功能。',
52
+ displayName: 'Gemini 2.5 Flash Preview 04-17',
53
+ enabled: true,
54
+ id: 'gemini-2.5-flash-preview-04-17',
55
+ maxOutput: 65_536,
55
56
  pricing: {
56
- cachedInput: 0.018_75,
57
- input: 0.075,
58
- output: 0.3,
57
+ input: 0.15,
58
+ output: 3.5, // Thinking
59
59
  },
60
- releasedAt: '2025-02-05',
60
+ releasedAt: '2025-04-17',
61
61
  type: 'chat',
62
62
  },
63
63
  {
@@ -68,8 +68,8 @@ const vertexaiChatModels: AIChatModelCard[] = [
68
68
  contextWindowTokens: 1_048_576 + 8192,
69
69
  description:
70
70
  'Gemini 2.0 Flash 提供下一代功能和改进,包括卓越的速度、原生工具使用、多模态生成和1M令牌上下文窗口。',
71
- displayName: 'Gemini 2.0 Flash 001',
72
- id: 'gemini-2.0-flash-001',
71
+ displayName: 'Gemini 2.0 Flash',
72
+ id: 'gemini-2.0-flash',
73
73
  maxOutput: 8192,
74
74
  pricing: {
75
75
  cachedInput: 0.0375,
@@ -81,33 +81,33 @@ const vertexaiChatModels: AIChatModelCard[] = [
81
81
  },
82
82
  {
83
83
  abilities: {
84
- reasoning: true,
84
+ functionCall: true,
85
85
  vision: true,
86
86
  },
87
- contextWindowTokens: 1_048_576 + 65_536,
88
- description:
89
- 'Gemini 2.0 Flash Thinking Exp 是 Google 的实验性多模态推理AI模型,能对复杂问题进行推理,拥有新的思维能力。',
90
- displayName: 'Gemini 2.0 Flash Thinking Experimental 01-21',
91
- enabled: true,
92
- id: 'gemini-2.0-flash-thinking-exp-01-21',
93
- maxOutput: 65_536,
87
+ contextWindowTokens: 1_048_576 + 8192,
88
+ description: 'Gemini 2.0 Flash 模型变体,针对成本效益和低延迟等目标进行了优化。',
89
+ displayName: 'Gemini 2.0 Flash-Lite',
90
+ id: 'gemini-2.0-flash-lite',
91
+ maxOutput: 8192,
94
92
  pricing: {
95
- cachedInput: 0,
96
- input: 0,
97
- output: 0,
93
+ cachedInput: 0.018_75,
94
+ input: 0.075,
95
+ output: 0.3,
98
96
  },
99
- releasedAt: '2025-01-21',
97
+ releasedAt: '2025-02-05',
100
98
  type: 'chat',
101
99
  },
102
100
  {
103
- abilities: { functionCall: true, vision: true },
101
+ abilities: {
102
+ functionCall: true,
103
+ vision: true
104
+ },
104
105
  contextWindowTokens: 1_000_000 + 8192,
105
106
  description: 'Gemini 1.5 Flash 002 是一款高效的多模态模型,支持广泛应用的扩展。',
106
107
  displayName: 'Gemini 1.5 Flash 002',
107
108
  id: 'gemini-1.5-flash-002',
108
109
  maxOutput: 8192,
109
110
  pricing: {
110
- cachedInput: 0.018_75,
111
111
  input: 0.075,
112
112
  output: 0.3,
113
113
  },
@@ -115,21 +115,10 @@ const vertexaiChatModels: AIChatModelCard[] = [
115
115
  type: 'chat',
116
116
  },
117
117
  {
118
- abilities: { functionCall: true, vision: true },
119
- contextWindowTokens: 1_000_000 + 8192,
120
- description: 'Gemini 1.5 Flash 001 是一款高效的多模态模型,支持广泛应用的扩展。',
121
- displayName: 'Gemini 1.5 Flash 001',
122
- id: 'gemini-1.5-flash-001',
123
- maxOutput: 8192,
124
- pricing: {
125
- cachedInput: 0.018_75,
126
- input: 0.075,
127
- output: 0.3,
118
+ abilities: {
119
+ functionCall: true,
120
+ vision: true
128
121
  },
129
- type: 'chat',
130
- },
131
- {
132
- abilities: { functionCall: true, vision: true },
133
122
  contextWindowTokens: 2_000_000 + 8192,
134
123
  description:
135
124
  'Gemini 1.5 Pro 002 是最新的生产就绪模型,提供更高质量的输出,特别在数学、长上下文和视觉任务方面有显著提升。',
@@ -137,28 +126,12 @@ const vertexaiChatModels: AIChatModelCard[] = [
137
126
  id: 'gemini-1.5-pro-002',
138
127
  maxOutput: 8192,
139
128
  pricing: {
140
- cachedInput: 0.315,
141
129
  input: 1.25,
142
130
  output: 2.5,
143
131
  },
144
132
  releasedAt: '2024-09-24',
145
133
  type: 'chat',
146
134
  },
147
- {
148
- abilities: { functionCall: true, vision: true },
149
- contextWindowTokens: 2_000_000 + 8192,
150
- description: 'Gemini 1.5 Pro 001 是可扩展的多模态AI解决方案,支持广泛的复杂任务。',
151
- displayName: 'Gemini 1.5 Pro 001',
152
- id: 'gemini-1.5-pro-001',
153
- maxOutput: 8192,
154
- pricing: {
155
- cachedInput: 0.875,
156
- input: 3.5,
157
- output: 10.5,
158
- },
159
- releasedAt: '2024-02-15',
160
- type: 'chat',
161
- },
162
135
  ];
163
136
 
164
137
  export const allModels = [...vertexaiChatModels];
@@ -8,7 +8,7 @@ const VertexAI: ModelProviderCard = {
8
8
  'Google 的 Gemini 系列是其最先进、通用的 AI模型,由 Google DeepMind 打造,专为多模态设计,支持文本、代码、图像、音频和视频的无缝理解与处理。适用于从数据中心到移动设备的多种环境,极大提升了AI模型的效率与应用广泛性。',
9
9
  id: 'vertexai',
10
10
  modelsUrl: 'https://console.cloud.google.com/vertex-ai/model-garden',
11
- name: 'VertexAI',
11
+ name: 'Vertex AI',
12
12
  settings: {
13
13
  disableBrowserRequest: true,
14
14
  showModelFetcher: false,
@@ -11,6 +11,13 @@ const combineKeys = (keys: string[]) => keys.join('+');
11
11
  // mod 在 Mac 上是 command 键,alt 在 Win 上是 ctrl 键
12
12
  export const HOTKEYS_REGISTRATION: HotkeyRegistration = [
13
13
  // basic
14
+ {
15
+ group: HotkeyGroupEnum.Essential,
16
+ id: HotkeyEnum.ShowApp,
17
+ keys: combineKeys([KeyEnum.Mod, 'e']),
18
+ nonEditable: true,
19
+ scopes: [HotkeyScopeEnum.Global],
20
+ },
14
21
  {
15
22
  group: HotkeyGroupEnum.Essential,
16
23
  id: HotkeyEnum.Search,
package/src/const/url.ts CHANGED
@@ -17,7 +17,7 @@ export const OG_URL = '/og/cover.png?v=1';
17
17
 
18
18
  export const GITHUB = pkg.homepage;
19
19
  export const GITHUB_ISSUES = urlJoin(GITHUB, 'issues/new/choose');
20
- export const CHANGELOG = urlJoin(GITHUB, 'blob/main/CHANGELOG.md');
20
+ export const CHANGELOG = 'https://lobehub.com/changelog';
21
21
  export const DOCKER_IMAGE = 'https://hub.docker.com/r/lobehub/lobe-chat';
22
22
 
23
23
  export const DOCUMENTS = urlJoin(OFFICIAL_SITE, '/docs');
@@ -1,6 +1,7 @@
1
1
  'use client';
2
2
 
3
- import { Drawer, Grid, Tabs } from '@lobehub/ui';
3
+ import { Grid, Icon, Modal, Segmented } from '@lobehub/ui';
4
+ import { MessageSquare, Settings2 } from 'lucide-react';
4
5
  import { memo, useState } from 'react';
5
6
  import { useTranslation } from 'react-i18next';
6
7
 
@@ -20,39 +21,42 @@ const HotkeyHelperPanel = memo(() => {
20
21
  const handleClose = () => updateSystemStatus({ showHotkeyHelper: false });
21
22
 
22
23
  return (
23
- <Drawer
24
- height={240}
25
- mask={false}
26
- maskClosable={false}
27
- onClose={handleClose}
24
+ <Modal
25
+ centered
26
+ footer={null}
27
+ onCancel={handleClose}
28
28
  open={open}
29
- placement={'bottom'}
30
29
  styles={{
31
- bodyContent: { paddingBlock: 24 },
32
- title: { paddingBlock: 0 },
30
+ body: { paddingBlock: 24 },
31
+ mask: {
32
+ backdropFilter: 'blur(8px)',
33
+ backgroundColor: 'rgba(0, 0, 0, 0.5)',
34
+ },
33
35
  }}
34
36
  title={
35
- <Tabs
36
- activeKey={active}
37
- compact
38
- items={[
37
+ <Segmented
38
+ onChange={(key) => setActive(key as HotkeyGroupId)}
39
+ options={[
39
40
  {
40
- key: HotkeyGroupEnum.Essential,
41
+ icon: <Icon icon={Settings2} />,
41
42
  label: t('hotkey.group.essential'),
43
+ value: HotkeyGroupEnum.Essential,
42
44
  },
43
45
  {
44
- key: HotkeyGroupEnum.Conversation,
46
+ icon: <Icon icon={MessageSquare} />,
45
47
  label: t('hotkey.group.conversation'),
48
+ value: HotkeyGroupEnum.Conversation,
46
49
  },
47
50
  ]}
48
- onChange={(key) => setActive(key as HotkeyGroupId)}
51
+ value={active}
52
+ variant="filled"
49
53
  />
50
54
  }
51
55
  >
52
56
  <Grid gap={32}>
53
57
  <HotkeyContent groupId={active} />
54
58
  </Grid>
55
- </Drawer>
59
+ </Modal>
56
60
  );
57
61
  });
58
62
 
@@ -25,6 +25,7 @@ import { enableAuth } from '@/const/auth';
25
25
  import { LOBE_CHAT_CLOUD } from '@/const/branding';
26
26
  import { DEFAULT_HOTKEY_CONFIG } from '@/const/settings';
27
27
  import {
28
+ CHANGELOG,
28
29
  DISCORD,
29
30
  DOCUMENTS_REFER_URL,
30
31
  EMAIL_SUPPORT,
@@ -144,7 +145,7 @@ export const useMenu = () => {
144
145
  {
145
146
  icon: <Icon icon={FileClockIcon} />,
146
147
  key: 'changelog',
147
- label: <Link href={'/changelog/modal'}>{t('changelog')}</Link>,
148
+ label: <Link href={isDesktop ? CHANGELOG : '/changelog/modal'}>{t('changelog')}</Link>,
148
149
  },
149
150
  {
150
151
  children: [
@@ -37,6 +37,10 @@ const hotkey: HotkeyI18nTranslations = {
37
37
  desc: '唤起当前页面主要搜索框',
38
38
  title: '搜索',
39
39
  },
40
+ showApp: {
41
+ desc: '快速唤起应用主窗口',
42
+ title: '显示主窗口',
43
+ },
40
44
  switchAgent: {
41
45
  desc: '通过按住 Ctrl 加数字 0~9 切换固定在侧边栏的助手',
42
46
  title: '快捷切换助手',
@@ -0,0 +1,23 @@
1
+ import { describe, expect, it } from 'vitest';
2
+
3
+ import { API_ENDPOINTS } from '../_url';
4
+
5
+ describe('API_ENDPOINTS', () => {
6
+ it('should return correct basePath URLs', () => {
7
+ expect(API_ENDPOINTS.oauth).toBe('/api/auth');
8
+ expect(API_ENDPOINTS.proxy).toBe('/webapi/proxy');
9
+ expect(API_ENDPOINTS.gateway).toBe('/webapi/plugin/gateway');
10
+ expect(API_ENDPOINTS.trace).toBe('/webapi/trace');
11
+ expect(API_ENDPOINTS.stt).toBe('/webapi/stt/openai');
12
+ expect(API_ENDPOINTS.tts).toBe('/webapi/tts/openai');
13
+ expect(API_ENDPOINTS.edge).toBe('/webapi/tts/edge');
14
+ expect(API_ENDPOINTS.microsoft).toBe('/webapi/tts/microsoft');
15
+ });
16
+
17
+ it('should return correct dynamic URLs', () => {
18
+ expect(API_ENDPOINTS.chat('openai')).toBe('/webapi/chat/openai');
19
+ expect(API_ENDPOINTS.models('anthropic')).toBe('/webapi/models/anthropic');
20
+ expect(API_ENDPOINTS.modelPull('azure')).toBe('/webapi/models/azure/pull');
21
+ expect(API_ENDPOINTS.images('dalle')).toBe('/webapi/text-to-image/dalle');
22
+ });
23
+ });
@@ -66,6 +66,7 @@ export const HotkeyEnum = {
66
66
  RegenerateMessage: 'regenerateMessage',
67
67
  SaveTopic: 'saveTopic',
68
68
  Search: 'search',
69
+ ShowApp: 'showApp',
69
70
  SwitchAgent: 'switchAgent',
70
71
  ToggleLeftPanel: 'toggleLeftPanel',
71
72
  ToggleRightPanel: 'toggleRightPanel',