@lobehub/chat 1.124.0 → 1.124.2

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 (145) hide show
  1. package/.env.example +5 -0
  2. package/.github/scripts/pr-comment.js +11 -2
  3. package/.github/workflows/desktop-pr-build.yml +86 -12
  4. package/.github/workflows/release-desktop-beta.yml +91 -20
  5. package/CHANGELOG.md +58 -0
  6. package/Dockerfile +2 -0
  7. package/Dockerfile.database +2 -0
  8. package/Dockerfile.pglite +2 -0
  9. package/apps/desktop/electron-builder.js +8 -4
  10. package/changelog/v1.json +21 -0
  11. package/docs/self-hosting/environment-variables/model-provider.mdx +18 -0
  12. package/docs/self-hosting/environment-variables/model-provider.zh-CN.mdx +20 -0
  13. package/locales/ar/chat.json +2 -0
  14. package/locales/bg-BG/chat.json +2 -0
  15. package/locales/de-DE/chat.json +2 -0
  16. package/locales/en-US/chat.json +2 -0
  17. package/locales/es-ES/chat.json +2 -0
  18. package/locales/fa-IR/chat.json +2 -0
  19. package/locales/fr-FR/chat.json +2 -0
  20. package/locales/it-IT/chat.json +2 -0
  21. package/locales/ja-JP/chat.json +2 -0
  22. package/locales/ko-KR/chat.json +2 -0
  23. package/locales/nl-NL/chat.json +2 -0
  24. package/locales/pl-PL/chat.json +2 -0
  25. package/locales/pt-BR/chat.json +2 -0
  26. package/locales/ru-RU/chat.json +2 -0
  27. package/locales/tr-TR/chat.json +2 -0
  28. package/locales/vi-VN/chat.json +2 -0
  29. package/locales/zh-CN/chat.json +2 -0
  30. package/locales/zh-CN/modelProvider.json +1 -1
  31. package/locales/zh-TW/chat.json +2 -0
  32. package/package.json +1 -1
  33. package/packages/const/src/hotkeys.ts +1 -1
  34. package/packages/const/src/index.ts +1 -0
  35. package/packages/const/src/settings/hotkey.ts +3 -2
  36. package/packages/const/src/trace.ts +1 -1
  37. package/packages/const/src/user.ts +1 -2
  38. package/packages/database/src/client/db.test.ts +19 -13
  39. package/packages/electron-server-ipc/src/ipcClient.test.ts +783 -1
  40. package/packages/file-loaders/src/loadFile.test.ts +61 -0
  41. package/packages/file-loaders/src/utils/isTextReadableFile.test.ts +43 -0
  42. package/packages/file-loaders/src/utils/parser-utils.test.ts +155 -0
  43. package/packages/model-bank/src/aiModels/aihubmix.ts +38 -4
  44. package/packages/model-bank/src/aiModels/groq.ts +26 -8
  45. package/packages/model-bank/src/aiModels/hunyuan.ts +3 -3
  46. package/packages/model-bank/src/aiModels/modelscope.ts +13 -2
  47. package/packages/model-bank/src/aiModels/moonshot.ts +25 -5
  48. package/packages/model-bank/src/aiModels/novita.ts +40 -9
  49. package/packages/model-bank/src/aiModels/openrouter.ts +0 -13
  50. package/packages/model-bank/src/aiModels/qwen.ts +62 -1
  51. package/packages/model-bank/src/aiModels/siliconcloud.ts +20 -0
  52. package/packages/model-bank/src/aiModels/volcengine.ts +141 -15
  53. package/packages/model-runtime/package.json +2 -1
  54. package/packages/model-runtime/src/ai21/index.test.ts +2 -2
  55. package/packages/model-runtime/src/ai360/index.test.ts +2 -2
  56. package/packages/model-runtime/src/akashchat/index.test.ts +19 -0
  57. package/packages/model-runtime/src/anthropic/index.test.ts +1 -2
  58. package/packages/model-runtime/src/baichuan/index.test.ts +1 -2
  59. package/packages/model-runtime/src/bedrock/index.test.ts +1 -2
  60. package/packages/model-runtime/src/bfl/createImage.test.ts +1 -2
  61. package/packages/model-runtime/src/bfl/index.test.ts +1 -2
  62. package/packages/model-runtime/src/cloudflare/index.test.ts +1 -2
  63. package/packages/model-runtime/src/cohere/index.test.ts +19 -0
  64. package/packages/model-runtime/src/deepseek/index.test.ts +2 -2
  65. package/packages/model-runtime/src/fireworksai/index.test.ts +2 -2
  66. package/packages/model-runtime/src/giteeai/index.test.ts +2 -2
  67. package/packages/model-runtime/src/github/index.test.ts +2 -2
  68. package/packages/model-runtime/src/google/createImage.test.ts +1 -2
  69. package/packages/model-runtime/src/google/index.test.ts +1 -1
  70. package/packages/model-runtime/src/groq/index.test.ts +2 -3
  71. package/packages/model-runtime/src/huggingface/index.test.ts +40 -0
  72. package/packages/model-runtime/src/hunyuan/index.test.ts +2 -3
  73. package/packages/model-runtime/src/internlm/index.test.ts +2 -2
  74. package/packages/model-runtime/src/jina/index.test.ts +19 -0
  75. package/packages/model-runtime/src/lmstudio/index.test.ts +2 -2
  76. package/packages/model-runtime/src/minimax/index.test.ts +19 -0
  77. package/packages/model-runtime/src/mistral/index.test.ts +2 -3
  78. package/packages/model-runtime/src/modelscope/index.test.ts +19 -0
  79. package/packages/model-runtime/src/moonshot/index.test.ts +1 -2
  80. package/packages/model-runtime/src/nebius/index.test.ts +19 -0
  81. package/packages/model-runtime/src/newapi/index.test.ts +49 -42
  82. package/packages/model-runtime/src/newapi/index.ts +124 -143
  83. package/packages/model-runtime/src/novita/index.test.ts +3 -4
  84. package/packages/model-runtime/src/nvidia/index.test.ts +19 -0
  85. package/packages/model-runtime/src/openrouter/index.test.ts +2 -3
  86. package/packages/model-runtime/src/perplexity/index.test.ts +2 -3
  87. package/packages/model-runtime/src/ppio/index.test.ts +3 -4
  88. package/packages/model-runtime/src/qwen/index.test.ts +2 -2
  89. package/packages/model-runtime/src/sambanova/index.test.ts +19 -0
  90. package/packages/model-runtime/src/search1api/index.test.ts +19 -0
  91. package/packages/model-runtime/src/sensenova/index.test.ts +2 -2
  92. package/packages/model-runtime/src/spark/index.test.ts +2 -2
  93. package/packages/model-runtime/src/stepfun/index.test.ts +2 -2
  94. package/packages/model-runtime/src/taichu/index.test.ts +4 -5
  95. package/packages/model-runtime/src/tencentcloud/index.test.ts +1 -1
  96. package/packages/model-runtime/src/togetherai/index.test.ts +1 -2
  97. package/packages/model-runtime/src/upstage/index.test.ts +1 -2
  98. package/packages/model-runtime/src/utils/openaiCompatibleFactory/index.test.ts +9 -7
  99. package/packages/model-runtime/src/utils/streams/anthropic.ts +2 -2
  100. package/packages/model-runtime/src/utils/streams/openai/openai.ts +20 -13
  101. package/packages/model-runtime/src/utils/streams/openai/responsesStream.test.ts +1 -2
  102. package/packages/model-runtime/src/utils/streams/openai/responsesStream.ts +2 -2
  103. package/packages/model-runtime/src/utils/streams/protocol.ts +2 -2
  104. package/packages/model-runtime/src/wenxin/index.test.ts +2 -3
  105. package/packages/model-runtime/src/xai/index.test.ts +2 -2
  106. package/packages/model-runtime/src/zeroone/index.test.ts +1 -2
  107. package/packages/model-runtime/src/zhipu/index.test.ts +2 -3
  108. package/packages/model-runtime/vitest.config.mts +0 -7
  109. package/packages/types/src/index.ts +2 -0
  110. package/packages/types/src/message/base.ts +1 -1
  111. package/packages/types/src/openai/chat.ts +2 -3
  112. package/packages/utils/package.json +2 -1
  113. package/packages/utils/src/_deprecated/parseModels.test.ts +1 -1
  114. package/packages/utils/src/_deprecated/parseModels.ts +1 -1
  115. package/packages/utils/src/client/topic.test.ts +1 -2
  116. package/packages/utils/src/client/topic.ts +1 -2
  117. package/packages/utils/src/electron/desktopRemoteRPCFetch.ts +1 -1
  118. package/packages/utils/src/fetch/fetchSSE.ts +7 -8
  119. package/packages/utils/src/fetch/parseError.ts +1 -3
  120. package/packages/utils/src/format.test.ts +1 -2
  121. package/packages/utils/src/index.ts +1 -0
  122. package/packages/utils/src/toolManifest.ts +1 -2
  123. package/packages/utils/src/trace.ts +1 -1
  124. package/packages/utils/vitest.config.mts +1 -1
  125. package/packages/web-crawler/src/__tests__/urlRules.test.ts +275 -0
  126. package/packages/web-crawler/src/crawImpl/__tests__/exa.test.ts +269 -0
  127. package/packages/web-crawler/src/crawImpl/__tests__/firecrawl.test.ts +284 -0
  128. package/packages/web-crawler/src/crawImpl/__tests__/naive.test.ts +234 -0
  129. package/packages/web-crawler/src/crawImpl/__tests__/tavily.test.ts +359 -0
  130. package/packages/web-crawler/src/utils/__tests__/errorType.test.ts +217 -0
  131. package/packages/web-crawler/vitest.config.mts +3 -0
  132. package/scripts/electronWorkflow/mergeMacReleaseFiles.ts +207 -0
  133. package/src/app/[variants]/(main)/settings/provider/(detail)/newapi/page.tsx +1 -1
  134. package/src/components/Thinking/index.tsx +2 -3
  135. package/src/config/llm.ts +8 -0
  136. package/src/features/ChatInput/Desktop/index.tsx +16 -4
  137. package/src/features/ChatInput/StoreUpdater.tsx +2 -0
  138. package/src/libs/traces/index.ts +1 -1
  139. package/src/locales/default/chat.ts +1 -0
  140. package/src/locales/default/modelProvider.ts +1 -1
  141. package/src/server/modules/ModelRuntime/trace.ts +1 -2
  142. package/src/store/chat/slices/aiChat/actions/__tests__/cancel-functionality.test.ts +107 -0
  143. package/src/store/chat/slices/aiChat/actions/__tests__/generateAIChatV2.test.ts +352 -7
  144. package/src/store/chat/slices/aiChat/actions/generateAIChatV2.ts +2 -1
  145. package/packages/model-runtime/src/openrouter/__snapshots__/index.test.ts.snap +0 -113
