@lobehub/chat 1.47.18 → 1.47.20

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.47.20](https://github.com/lobehub/lobe-chat/compare/v1.47.19...v1.47.20)
6
+
7
+ <sup>Released on **2025-01-23**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix tts in new provider model.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix tts in new provider model, closes [#5569](https://github.com/lobehub/lobe-chat/issues/5569) ([3fef83e](https://github.com/lobehub/lobe-chat/commit/3fef83e))
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.47.19](https://github.com/lobehub/lobe-chat/compare/v1.47.18...v1.47.19)
31
+
32
+ <sup>Released on **2025-01-23**</sup>
33
+
34
+ #### 💄 Styles
35
+
36
+ - **misc**: Add new stepfun model.
37
+
38
+ <br/>
39
+
40
+ <details>
41
+ <summary><kbd>Improvements and Fixes</kbd></summary>
42
+
43
+ #### Styles
44
+
45
+ - **misc**: Add new stepfun model, closes [#5560](https://github.com/lobehub/lobe-chat/issues/5560) ([6e027e8](https://github.com/lobehub/lobe-chat/commit/6e027e8))
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.47.18](https://github.com/lobehub/lobe-chat/compare/v1.47.17...v1.47.18)
6
56
 
7
57
  <sup>Released on **2025-01-23**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix tts in new provider model."
6
+ ]
7
+ },
8
+ "date": "2025-01-23",
9
+ "version": "1.47.20"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Add new stepfun model."
15
+ ]
16
+ },
17
+ "date": "2025-01-23",
18
+ "version": "1.47.19"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "fixes": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.47.18",
3
+ "version": "1.47.20",
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",
@@ -96,6 +96,41 @@ const stepfunChatModels: AIChatModelCard[] = [
96
96
  },
97
97
  type: 'chat',
98
98
  },