package/.env.example CHANGED
@@ -173,6 +173,11 @@ OPENAI_API_KEY=sk-xxxxxxxxx
173
173
 
174
174
  # NEBIUS_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
175
175
 
176
+ ### NewAPI Service ###
177
+
178
+ # NEWAPI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
179
+ # NEWAPI_PROXY_URL=https://your-newapi-server.com
180
+
176
181
  ########################################
177
182
  ############ Market Service ############
178
183
  ########################################
@@ -36,10 +36,19 @@ module.exports = async ({ github, context, releaseUrl, version, tag }) => {
36
36
  // Generate combined download table
37
37
  let assetTable = '| Platform | File | Size |\n| --- | --- | --- |\n';
38
38
 
39
- // Add macOS assets
39
+ // Add macOS assets with architecture detection
40
40
  macAssets.forEach((asset) => {
41
41
  const sizeInMB = (asset.size / (1024 * 1024)).toFixed(2);
42
- assetTable += `| macOS | [${asset.name}](${asset.browser_download_url}) | ${sizeInMB} MB |\n`;
42
+
43
+ // Detect architecture from filename
44
+ let architecture = '';
45
+ if (asset.name.includes('arm64')) {
46
+ architecture = ' (Apple Silicon)';
47
+ } else if (asset.name.includes('x64') || asset.name.includes('-mac.')) {
48
+ architecture = ' (Intel)';
49
+ }
50
+
51
+ assetTable += `| macOS${architecture} | [${asset.name}](${asset.browser_download_url}) | ${sizeInMB} MB |\n`;
43
52
  });
44
53
 
45
54
  // Add Windows assets
@@ -32,18 +32,18 @@ jobs:
32
32
  with:
33
33
  node-version: 22
34
34
 
35
- - name: Setup pnpm
36
- uses: pnpm/action-setup@v2
35
+ - name: Install bun
36
+ uses: oven-sh/setup-bun@v1
37
37
  with:
38
- version: 10
38
+ bun-version: ${{ secrets.BUN_VERSION }}
39
39
 
40
40
  - name: Install deps
41
- run: pnpm install
41
+ run: bun i
42
42
  env:
43
43
  NODE_OPTIONS: --max-old-space-size=6144
44
44
 
45
45
  - name: Lint
46
- run: pnpm run lint
46
+ run: bun run lint
47
47
  env:
48
48
  NODE_OPTIONS: --max-old-space-size=6144
49
49
 
@@ -93,7 +93,7 @@ jobs:
93
93
  runs-on: ${{ matrix.os }}
94
94
  strategy:
95
95
  matrix:
96
- os: [macos-latest, windows-2025, ubuntu-latest]
96
+ os: [macos-latest, macos-13, windows-2025, ubuntu-latest]
97
97
  steps:
98
98
  - uses: actions/checkout@v5
99
99
  with:
@@ -172,6 +172,27 @@ jobs:
172
172
  NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_PROJECT_ID }}