99
+ {
100
+ abilities: {
101
+ functionCall: true,
102
+ },
103
+ contextWindowTokens: 8000,
104
+ description:
105
+ '基于新一代自研Attention架构MFA的极速大模型,用极低成本达到和step1类似的效果,同时保持了更高的吞吐和更快响应时延。能够处理通用任务,在代码能力上具备特长。',
106
+ displayName: 'Step 2 Mini',
107
+ enabled: true,
108
+ id: 'step-2-mini',
109
+ pricing: {
110
+ currency: 'CNY',
111
+ input: 1,
112
+ output: 2,
113
+ },
114
+ releasedAt: '2025-01-14',
115
+ type: 'chat',
116
+ },
117
+ {
118
+ abilities: {
119
+ functionCall: true,
120
+ },
121
+ contextWindowTokens: 16_000,
122
+ description: 'step-2模型的实验版本,包含最新的特性,滚动更新中。不推荐在正式生产环境使用。',
123
+ displayName: 'Step 2 16K Exp',
124
+ enabled: true,
125
+ id: 'step-2-16k',
126
+ pricing: {
127
+ currency: 'CNY',
128
+ input: 38,
129
+ output: 120,
130
+ },
131
+ releasedAt: '2025-01-15',
132
+ type: 'chat',
133
+ },
99
134
  {
100
135
  abilities: {
101
136
  functionCall: true,
@@ -121,7 +156,6 @@ const stepfunChatModels: AIChatModelCard[] = [
121
156
  contextWindowTokens: 32_000,
122
157
  description: '支持视觉输入,增强多模态交互体验。',
123
158
  displayName: 'Step 1V 32K',
124
- enabled: true,
125
159
  id: 'step-1v-32k',
126
160
  pricing: {
127
161
  currency: 'CNY',
@@ -130,6 +164,24 @@ const stepfunChatModels: AIChatModelCard[] = [
130
164
  },
131
165
  type: 'chat',
132
166
  },
167
+ {
168
+ abilities: {
169
+ functionCall: true,
170
+ vision: true,
171
+ },
172
+ contextWindowTokens: 32_000,
173
+ description: '该模型拥有强大的图像理解能力。相比于 step-1v 系列模型,拥有更强的视觉性能。',
174
+ displayName: 'Step 1o Vision 32K',
175
+ enabled: true,
176
+ id: 'step-1o-vision-32k',
177
+ pricing: {
178
+ currency: 'CNY',
179
+ input: 15,
180
+ output: 70,
181
+ },
182
+ releasedAt: '2025-01-22',
183
+ type: 'chat',
184
+ },
133
185
  {
134
186
  abilities: {
135
187
  vision: true,
@@ -81,6 +81,32 @@ const Stepfun: ModelProviderCard = {
81
81
  output: 120,
82
82
  },
83
83
  },
84
+ {
85
+ contextWindowTokens: 8000,
86
+ description:
87
+ '基于新一代自研Attention架构MFA的极速大模型,用极低成本达到和step1类似的效果,同时保持了更高的吞吐和更快响应时延。能够处理通用任务,在代码能力上具备特长。',
88
+ displayName: 'Step 2 Mini',
89
+ enabled: true,
90
+ functionCall: true,
91
+ id: 'step-2-mini',
92
+ pricing: {
93
+ currency: 'CNY',
94
+ input: 1,
95
+ output: 2,
96
+ },
97
+ },
98
+ {
99
+ contextWindowTokens: 16_000,
100
+ description: 'step-2模型的实验版本,包含最新的特性,滚动更新中。不推荐在正式生产环境使用。',
101
+ displayName: 'Step 2 16K Exp',
102
+ functionCall: true,
103
+ id: 'step-2-16k-exp',
104
+ pricing: {
105
+ currency: 'CNY',
106
+ input: 38,
107
+ output: 120,
108
+ },
109
+ },
84
110
  {
85
111
  contextWindowTokens: 8000,
86
112
  description: '小型视觉模型,适合基本的图文任务。',
@@ -99,7 +125,6 @@ const Stepfun: ModelProviderCard = {
99
125
  contextWindowTokens: 32_000,
100
126
  description: '支持视觉输入,增强多模态交互体验。',
101
127
  displayName: 'Step 1V 32K',
102
- enabled: true,
103
128
  functionCall: true,
104
129
  id: 'step-1v-32k',
105
130
  pricing: {
@@ -109,6 +134,19 @@ const Stepfun: ModelProviderCard = {
109
134
  },
110
135
  vision: true,
111
136
  },
137
+ {
138
+ contextWindowTokens: 32_000,
139
+ description: '该模型拥有强大的图像理解能力。相比于 step-1v 系列模型,拥有更强的视觉性能。',
140
+ displayName: 'Step 1o Vision 32K',
141
+ enabled: true,
142
+ id: 'step-1o-vision-32k',
143
+ pricing: {
144
+ currency: 'CNY',
145
+ input: 15,
146
+ output: 70,
147
+ },
148
+ vision: true,
149
+ },
112
150
  {
113
151
  contextWindowTokens: 32_000,
114
152
  description: '该模型拥有强大的视频理解能力。',
@@ -123,7 +161,7 @@ const Stepfun: ModelProviderCard = {
123
161
  vision: true,
124
162
  },
125
163
  ],
126
- checkModel: 'step-1-flash',
164
+ checkModel: 'step-2-mini',
127
165
  description:
128
166
  '阶级星辰大模型具备行业领先的多模态及复杂推理能力,支持超长文本理解和强大的自主调度搜索引擎功能。',
129
167
  // after test, currently https://api.stepfun.com/v1/chat/completions has the CORS issue
@@ -4,6 +4,8 @@ import {
4
4
  OPENAI_API_KEY_HEADER_KEY,
5
5
  OPENAI_END_POINT,
6
6
  } from '@/const/fetch';
7
+ import { isDeprecatedEdition } from '@/const/version';
8
+ import { aiProviderSelectors, useAiInfraStore } from '@/store/aiInfra';
7
9
  import { useUserStore } from '@/store/user';
8
10
  import { keyVaultsConfigSelectors } from '@/store/user/selectors';
9
11
 
@@ -14,14 +16,23 @@ import { keyVaultsConfigSelectors } from '@/store/user/selectors';
14
16
  // eslint-disable-next-line no-undef
15
17
  export const createHeaderWithOpenAI = (header?: HeadersInit): HeadersInit => {
16
18
  const state = useUserStore.getState();
17
- const openAIConfig = keyVaultsConfigSelectors.openAIConfig(state);
18
19
 
20
+ let keyVaults: Record<string, any> = {};
21
+
22
+ // TODO: remove this condition in V2.0
23
+ if (isDeprecatedEdition) {
24
+ keyVaults = keyVaultsConfigSelectors.getVaultByProvider('openai' as any)(
25
+ useUserStore.getState(),
26
+ );
27
+ } else {
28
+ keyVaults = aiProviderSelectors.providerKeyVaults('openai')(useAiInfraStore.getState()) || {};
29
+ }
19
30
  // eslint-disable-next-line no-undef
20
31
  return {
21
32
  ...header,
22
33
  [LOBE_CHAT_ACCESS_CODE]: keyVaultsConfigSelectors.password(state),
23
34
  [LOBE_USER_ID]: state.user?.id || '',
24
- [OPENAI_API_KEY_HEADER_KEY]: openAIConfig.apiKey || '',
25
- [OPENAI_END_POINT]: openAIConfig.baseURL || '',
35
+ [OPENAI_API_KEY_HEADER_KEY]: keyVaults.apiKey || '',
36
+ [OPENAI_END_POINT]: keyVaults.baseURL || '',
26
37
  };
27
38
  };