173
173
  NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_NIGHTLY_DESKTOP_BASE_URL }}
174
174
 
175
+ # 处理 macOS latest-mac.yml 重命名 (避免多架构覆盖)
176
+ - name: Rename macOS latest-mac.yml for multi-architecture support
177
+ if: runner.os == 'macOS'
178
+ run: |
179
+ cd apps/desktop/release
180
+ if [ -f "latest-mac.yml" ]; then
181
+ # 根据运行环境检测架构
182
+ if [[ "${{ matrix.os }}" == *"arm64"* || "${{ matrix.os }}" == "macos-latest" ]]; then
183
+ ARCH_SUFFIX="arm"
184
+ else
185
+ ARCH_SUFFIX="intel"
186
+ fi
187
+
188
+ mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
189
+ echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml"
190
+ ls -la latest-mac-*.yml
191
+ else
192
+ echo "⚠️ latest-mac.yml not found, skipping rename"
193
+ ls -la latest*.yml || echo "No latest*.yml files found"
194
+ fi
195
+
175
196
  # 上传构建产物
176
197
  - name: Upload artifact
177
198
  uses: actions/upload-artifact@v4
@@ -189,8 +210,62 @@ jobs:
189
210
  apps/desktop/release/*.tar.gz*
190
211
  retention-days: 5
191
212
 
192
- publish-pr:
213
+ # 合并 macOS 多架构 latest-mac.yml 文件
214
+ merge-mac-files:
193
215
  needs: [build, version]
216
+ name: Merge macOS Release Files for PR
217
+ runs-on: ubuntu-latest
218
+ permissions:
219
+ contents: write
220
+ steps:
221
+ - name: Checkout repository
222
+ uses: actions/checkout@v5
223
+
224
+ - name: Setup Node.js
225
+ uses: actions/setup-node@v4
226
+ with:
227
+ node-version: 22
228
+
229
+ - name: Install required dependencies only
230
+ run: |
231
+ # 创建临时目录并安装依赖
232
+ mkdir -p temp-deps
233
+ cd temp-deps
234
+ npm init -y
235
+ npm install fs-extra yaml tsx
236
+ # 确保回到项目根目录
237
+ cd ${{ github.workspace }}
238
+
239
+ # 下载所有平台的构建产物
240
+ - name: Download artifacts
241
+ uses: actions/download-artifact@v4
242
+ with:
243
+ path: release
244
+ pattern: release-*
245
+ merge-multiple: true
246
+
247
+ # 列出下载的构建产物
248
+ - name: List downloaded artifacts
249
+ run: ls -R release
250
+
251
+ # 合并 macOS YAML 文件 (确保在项目根目录执行)
252
+ - name: Merge latest-mac.yml files
253
+ working-directory: ${{ github.workspace }}
254
+ run: NODE_PATH="${PWD}/temp-deps/node_modules" "${PWD}/temp-deps/node_modules/.bin/tsx" scripts/electronWorkflow/mergeMacReleaseFiles.ts ${{ needs.version.outputs.version }}
255
+ env:
256
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
257
+ RELEASE_TAG: ${{ needs.version.outputs.version }}
258
+
259
+ # 上传合并后的构建产物
260
+ - name: Upload artifacts with merged macOS files
261
+ uses: actions/upload-artifact@v4
262
+ with:
263
+ name: merged-release-pr
264
+ path: release/
265
+ retention-days: 1
266
+
267
+ publish-pr:
268
+ needs: [merge-mac-files, version]
194
269
  name: Publish PR Build
195
270
  runs-on: ubuntu-latest
196
271
  # Grant write permissions for creating release and commenting on PR
@@ -204,16 +279,15 @@ jobs:
204
279
  with:
205
280
  fetch-depth: 0
206
281
 
207
- # 下载所有平台的构建产物
208
- - name: Download artifacts
282
+ # 下载合并后的构建产物
283
+ - name: Download merged artifacts
209
284
  uses: actions/download-artifact@v4
210
285
  with:
286
+ name: merged-release-pr
211
287
  path: release
212
- pattern: release-*
213
- merge-multiple: true
214
288
 
215
289
  # 列出所有构建产物
216
- - name: List artifacts
290
+ - name: List final artifacts
217
291
  run: ls -R release
218
292
 
219
293
  # 生成PR发布描述
@@ -28,16 +28,16 @@ jobs:
28
28
  with:
29
29
  node-version: 22
30
30
 
31
- - name: Setup pnpm
32
- uses: pnpm/action-setup@v2
31
+ - name: Install bun
32
+ uses: oven-sh/setup-bun@v1
33
33
  with:
34
- version: 10
34
+ bun-version: ${{ secrets.BUN_VERSION }}
35
35
 
36
36
  - name: Install deps
37
- run: pnpm install
37
+ run: bun i
38
38
 
39
39
  - name: Lint
40
- run: pnpm run lint
40
+ run: bun run lint
41
41
 
42
42
  version:
43
43
  name: Determine version
@@ -80,7 +80,7 @@ jobs:
80
80
  runs-on: ${{ matrix.os }}
81
81
  strategy:
82
82
  matrix:
83
- os: [macos-latest, windows-2025, ubuntu-latest]
83
+ os: [macos-latest, macos-13, windows-2025, ubuntu-latest]
84
84
  steps:
85
85
  - uses: actions/checkout@v5
86
86
  with:
@@ -91,14 +91,14 @@ jobs:
91
91
  with:
92
92
  node-version: 22
93
93
 
94
- - name: Setup pnpm
95
- uses: pnpm/action-setup@v2
94
+ - name: Install bun
95
+ uses: oven-sh/setup-bun@v1
96
96
  with:
97
- version: 10
97
+ bun-version: ${{ secrets.BUN_VERSION }}
98
98
 
99
- # node-linker=hoisted 模式将可以确保 asar 压缩可用
99
+ # bun install 默认行为应该能确保 asar 压缩可用
100
100
  - name: Install deps
101
- run: pnpm install --node-linker=hoisted
101
+ run: bun i
102
102
 
103
103
  - name: Install deps on Desktop
104
104
  run: npm run install-isolated --prefix=./apps/desktop
@@ -154,7 +154,28 @@ jobs:
154
154
  NEXT_PUBLIC_DESKTOP_PROJECT_ID: ${{ secrets.UMAMI_BETA_DESKTOP_PROJECT_ID }}
155
155
  NEXT_PUBLIC_DESKTOP_UMAMI_BASE_URL: ${{ secrets.UMAMI_BETA_DESKTOP_BASE_URL }}
156
156
 
157
- # 上传构建产物,移除了 zip 相关部分
157
+ # 处理 macOS latest-mac.yml 重命名 (避免多架构覆盖)
158
+ - name: Rename macOS latest-mac.yml for multi-architecture support
159
+ if: runner.os == 'macOS'
160
+ run: |
161
+ cd apps/desktop/release
162
+ if [ -f "latest-mac.yml" ]; then
163
+ # 根据运行环境检测架构
164
+ if [[ "${{ matrix.os }}" == *"arm64"* || "${{ matrix.os }}" == "macos-latest" ]]; then
165
+ ARCH_SUFFIX="arm"
166
+ else
167
+ ARCH_SUFFIX="intel"
168
+ fi
169
+
170
+ mv latest-mac.yml "latest-mac-${ARCH_SUFFIX}.yml"
171
+ echo "✅ Renamed latest-mac.yml to latest-mac-${ARCH_SUFFIX}.yml"
172
+ ls -la latest-mac-*.yml
173
+ else
174
+ echo "⚠️ latest-mac.yml not found, skipping rename"
175
+ ls -la latest*.yml || echo "No latest*.yml files found"
176
+ fi
177
+
178
+ # 上传构建产物 (工作流处理重命名,不依赖 electron-builder 钩子)
158
179
  - name: Upload artifact
159
180
  uses: actions/upload-artifact@v4
160
181
  with:
@@ -171,17 +192,32 @@ jobs:
171
192
  apps/desktop/release/*.tar.gz*
172
193
  retention-days: 5
173
194
 
174
- # 正式版发布 job
175
- publish-release:
195
+ # 合并 macOS 多架构 latest-mac.yml 文件
196
+ merge-mac-files:
176
197
  needs: [build, version]
177
- name: Publish Beta Release
198
+ name: Merge macOS Release Files
178
199
  runs-on: ubuntu-latest
179
- # Grant write permission to contents for uploading release assets
180
200
  permissions:
181
201
  contents: write
182
- outputs:
183
- artifact_path: ${{ steps.set_path.outputs.path }}
184
202
  steps:
203
+ - name: Checkout repository
204
+ uses: actions/checkout@v5
205
+
206
+ - name: Setup Node.js
207
+ uses: actions/setup-node@v4
208
+ with:
209
+ node-version: 22
210
+
211
+ - name: Install required dependencies only
212
+ run: |
213
+ # 创建临时目录并安装依赖
214
+ mkdir -p temp-deps
215
+ cd temp-deps
216
+ npm init -y
217
+ npm install fs-extra yaml tsx
218
+ # 确保回到项目根目录
219
+ cd ${{ github.workspace }}
220
+
185
221
  # 下载所有平台的构建产物
186
222
  - name: Download artifacts
187
223
  uses: actions/download-artifact@v4
@@ -190,11 +226,46 @@ jobs:
190
226
  pattern: release-*
191
227
  merge-multiple: true
192
228
 
229
+ # 列出下载的构建产物
230
+ - name: List downloaded artifacts
231
+ run: ls -R release
232
+
233
+ # 合并 macOS YAML 文件 (确保在项目根目录执行)
234
+ - name: Merge latest-mac.yml files
235
+ working-directory: ${{ github.workspace }}
236
+ run: NODE_PATH="${PWD}/temp-deps/node_modules" "${PWD}/temp-deps/node_modules/.bin/tsx" scripts/electronWorkflow/mergeMacReleaseFiles.ts ${{ github.event.release.tag_name }}
237
+ env:
238
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
239
+ RELEASE_TAG: ${{ github.event.release.tag_name }}
240
+
241
+ # 上传合并后的构建产物
242
+ - name: Upload artifacts with merged macOS files
243
+ uses: actions/upload-artifact@v4
244
+ with:
245
+ name: merged-release
246
+ path: release/
247
+ retention-days: 1
248
+
249
+ # 发布所有平台构建产物
250
+ publish-release:
251
+ needs: [merge-mac-files]
252
+ name: Publish Beta Release
253
+ runs-on: ubuntu-latest
254
+ permissions:
255
+ contents: write
256
+ steps:
257
+ # 下载合并后的构建产物
258
+ - name: Download merged artifacts
259
+ uses: actions/download-artifact@v4
260
+ with:
261
+ name: merged-release
262
+ path: release
263
+
193
264
  # 列出所有构建产物
194
- - name: List artifacts
265
+ - name: List final artifacts
195
266
  run: ls -R release
196
267
 
197
- # 将构建产物上传到现有 release
268
+ # 将构建产物上传到现有 release (现在包含合并后的 latest-mac.yml)
198
269
  - name: Upload to Release
199
270
  uses: softprops/action-gh-release@v1
200
271
  with:
package/CHANGELOG.md CHANGED
@@ -2,6 +2,64 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.124.2](https://github.com/lobehub/lobe-chat/compare/v1.124.1...v1.124.2)
6
+
7
+ <sup>Released on **2025-09-06**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix ChatInput send command switch.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### What's fixed
19
+
20
+ - **misc**: Fix ChatInput send command switch, closes [#9131](https://github.com/lobehub/lobe-chat/issues/9131) ([4d5246a](https://github.com/lobehub/lobe-chat/commit/4d5246a))
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.124.1](https://github.com/lobehub/lobe-chat/compare/v1.124.0...v1.124.1)
31
+
32
+ <sup>Released on **2025-09-06**</sup>
33
+
34
+ #### 🐛 Bug Fixes
35
+
36
+ - **misc**: Enhance NewAPI with environment variables and fix routers compatibility.
37
+
38
+ #### 💄 Styles
39
+
40
+ - **misc**: Update doubao-seed-1.6-vision models.
41
+
42
+ <br/>
43
+
44
+ <details>
45
+ <summary><kbd>Improvements and Fixes</kbd></summary>
46
+
47
+ #### What's fixed
48
+
49
+ - **misc**: Enhance NewAPI with environment variables and fix routers compatibility, closes [#9110](https://github.com/lobehub/lobe-chat/issues/9110) ([a66856d](https://github.com/lobehub/lobe-chat/commit/a66856d))
50
+
51
+ #### Styles
52
+
53
+ - **misc**: Update doubao-seed-1.6-vision models, closes [#9052](https://github.com/lobehub/lobe-chat/issues/9052) ([df2d001](https://github.com/lobehub/lobe-chat/commit/df2d001))
54
+
55
+ </details>
56
+
57
+ <div align="right">
58
+
59
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
60
+
61
+ </div>
62
+
5
63
  ## [Version 1.124.0](https://github.com/lobehub/lobe-chat/compare/v1.123.4...v1.124.0)
6
64
 
7
65
  <sup>Released on **2025-09-06**</sup>
package/Dockerfile CHANGED
@@ -196,6 +196,8 @@ ENV \
196
196
  MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
197
197
  # Nebius
198
198
  NEBIUS_API_KEY="" NEBIUS_MODEL_LIST="" NEBIUS_PROXY_URL="" \
199
+ # NewAPI
200
+ NEWAPI_API_KEY="" NEWAPI_PROXY_URL="" \
199
201
  # Novita
200
202
  NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
201
203
  # Nvidia NIM
@@ -238,6 +238,8 @@ ENV \
238
238
  MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
239
239
  # Nebius
240
240
  NEBIUS_API_KEY="" NEBIUS_MODEL_LIST="" NEBIUS_PROXY_URL="" \
241
+ # NewAPI
242
+ NEWAPI_API_KEY="" NEWAPI_PROXY_URL="" \
241
243
  # Novita
242
244
  NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
243
245
  # Nvidia NIM
package/Dockerfile.pglite CHANGED
@@ -198,6 +198,8 @@ ENV \
198
198
  MOONSHOT_API_KEY="" MOONSHOT_MODEL_LIST="" MOONSHOT_PROXY_URL="" \
199
199
  # Nebius
200
200
  NEBIUS_API_KEY="" NEBIUS_MODEL_LIST="" NEBIUS_PROXY_URL="" \
201
+ # NewAPI
202
+ NEWAPI_API_KEY="" NEWAPI_PROXY_URL="" \
201
203
  # Novita
202
204
  NOVITA_API_KEY="" NOVITA_MODEL_LIST="" \
203
205
  # Nvidia NIM
@@ -1,12 +1,15 @@
1
1
  const dotenv = require('dotenv');
2
+ const os = require('node:os');
2
3
 
3
4
  dotenv.config();
4
5
 
5
6
  const packageJSON = require('./package.json');
6
7
 
7
8
  const channel = process.env.UPDATE_CHANNEL;
9
+ const arch = os.arch();
8
10
 
9
11
  console.log(`🚄 Build Version ${packageJSON.version}, Channel: ${channel}`);
12
+ console.log(`🏗️ Building for architecture: ${arch}`);
10
13
 
11
14
  const isNightly = channel === 'nightly';
12
15
  const isBeta = packageJSON.name.includes('beta');
@@ -87,12 +90,13 @@ const config = {
87
90
  hardenedRuntime: true,
88
91
  notarize: true,
89
92
  target:
90
- // 降低构建时间,nightly 只打 arm64
93
+ // 降低构建时间,nightly 只打 dmg
94
+ // 根据当前机器架构只构建对应架构的包
91
95
  isNightly
92
- ? [{ arch: ['arm64'], target: 'dmg' }]
96
+ ? [{ arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'dmg' }]
93
97
  : [
94
- { arch: ['x64', 'arm64'], target: 'dmg' },
95
- { arch: ['x64', 'arm64'], target: 'zip' },
98
+ { arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'dmg' },
99
+ { arch: [arch === 'arm64' ? 'arm64' : 'x64'], target: 'zip' },
96
100
  ],
97
101
  },
98
102
  npmRebuild: true,
package/changelog/v1.json CHANGED
@@ -1,4 +1,25 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix ChatInput send command switch."
6
+ ]
7
+ },
8
+ "date": "2025-09-06",
9
+ "version": "1.124.2"
10
+ },
11
+ {
12
+ "children": {
13
+ "fixes": [
14
+ "Enhance NewAPI with environment variables and fix routers compatibility."
15
+ ],
16
+ "improvements": [
17
+ "Update doubao-seed-1.6-vision models."
18
+ ]
19
+ },
20
+ "date": "2025-09-06",
21
+ "version": "1.124.1"
22
+ },
2
23
  {
3
24
  "children": {
4
25
  "features": [
@@ -675,4 +675,22 @@ The above example disables all models first, then enables `flux/schnell` and `fl
675
675
 
676
676
  The above example disables all models first, then enables `flux-pro-1.1` and `flux-kontext-pro` (displayed as `FLUX.1 Kontext [pro]`).
677
677
 
678
+ ## NewAPI
679
+
680
+ ### `NEWAPI_API_KEY`
681
+
682
+ - Type: Optional
683
+ - Description: This is the API key for your NewAPI service instance. NewAPI is a multi-provider model aggregation service that provides unified access to various AI model APIs.
684
+ - Default: -
685
+ - Example: `sk-xxxxxx...xxxxxx`
686
+
687
+ ### `NEWAPI_PROXY_URL`
688
+
689
+ - Type: Optional
690
+ - Description: The base URL for your NewAPI server instance. This should point to your deployed NewAPI service endpoint.
691
+ - Default: -
692
+ - Example: `https://your-newapi-server.com/`
693
+
694
+ NewAPI is a multi-provider model aggregation service that supports automatic model routing based on provider detection. It offers cost management features and provides a single endpoint for accessing models from multiple providers including OpenAI, Anthropic, Google, and more. Learn more about NewAPI at [https://github.com/Calcium-Ion/new-api](https://github.com/Calcium-Ion/new-api).
695
+
678
696
  [model-list]: /docs/self-hosting/advanced/model-list
@@ -674,4 +674,24 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
674
674
 
675
675
  上述示例表示先禁用所有模型,再启用 `flux-pro-1.1` 和 `flux-kontext-pro`(显示名为 `FLUX.1 Kontext [pro]`)。
676
676
 
677
+ ## NewAPI
678
+
679
+ ### `NEWAPI_API_KEY`
680
+
681
+ - 类型:可选
682
+ - 描述:这是你的 NewAPI 服务实例的 API 密钥。NewAPI 是一个多供应商模型聚合服务,提供对各种 AI 模型 API 的统一访问。
683
+ - 默认值:-
684
+ - 示例:`sk-xxxxxx...xxxxxx`
685
+
686
+ ### `NEWAPI_PROXY_URL`
687
+
688
+ - 类型:可选
689
+ - 描述:你的 NewAPI 服务器实例的基础 URL。这应该指向你部署的 NewAPI 服务端点。
690
+ - 默认值:-
691
+ - 示例:`https://your-newapi-server.com`
692
+
693
+ <Callout type={'info'}>
694
+ NewAPI 是一个多供应商模型聚合服务,支持基于供应商检测的自动模型路由。它提供成本管理功能,并为访问包括 OpenAI、Anthropic、Google 等多个供应商的模型提供单一端点。了解更多关于 NewAPI 的信息请访问 [https://github.com/Calcium-Ion/new-api](https://github.com/Calcium-Ion/new-api)。
695
+ </Callout>
696
+
677
697
  [model-list]: /zh/docs/self-hosting/advanced/model-list
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "إضافة رسالة AI",
72
72
  "addUser": "إضافة رسالة مستخدم",
73
+ "disclaimer": "قد يرتكب الذكاء الاصطناعي أخطاءً أيضًا، يرجى التحقق من المعلومات الهامة",
74
+ "errorMsg": "فشل إرسال الرسالة، يرجى التحقق من الشبكة والمحاولة مرة أخرى: {{errorMsg}}",
73
75
  "more": "المزيد",
74
76
  "send": "إرسال",
75
77
  "sendWithCmdEnter": "اضغط <key/> للإرسال",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Добави AI съобщение",
72
72
  "addUser": "Добави потребителско съобщение",
73
+ "disclaimer": "Изкуственият интелект също може да греши, моля проверете важната информация",
74
+ "errorMsg": "Неуспешно изпращане на съобщението, моля, проверете мрежата и опитайте отново: {{errorMsg}}",
73
75
  "more": "още",
74
76
  "send": "Изпрати",
75
77
  "sendWithCmdEnter": "Натиснете <key/> за изпращане",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Fügen Sie eine AI-Nachricht hinzu",
72
72
  "addUser": "Fügen Sie eine Benutzer-Nachricht hinzu",
73
+ "disclaimer": "KI kann auch Fehler machen, bitte überprüfen Sie wichtige Informationen",
74
+ "errorMsg": "Nachricht konnte nicht gesendet werden, bitte überprüfen Sie Ihre Netzwerkverbindung und versuchen Sie es erneut: {{errorMsg}}",
73
75
  "more": "Mehr",
74
76
  "send": "Senden",
75
77
  "sendWithCmdEnter": "Drücken Sie <key/>, um zu senden",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Add an AI message",
72
72
  "addUser": "Add a user message",
73
+ "disclaimer": "AI may also make mistakes, please verify important information",
74
+ "errorMsg": "Message sending failed, please check your network and try again: {{errorMsg}}",
73
75
  "more": "more",
74
76
  "send": "Send",
75
77
  "sendWithCmdEnter": "Press <key/> to send",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Agregar un mensaje de IA",
72
72
  "addUser": "Agregar un mensaje de usuario",
73
+ "disclaimer": "La IA también puede cometer errores, por favor verifique la información importante",
74
+ "errorMsg": "Error al enviar el mensaje, por favor revise la conexión y vuelva a intentarlo: {{errorMsg}}",
73
75
  "more": "más",
74
76
  "send": "Enviar",
75
77
  "sendWithCmdEnter": "Presiona <key/> para enviar",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "افزودن یک پیام AI",
72
72
  "addUser": "افزودن یک پیام کاربر",
73
+ "disclaimer": "هوش مصنوعی نیز ممکن است اشتباه کند، لطفاً اطلاعات مهم را بررسی کنید",
74
+ "errorMsg": "ارسال پیام ناموفق بود، لطفاً پس از بررسی شبکه دوباره تلاش کنید: {{errorMsg}}",
73
75
  "more": "بیشتر",
74
76
  "send": "ارسال",
75
77
  "sendWithCmdEnter": "برای ارسال، کلید <key/> را فشار دهید",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Ajouter un message AI",
72
72
  "addUser": "Ajouter un message utilisateur",
73
+ "disclaimer": "L'IA peut également faire des erreurs, veuillez vérifier les informations importantes",
74
+ "errorMsg": "Échec de l'envoi du message, veuillez vérifier votre connexion réseau et réessayer : {{errorMsg}}",
73
75
  "more": "Plus",
74
76
  "send": "Envoyer",
75
77
  "sendWithCmdEnter": "Appuyez sur <key/> pour envoyer",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Aggiungi un messaggio AI",
72
72
  "addUser": "Aggiungi un messaggio utente",
73
+ "disclaimer": "L'IA può anche commettere errori, si prega di verificare le informazioni importanti",
74
+ "errorMsg": "Invio del messaggio fallito, controlla la rete e riprova: {{errorMsg}}",
73
75
  "more": "Ulteriori",
74
76
  "send": "Invia",
75
77
  "sendWithCmdEnter": "Premi <key/> per inviare",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "AIメッセージを追加",
72
72
  "addUser": "ユーザーメッセージを追加",
73
+ "disclaimer": "AIも誤りを犯すことがありますので、重要な情報はご確認ください",
74
+ "errorMsg": "メッセージの送信に失敗しました。ネットワークを確認してから再試行してください: {{errorMsg}}",
73
75
  "more": "もっと",
74
76
  "send": "送信",
75
77
  "sendWithCmdEnter": "<key/> キーを押して送信",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "AI 메시지 추가",
72
72
  "addUser": "사용자 메시지 추가",
73
+ "disclaimer": "AI도 실수를 할 수 있으니 중요한 정보는 꼭 확인하세요",
74
+ "errorMsg": "메시지 전송에 실패했습니다. 네트워크를 확인한 후 다시 시도해 주세요: {{errorMsg}}",
73
75
  "more": "더 많은",
74
76
  "send": "전송",
75
77
  "sendWithCmdEnter": "<key/> 키를 눌러 전송",
@@ -70,6 +70,8 @@
70
70
  "input": {
71
71
  "addAi": "Voeg een AI-bericht toe",
72
72
  "addUser": "Voeg een gebruikersbericht toe",
73
+ "disclaimer": "AI kan ook fouten maken, controleer belangrijke informatie alstublieft",
74
+ "errorMsg": "Bericht verzenden mislukt, controleer uw netwerk en probeer het opnieuw: {{errorMsg}}",
73
75
  "more": "Meer",
74
76
  "send": "Verzenden",
75
77
  "sendWithCmdEnter": "Druk op <key/> om te verzenden",