@lobehub/chat 1.118.4 → 1.118.6

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 (165) hide show
  1. package/.github/workflows/test.yml +36 -1
  2. package/CHANGELOG.md +59 -0
  3. package/changelog/v1.json +18 -0
  4. package/locales/ar/setting.json +4 -0
  5. package/locales/bg-BG/setting.json +4 -0
  6. package/locales/de-DE/setting.json +4 -0
  7. package/locales/en-US/setting.json +4 -0
  8. package/locales/es-ES/setting.json +4 -0
  9. package/locales/fa-IR/setting.json +4 -0
  10. package/locales/fr-FR/setting.json +4 -0
  11. package/locales/it-IT/setting.json +4 -0
  12. package/locales/ja-JP/setting.json +4 -0
  13. package/locales/ko-KR/setting.json +4 -0
  14. package/locales/nl-NL/setting.json +4 -0
  15. package/locales/pl-PL/setting.json +4 -0
  16. package/locales/pt-BR/setting.json +4 -0
  17. package/locales/ru-RU/setting.json +4 -0
  18. package/locales/tr-TR/setting.json +4 -0
  19. package/locales/vi-VN/setting.json +4 -0
  20. package/locales/zh-CN/setting.json +4 -0
  21. package/locales/zh-TW/setting.json +4 -0
  22. package/package.json +2 -1
  23. package/packages/const/package.json +4 -1
  24. package/packages/const/src/image.ts +1 -1
  25. package/packages/const/src/settings/agent.ts +1 -0
  26. package/packages/database/src/repositories/aiInfra/index.ts +7 -2
  27. package/packages/model-bank/package.json +75 -0
  28. package/{src/config → packages/model-bank/src}/aiModels/bfl.ts +1 -1
  29. package/{src/config → packages/model-bank/src}/aiModels/fal.ts +1 -1
  30. package/{src/config → packages/model-bank/src}/aiModels/google.ts +1 -1
  31. package/{src/config → packages/model-bank/src}/aiModels/index.ts +2 -2
  32. package/{src/config → packages/model-bank/src}/aiModels/openai.ts +1 -1
  33. package/packages/model-bank/src/exports.test.ts +37 -0
  34. package/packages/model-bank/src/index.ts +2 -0
  35. package/{src/libs → packages/model-bank/src}/standard-parameters/index.ts +1 -1
  36. package/packages/model-bank/vitest.config.mts +11 -0
  37. package/packages/model-runtime/package.json +1 -0
  38. package/packages/model-runtime/src/ai360/index.ts +1 -1
  39. package/packages/model-runtime/src/aihubmix/index.ts +1 -1
  40. package/packages/model-runtime/src/anthropic/index.ts +6 -6
  41. package/packages/model-runtime/src/baichuan/index.ts +1 -1
  42. package/packages/model-runtime/src/bfl/createImage.ts +1 -2
  43. package/packages/model-runtime/src/cloudflare/index.ts +1 -1
  44. package/packages/model-runtime/src/cohere/index.ts +1 -1
  45. package/packages/model-runtime/src/deepseek/index.ts +1 -1
  46. package/packages/model-runtime/src/fal/index.ts +1 -2
  47. package/packages/model-runtime/src/fireworksai/index.ts +1 -1
  48. package/packages/model-runtime/src/groq/index.ts +1 -1
  49. package/packages/model-runtime/src/higress/index.ts +1 -1
  50. package/packages/model-runtime/src/huggingface/index.ts +1 -1
  51. package/packages/model-runtime/src/hunyuan/index.ts +1 -1
  52. package/packages/model-runtime/src/infiniai/index.ts +1 -1
  53. package/packages/model-runtime/src/internlm/index.ts +1 -1
  54. package/packages/model-runtime/src/jina/index.ts +1 -1
  55. package/packages/model-runtime/src/lmstudio/index.ts +1 -1
  56. package/packages/model-runtime/src/minimax/index.ts +1 -1
  57. package/packages/model-runtime/src/mistral/index.ts +1 -1
  58. package/packages/model-runtime/src/novita/__snapshots__/index.test.ts.snap +309 -21
  59. package/packages/model-runtime/src/novita/index.ts +31 -1
  60. package/packages/model-runtime/src/ollama/index.ts +1 -1
  61. package/packages/model-runtime/src/openai/__snapshots__/index.test.ts.snap +28 -0
  62. package/packages/model-runtime/src/openai/index.test.ts +0 -3
  63. package/packages/model-runtime/src/openrouter/__snapshots__/index.test.ts.snap +46 -0
  64. package/packages/model-runtime/src/openrouter/index.test.ts +21 -45
  65. package/packages/model-runtime/src/openrouter/index.ts +22 -25
  66. package/packages/model-runtime/src/openrouter/type.ts +12 -24
  67. package/packages/model-runtime/src/ppio/index.ts +1 -1
  68. package/packages/model-runtime/src/search1api/index.ts +1 -1
  69. package/packages/model-runtime/src/sensenova/index.ts +1 -1
  70. package/packages/model-runtime/src/stepfun/index.ts +1 -1
  71. package/packages/model-runtime/src/tencentcloud/index.ts +1 -1
  72. package/packages/model-runtime/src/togetherai/index.ts +1 -1
  73. package/packages/model-runtime/src/types/image.ts +1 -1
  74. package/packages/model-runtime/src/utils/modelParse.test.ts +5 -5
  75. package/packages/model-runtime/src/utils/modelParse.ts +47 -22
  76. package/packages/model-runtime/src/utils/openaiCompatibleFactory/createImage.ts +1 -2
  77. package/packages/model-runtime/src/utils/openaiCompatibleFactory/index.ts +1 -1
  78. package/packages/model-runtime/src/vllm/index.ts +1 -1
  79. package/packages/model-runtime/src/xinference/index.ts +1 -1
  80. package/packages/types/src/agent/chatConfig.ts +6 -0
  81. package/packages/types/src/aiModel.ts +1 -2
  82. package/packages/types/src/llm.ts +1 -1
  83. package/packages/utils/src/getFallbackModelProperty.test.ts +1 -1
  84. package/packages/utils/src/getFallbackModelProperty.ts +1 -1
  85. package/packages/utils/src/parseModels.test.ts +1 -2
  86. package/packages/utils/src/parseModels.ts +1 -1
  87. package/src/app/[variants]/(main)/image/features/GenerationFeed/BatchItem.tsx +1 -1
  88. package/src/app/[variants]/(main)/profile/features/ClerkProfile.tsx +1 -1
  89. package/src/app/[variants]/(main)/settings/_layout/Desktop/index.tsx +1 -5
  90. package/src/features/AgentSetting/AgentModal/index.tsx +9 -0
  91. package/src/locales/default/models.ts +1 -1
  92. package/src/locales/default/setting.ts +4 -0
  93. package/src/server/globalConfig/genServerAiProviderConfig.test.ts +3 -3
  94. package/src/server/globalConfig/genServerAiProviderConfig.ts +1 -1
  95. package/src/server/routers/async/image.ts +1 -1
  96. package/src/server/services/discover/index.test.ts +1 -1
  97. package/src/server/services/discover/index.ts +16 -8
  98. package/src/services/chat.ts +8 -1
  99. package/src/store/agent/slices/chat/selectors/__snapshots__/agent.test.ts.snap +1 -0
  100. package/src/store/aiInfra/slices/aiProvider/action.ts +1 -1
  101. package/src/store/image/slices/generationConfig/action.test.ts +2 -6
  102. package/src/store/image/slices/generationConfig/action.ts +3 -3
  103. package/src/store/image/slices/generationConfig/hooks.test.ts +2 -2
  104. package/src/store/image/slices/generationConfig/hooks.ts +1 -1
  105. package/src/store/image/slices/generationConfig/initialState.ts +2 -3
  106. package/src/store/image/slices/generationConfig/selectors.test.ts +1 -2
  107. package/src/store/image/slices/generationConfig/selectors.ts +1 -1
  108. package/src/store/user/slices/settings/selectors/__snapshots__/settings.test.ts.snap +2 -0
  109. /package/{src/config → packages/model-bank/src}/aiModels/ai21.ts +0 -0
  110. /package/{src/config → packages/model-bank/src}/aiModels/ai302.ts +0 -0
  111. /package/{src/config → packages/model-bank/src}/aiModels/ai360.ts +0 -0
  112. /package/{src/config → packages/model-bank/src}/aiModels/aihubmix.ts +0 -0
  113. /package/{src/config → packages/model-bank/src}/aiModels/akashchat.ts +0 -0
  114. /package/{src/config → packages/model-bank/src}/aiModels/anthropic.ts +0 -0
  115. /package/{src/config → packages/model-bank/src}/aiModels/azure.ts +0 -0
  116. /package/{src/config → packages/model-bank/src}/aiModels/azureai.ts +0 -0
  117. /package/{src/config → packages/model-bank/src}/aiModels/baichuan.ts +0 -0
  118. /package/{src/config → packages/model-bank/src}/aiModels/bedrock.ts +0 -0
  119. /package/{src/config → packages/model-bank/src}/aiModels/cloudflare.ts +0 -0
  120. /package/{src/config → packages/model-bank/src}/aiModels/cohere.ts +0 -0
  121. /package/{src/config → packages/model-bank/src}/aiModels/deepseek.ts +0 -0
  122. /package/{src/config → packages/model-bank/src}/aiModels/fireworksai.ts +0 -0
  123. /package/{src/config → packages/model-bank/src}/aiModels/giteeai.ts +0 -0
  124. /package/{src/config → packages/model-bank/src}/aiModels/github.ts +0 -0
  125. /package/{src/config → packages/model-bank/src}/aiModels/groq.ts +0 -0
  126. /package/{src/config → packages/model-bank/src}/aiModels/higress.ts +0 -0
  127. /package/{src/config → packages/model-bank/src}/aiModels/huggingface.ts +0 -0
  128. /package/{src/config → packages/model-bank/src}/aiModels/hunyuan.ts +0 -0
  129. /package/{src/config → packages/model-bank/src}/aiModels/infiniai.ts +0 -0
  130. /package/{src/config → packages/model-bank/src}/aiModels/internlm.ts +0 -0
  131. /package/{src/config → packages/model-bank/src}/aiModels/jina.ts +0 -0
  132. /package/{src/config → packages/model-bank/src}/aiModels/lmstudio.ts +0 -0
  133. /package/{src/config → packages/model-bank/src}/aiModels/lobehub.ts +0 -0
  134. /package/{src/config → packages/model-bank/src}/aiModels/minimax.ts +0 -0
  135. /package/{src/config → packages/model-bank/src}/aiModels/mistral.ts +0 -0
  136. /package/{src/config → packages/model-bank/src}/aiModels/modelscope.ts +0 -0
  137. /package/{src/config → packages/model-bank/src}/aiModels/moonshot.ts +0 -0
  138. /package/{src/config → packages/model-bank/src}/aiModels/novita.ts +0 -0
  139. /package/{src/config → packages/model-bank/src}/aiModels/nvidia.ts +0 -0
  140. /package/{src/config → packages/model-bank/src}/aiModels/ollama.ts +0 -0
  141. /package/{src/config → packages/model-bank/src}/aiModels/openrouter.ts +0 -0
  142. /package/{src/config → packages/model-bank/src}/aiModels/perplexity.ts +0 -0
  143. /package/{src/config → packages/model-bank/src}/aiModels/ppio.ts +0 -0
  144. /package/{src/config → packages/model-bank/src}/aiModels/qiniu.ts +0 -0
  145. /package/{src/config → packages/model-bank/src}/aiModels/qwen.ts +0 -0
  146. /package/{src/config → packages/model-bank/src}/aiModels/sambanova.ts +0 -0
  147. /package/{src/config → packages/model-bank/src}/aiModels/search1api.ts +0 -0
  148. /package/{src/config → packages/model-bank/src}/aiModels/sensenova.ts +0 -0
  149. /package/{src/config → packages/model-bank/src}/aiModels/siliconcloud.ts +0 -0
  150. /package/{src/config → packages/model-bank/src}/aiModels/spark.ts +0 -0
  151. /package/{src/config → packages/model-bank/src}/aiModels/stepfun.ts +0 -0
  152. /package/{src/config → packages/model-bank/src}/aiModels/taichu.ts +0 -0
  153. /package/{src/config → packages/model-bank/src}/aiModels/tencentcloud.ts +0 -0
  154. /package/{src/config → packages/model-bank/src}/aiModels/togetherai.ts +0 -0
  155. /package/{src/config → packages/model-bank/src}/aiModels/upstage.ts +0 -0
  156. /package/{src/config → packages/model-bank/src}/aiModels/v0.ts +0 -0
  157. /package/{src/config → packages/model-bank/src}/aiModels/vertexai.ts +0 -0
  158. /package/{src/config → packages/model-bank/src}/aiModels/vllm.ts +0 -0
  159. /package/{src/config → packages/model-bank/src}/aiModels/volcengine.ts +0 -0
  160. /package/{src/config → packages/model-bank/src}/aiModels/wenxin.ts +0 -0
  161. /package/{src/config → packages/model-bank/src}/aiModels/xai.ts +0 -0
  162. /package/{src/config → packages/model-bank/src}/aiModels/xinference.ts +0 -0
  163. /package/{src/config → packages/model-bank/src}/aiModels/zeroone.ts +0 -0
  164. /package/{src/config → packages/model-bank/src}/aiModels/zhipu.ts +0 -0
  165. /package/{src/libs → packages/model-bank/src}/standard-parameters/index.test.ts +0 -0
@@ -7,7 +7,7 @@ permissions:
7
7
 
8
8
  jobs:
9
9
  # Package tests - using each package's own test script
10
- test-packages:
10
+ test-intenral-packages:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
@@ -41,6 +41,41 @@ jobs:
41
41
  files: ./packages/${{ matrix.package }}/coverage/lcov.info
42
42
  flags: packages/${{ matrix.package }}
43
43
 
44
+ test-packages:
45
+ runs-on: ubuntu-latest
46
+ strategy:
47
+ matrix:
48
+ package: [model-bank]
49
+
50
+ name: Test package ${{ matrix.package }}
51
+
52
+ steps:
53
+ - uses: actions/checkout@v5
54
+
55
+ - name: Setup Node.js
56
+ uses: actions/setup-node@v4
57
+ with:
58
+ node-version: 22
59
+
60
+ - name: Install bun
61
+ uses: oven-sh/setup-bun@v1
62
+ with:
63
+ bun-version: ${{ secrets.BUN_VERSION }}
64
+
65
+ - name: Install deps
66
+ run: bun i
67
+
68
+ - name: Test ${{ matrix.package }} package with coverage
69
+ run: bun run --filter ${{ matrix.package }} test:coverage
70
+
71
+ - name: Upload ${{ matrix.package }} coverage to Codecov
72
+ uses: codecov/codecov-action@v4
73
+ with:
74
+ token: ${{ secrets.CODECOV_TOKEN }}
75
+ files: ./packages/${{ matrix.package }}/coverage/lcov.info
76
+ flags: packages/${{ matrix.package }}
77
+
78
+
44
79
  # App tests
45
80
  test-website:
46
81
  name: Test Website
package/CHANGELOG.md CHANGED
@@ -2,6 +2,65 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.118.6](https://github.com/lobehub/lobe-chat/compare/v1.118.5...v1.118.6)
6
+
7
+ <sup>Released on **2025-08-29**</sup>
8
+
9
+ #### 💄 Styles
10
+
11
+ - **misc**: Support non-stream mode.
12
+
13
+ <br/>
14
+
15
+ <details>
16
+ <summary><kbd>Improvements and Fixes</kbd></summary>
17
+
18
+ #### Styles
19
+
20
+ - **misc**: Support non-stream mode, closes [#8751](https://github.com/lobehub/lobe-chat/issues/8751) ([ce623bb](https://github.com/lobehub/lobe-chat/commit/ce623bb))
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.118.5](https://github.com/lobehub/lobe-chat/compare/v1.118.4...v1.118.5)
31
+
32
+ <sup>Released on **2025-08-29**</sup>
33
+
34
+ #### ♻ Code Refactoring
35
+
36
+ - **misc**: Refactor the `model-bank` package from `src/config/aiModels`.
37
+
38
+ #### 💄 Styles
39
+
40
+ - **misc**: Fix clerk scrollBox style, ModelFetcher support getting prices.
41
+
42
+ <br/>
43
+
44
+ <details>
45
+ <summary><kbd>Improvements and Fixes</kbd></summary>
46
+
47
+ #### Code refactoring
48
+
49
+ - **misc**: Refactor the `model-bank` package from `src/config/aiModels`, closes [#8983](https://github.com/lobehub/lobe-chat/issues/8983) ([c65eb09](https://github.com/lobehub/lobe-chat/commit/c65eb09))
50
+
51
+ #### Styles
52
+
53
+ - **misc**: Fix clerk scrollBox style, closes [#8989](https://github.com/lobehub/lobe-chat/issues/8989) ([b25b5a0](https://github.com/lobehub/lobe-chat/commit/b25b5a0))
54
+ - **misc**: ModelFetcher support getting prices, closes [#8985](https://github.com/lobehub/lobe-chat/issues/8985) ([58b73ec](https://github.com/lobehub/lobe-chat/commit/58b73ec))
55
+
56
+ </details>
57
+
58
+ <div align="right">
59
+
60
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
61
+
62
+ </div>
63
+
5
64
  ### [Version 1.118.4](https://github.com/lobehub/lobe-chat/compare/v1.118.3...v1.118.4)
6
65
 
7
66
  <sup>Released on **2025-08-29**</sup>
package/changelog/v1.json CHANGED
@@ -1,4 +1,22 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Support non-stream mode."
6
+ ]
7
+ },
8
+ "date": "2025-08-29",
9
+ "version": "1.118.6"
10
+ },
11
+ {
12
+ "children": {
13
+ "improvements": [
14
+ "Fix clerk scrollBox style, ModelFetcher support getting prices."
15
+ ]
16
+ },
17
+ "date": "2025-08-29",
18
+ "version": "1.118.5"
19
+ },
2
20
  {
3
21
  "children": {
4
22
  "improvements": [
@@ -237,6 +237,10 @@
237
237
  "title": "تحديد عدد الرسائل التاريخية",
238
238
  "unlimited": "غير محدود"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "تمكين الإخراج المتدفق لعرض الاستجابات في الوقت الفعلي. عند التعطيل، يتم عرض الاستجابة الكاملة فقط.",
242
+ "title": "تمكين الإخراج المتدفق"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "عدد الرسائل التي يتم إرفاقها في كل طلب (تشمل الأسئلة والأجوبة الجديدة. يُحسب كل سؤال وجواب كرسالة واحدة)",
242
246
  "title": "عدد الرسائل المرفقة"
@@ -237,6 +237,10 @@
237
237
  "title": "Ограничаване на броя на съобщенията в историята",
238
238
  "unlimited": "Неограничен брой съобщения в историята"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Активирайте поточно предаване, за да показвате отговорите в реално време. Ако е деактивирано, ще се показва само пълният отговор.",
242
+ "title": "Активиране на поточно предаване"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Брой исторически съобщения, носени с всяка заявка",
242
246
  "title": "Брой прикачени съобщения в историята"
@@ -237,6 +237,10 @@
237
237
  "title": "Historiennachrichten begrenzen",
238
238
  "unlimited": "Unbegrenzte Historiennachrichten"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Aktivieren Sie den Streaming-Ausgang, um Antworten in Echtzeit anzuzeigen. Wenn deaktiviert, wird nur die vollständige Antwort angezeigt.",
242
+ "title": "Streaming-Ausgabe aktivieren"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Anzahl der Nachrichten pro Anfrage (einschließlich der neuesten Fragen und Antworten. Jede Frage und Antwort zählt als 1)",
242
246
  "title": "Anzahl der mitgelieferten Nachrichten"
@@ -237,6 +237,10 @@
237
237
  "title": "Limit History Message Count",
238
238
  "unlimited": "Unlimited history message count"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Enable streaming output to display responses in real-time. When disabled, only the complete response is shown.",
242
+ "title": "Enable Streaming Output"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Number of historical messages carried with each request",
242
246
  "title": "Attached History Message Count"
@@ -237,6 +237,10 @@
237
237
  "title": "Limitar número de mensajes históricos",
238
238
  "unlimited": "Sin límite de mensajes históricos"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Habilita la salida en streaming para mostrar la respuesta en tiempo real. Si se desactiva, solo se mostrará la respuesta completa.",
242
+ "title": "Habilitar salida en streaming"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Número de mensajes incluidos en cada solicitud (incluyendo las preguntas más recientes. Cada pregunta y respuesta se cuenta como 1)",
242
246
  "title": "Número de mensajes incluidos"
@@ -237,6 +237,10 @@
237
237
  "title": "محدودیت تعداد پیام‌های تاریخی",
238
238
  "unlimited": "بدون محدودیت در تعداد پیام‌های تاریخی"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "فعال‌سازی خروجی جریانی برای نمایش پاسخ‌ها به‌صورت زنده. در صورت غیرفعال بودن، فقط پاسخ کامل نمایش داده می‌شود.",
242
+ "title": "فعال‌سازی خروجی جریانی"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "تعداد پیام‌هایی که در هر درخواست ارسال می‌شوند (شامل آخرین سوال نوشته‌شده. هر سوال و پاسخ به‌عنوان 1 محاسبه می‌شود)",
242
246
  "title": "تعداد پیام‌های همراه"
@@ -237,6 +237,10 @@
237
237
  "title": "Limite du nombre de messages historiques",
238
238
  "unlimited": "Aucune limite sur le nombre de messages historiques"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Activez la diffusion en continu pour afficher les réponses en temps réel. Si désactivé, seule la réponse complète sera affichée.",
242
+ "title": "Activer la diffusion en continu"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Nombre de messages historiques à inclure dans chaque requête",
242
246
  "title": "Nombre de messages historiques inclus"
@@ -237,6 +237,10 @@
237
237
  "title": "Limita il numero di messaggi storici",
238
238
  "unlimited": "Numero illimitato di messaggi storici"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Abilita l'output in streaming per visualizzare la risposta in tempo reale. Se disabilitato, verrà mostrata solo la risposta completa.",
242
+ "title": "Abilita output in streaming"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Numero di messaggi inclusi in ogni richiesta (inclusi gli ultimi messaggi scritti, ogni domanda e risposta conta come 1)",
242
246
  "title": "Numero di messaggi inclusi"
@@ -237,6 +237,10 @@
237
237
  "title": "過去メッセージ数を制限する",
238
238
  "unlimited": "過去メッセージ数を制限しない"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "リアルタイムで応答を表示するためにストリーミング出力を有効にします。無効にすると、完全な応答のみが表示されます。",
242
+ "title": "ストリーミング出力を有効にする"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "リクエストごとに含まれる過去メッセージの数",
242
246
  "title": "過去メッセージ数"
@@ -237,6 +237,10 @@
237
237
  "title": "이전 메시지 수 제한",
238
238
  "unlimited": "이전 메시지 수 제한 없음"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "실시간으로 응답을 표시하려면 스트리밍 출력을 활성화하세요. 비활성화하면 전체 응답만 표시됩니다.",
242
+ "title": "스트리밍 출력 활성화"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "요청당 포함되는 이전 메시지 수",
242
246
  "title": "이전 메시지 수"
@@ -237,6 +237,10 @@
237
237
  "title": "Berichtgeschiedenis beperken",
238
238
  "unlimited": "Onbeperkt aantal berichten in de geschiedenis"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Schakel streaming-uitvoer in om reacties in realtime weer te geven. Als dit is uitgeschakeld, wordt alleen de volledige reactie weergegeven.",
242
+ "title": "Streaming-uitvoer inschakelen"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Aantal berichten dat bij elke aanvraag wordt meegenomen (inclusief de meest recente vraag. Elke vraag en antwoord tellen als 1)",
242
246
  "title": "Berichtaantal meenemen"
@@ -237,6 +237,10 @@
237
237
  "title": "Ograniczenie liczby wiadomości w historii",
238
238
  "unlimited": "Bez limitu wiadomości w historii"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Włącz strumieniowe wyświetlanie odpowiedzi w czasie rzeczywistym. Po wyłączeniu wyświetlana jest tylko pełna odpowiedź.",
242
+ "title": "Włącz strumieniowe wyświetlanie"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Liczba wiadomości przesyłanych w jednym żądaniu (obejmuje najnowsze pytania i odpowiedzi, gdzie każde pytanie i odpowiedź liczy się jako 1)",
242
246
  "title": "Liczba wiadomości"
@@ -237,6 +237,10 @@
237
237
  "title": "Limitar número de mensagens de histórico",
238
238
  "unlimited": "Sem limite de mensagens de histórico"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Ative a saída em fluxo para exibir respostas em tempo real. Quando desativado, apenas a resposta completa será exibida.",
242
+ "title": "Ativar saída em fluxo"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Número de mensagens incluídas em cada solicitação (incluindo a última pergunta feita. Cada pergunta e resposta contam como 1)",
242
246
  "title": "Número de mensagens incluídas"
@@ -237,6 +237,10 @@
237
237
  "title": "Ограничение истории сообщений",
238
238
  "unlimited": "Без ограничения истории сообщений"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Включите потоковую передачу для отображения ответа в реальном времени. Если отключено, будет показан только полный ответ.",
242
+ "title": "Включить потоковую передачу"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Количество сообщений, передаваемых с каждым запросом",
242
246
  "title": "Количество сообщений в истории"
@@ -237,6 +237,10 @@
237
237
  "title": "Geçmiş Mesaj Sayısı Sınırlama",
238
238
  "unlimited": "Sınırsız geçmiş mesaj sayısı"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Yanıtları gerçek zamanlı göstermek için akışlı çıktıyı etkinleştirin. Devre dışı bırakıldığında yalnızca tam yanıt gösterilir.",
242
+ "title": "Akışlı Çıktıyı Etkinleştir"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Her istekle taşınan tarihsel mesaj sayısı",
242
246
  "title": "Eklenen Geçmiş Mesaj Sayısı"
@@ -237,6 +237,10 @@
237
237
  "title": "Giới hạn số lượng tin nhắn lịch sử",
238
238
  "unlimited": "Không giới hạn số lượng tin nhắn lịch sử"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "Bật phát trực tiếp để hiển thị phản hồi theo thời gian thực. Tắt sẽ chỉ hiển thị phản hồi đầy đủ.",
242
+ "title": "Bật phát trực tiếp"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "Số lượng tin nhắn được gửi mỗi lần yêu cầu (bao gồm cả câu hỏi mới nhất. Mỗi câu hỏi và câu trả lời đều tính là 1)",
242
246
  "title": "Số lượng tin nhắn đi kèm"
@@ -237,6 +237,10 @@
237
237
  "title": "限制历史消息数",
238
238
  "unlimited": "不限历史消息数"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "启用流式输出以实时显示响应。禁用后仅显示完整响应。",
242
+ "title": "启用流式输出"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "每次请求携带的消息数(包括最新编写的提问。每个提问和回答都计算1)",
242
246
  "title": "附带消息数"
@@ -237,6 +237,10 @@
237
237
  "title": "限制歷史訊息數",
238
238
  "unlimited": "不限歷史訊息數"
239
239
  },
240
+ "enableStreaming": {
241
+ "desc": "啟用串流輸出以即時顯示回應。停用後僅顯示完整回應。",
242
+ "title": "啟用串流輸出"
243
+ },
240
244
  "historyCount": {
241
245
  "desc": "每次請求攜帶的歷史訊息數",
242
246
  "title": "附帶歷史訊息數"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.118.4",
3
+ "version": "1.118.6",
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",
@@ -210,6 +210,7 @@
210
210
  "mammoth": "^1.10.0",
211
211
  "markdown-to-txt": "^2.0.1",
212
212
  "mdast-util-to-markdown": "^2.1.2",
213
+ "model-bank": "workspace:*",
213
214
  "modern-screenshot": "^4.6.5",
214
215
  "nanoid": "^5.1.5",
215
216
  "next": "~15.3.5",
@@ -2,5 +2,8 @@
2
2
  "name": "@lobechat/const",
3
3
  "version": "1.0.0",
4
4
  "private": true,
5
- "main": "./src/index.ts"
5
+ "main": "./src/index.ts",
6
+ "dependencies": {
7
+ "model-bank": "workspace:*"
8
+ }
6
9
  }
@@ -1,4 +1,4 @@
1
- import { ModelParamsSchema } from '@/libs/standard-parameters';
1
+ import { ModelParamsSchema } from 'model-bank';
2
2
 
3
3
  /**
4
4
  * 默认宽高比,当模型不支持原生宽高比时使用
@@ -29,6 +29,7 @@ export const DEFAULT_AGENT_CHAT_CONFIG: LobeAgentChatConfig = {
29
29
  enableCompressHistory: true,
30
30
  enableHistoryCount: true,
31
31
  enableReasoning: false,
32
+ enableStreaming: true,
32
33
  historyCount: 20,
33
34
  reasoningBudgetToken: 1024,
34
35
  searchFCModel: DEFAULT_AGENT_SEARCH_FC_MODEL,
@@ -201,7 +201,11 @@ export class AiInfraRepos {
201
201
  providerId: string,
202
202
  ): Promise<AiProviderModelListItem[] | undefined> => {
203
203
  try {
204
- const { default: providerModels } = await import(`@/config/aiModels/${providerId}.ts`);
204
+ const modules = await import('model-bank');
205
+
206
+ // TODO: when model-bank is a separate module, we will try import from model-bank/[prividerId] again
207
+ // @ts-expect-error providerId is string
208
+ const providerModels = modules[providerId];
205
209
 
206
210
  // use the serverModelLists as the defined server model list
207
211
  const presetList = this.providerConfigs[providerId]?.serverModelLists || providerModels;
@@ -210,7 +214,8 @@ export class AiInfraRepos {
210
214
  enabled: m.enabled || false,
211
215
  source: AiModelSourceEnum.Builtin,
212
216
  }));
213
- } catch {
217
+ } catch (error) {
218
+ console.error(error);
214
219
  // maybe provider id not exist
215
220
  }
216
221
  };
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "model-bank",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "exports": {
6
+ ".": "./src/index.ts",
7
+ "./ai21": "./src/aiModels/ai21.ts",
8
+ "./ai302": "./src/aiModels/ai302.ts",
9
+ "./ai360": "./src/aiModels/ai360.ts",
10
+ "./aihubmix": "./src/aiModels/aihubmix.ts",
11
+ "./akashchat": "./src/aiModels/akashchat.ts",
12
+ "./anthropic": "./src/aiModels/anthropic.ts",
13
+ "./azureai": "./src/aiModels/azureai.ts",
14
+ "./azure": "./src/aiModels/azure.ts",
15
+ "./baichuan": "./src/aiModels/baichuan.ts",
16
+ "./bedrock": "./src/aiModels/bedrock.ts",
17
+ "./bfl": "./src/aiModels/bfl.ts",
18
+ "./cloudflare": "./src/aiModels/cloudflare.ts",
19
+ "./cohere": "./src/aiModels/cohere.ts",
20
+ "./deepseek": "./src/aiModels/deepseek.ts",
21
+ "./fal": "./src/aiModels/fal.ts",
22
+ "./fireworksai": "./src/aiModels/fireworksai.ts",
23
+ "./giteeai": "./src/aiModels/giteeai.ts",
24
+ "./github": "./src/aiModels/github.ts",
25
+ "./google": "./src/aiModels/google.ts",
26
+ "./groq": "./src/aiModels/groq.ts",
27
+ "./lobehub": "./src/aiModels/lobehub.ts",
28
+ "./higress": "./src/aiModels/higress.ts",
29
+ "./huggingface": "./src/aiModels/huggingface.ts",
30
+ "./hunyuan": "./src/aiModels/hunyuan.ts",
31
+ "./infiniai": "./src/aiModels/infiniai.ts",
32
+ "./internlm": "./src/aiModels/internlm.ts",
33
+ "./jina": "./src/aiModels/jina.ts",
34
+ "./lmstudio": "./src/aiModels/lmstudio.ts",
35
+ "./minimax": "./src/aiModels/minimax.ts",
36
+ "./mistral": "./src/aiModels/mistral.ts",
37
+ "./modelscope": "./src/aiModels/modelscope.ts",
38
+ "./moonshot": "./src/aiModels/moonshot.ts",
39
+ "./novita": "./src/aiModels/novita.ts",
40
+ "./nvidia": "./src/aiModels/nvidia.ts",
41
+ "./ollama": "./src/aiModels/ollama.ts",
42
+ "./openai": "./src/aiModels/openai.ts",
43
+ "./openrouter": "./src/aiModels/openrouter.ts",
44
+ "./perplexity": "./src/aiModels/perplexity.ts",
45
+ "./ppio": "./src/aiModels/ppio.ts",
46
+ "./qiniu": "./src/aiModels/qiniu.ts",
47
+ "./qwen": "./src/aiModels/qwen.ts",
48
+ "./sambanova": "./src/aiModels/sambanova.ts",
49
+ "./search1api": "./src/aiModels/search1api.ts",
50
+ "./sensenova": "./src/aiModels/sensenova.ts",
51
+ "./siliconcloud": "./src/aiModels/siliconcloud.ts",
52
+ "./spark": "./src/aiModels/spark.ts",
53
+ "./stepfun": "./src/aiModels/stepfun.ts",
54
+ "./taichu": "./src/aiModels/taichu.ts",
55
+ "./tencentcloud": "./src/aiModels/tencentcloud.ts",
56
+ "./togetherai": "./src/aiModels/togetherai.ts",
57
+ "./upstage": "./src/aiModels/upstage.ts",
58
+ "./v0": "./src/aiModels/v0.ts",
59
+ "./vertexai": "./src/aiModels/vertexai.ts",
60
+ "./vllm": "./src/aiModels/vllm.ts",
61
+ "./volcengine": "./src/aiModels/volcengine.ts",
62
+ "./wenxin": "./src/aiModels/wenxin.ts",
63
+ "./xai": "./src/aiModels/xai.ts",
64
+ "./xinference": "./src/aiModels/xinference.ts",
65
+ "./zeroone": "./src/aiModels/zeroone.ts",
66
+ "./zhipu": "./src/aiModels/zhipu.ts"
67
+ },
68
+ "scripts": {
69
+ "test": "vitest",
70
+ "test:coverage": "vitest --coverage"
71
+ },
72
+ "dependencies": {
73
+ "zod": "^3.25.76"
74
+ }
75
+ }
@@ -1,5 +1,5 @@
1
1
  import { PRESET_ASPECT_RATIOS } from '@/const/image';
2
- import { ModelParamsSchema } from '@/libs/standard-parameters';
2
+ import { ModelParamsSchema } from '../standard-parameters';
3
3
  import { AIImageModelCard } from '@/types/aiModel';
4
4
 
5
5
  // https://docs.bfl.ai/api-reference/tasks/edit-or-create-an-image-with-flux-kontext-pro
@@ -1,4 +1,4 @@
1
- import { ModelParamsSchema } from '@/libs/standard-parameters';
1
+ import { ModelParamsSchema } from '../standard-parameters';
2
2
  import { AIImageModelCard } from '@/types/aiModel';
3
3
 
4
4
  export const fluxSchnellParamsSchema: ModelParamsSchema = {
@@ -1,5 +1,5 @@
1
1
  import { CHAT_MODEL_IMAGE_GENERATION_PARAMS } from '@/const/image';
2
- import { ModelParamsSchema } from '@/libs/standard-parameters';
2
+ import { ModelParamsSchema } from '../standard-parameters';
3
3
  import { AIChatModelCard, AIImageModelCard } from '@/types/aiModel';
4
4
 
5
5
  const googleChatModels: AIChatModelCard[] = [
@@ -155,7 +155,7 @@ export { default as bfl } from './bfl';
155
155
  export { default as cloudflare } from './cloudflare';
156
156
  export { default as cohere } from './cohere';
157
157
  export { default as deepseek } from './deepseek';
158
- export { default as fal } from './fal';
158
+ export { default as fal, fluxSchnellParamsSchema } from './fal';
159
159
  export { default as fireworksai } from './fireworksai';
160
160
  export { default as giteeai } from './giteeai';
161
161
  export { default as github } from './github';
@@ -176,7 +176,7 @@ export { default as moonshot } from './moonshot';
176
176
  export { default as novita } from './novita';
177
177
  export { default as nvidia } from './nvidia';
178
178
  export { default as ollama } from './ollama';
179
- export { default as openai } from './openai';
179
+ export { gptImage1ParamsSchema, default as openai, openaiChatModels } from './openai';
180
180
  export { default as openrouter } from './openrouter';
181
181
  export { default as perplexity } from './perplexity';
182
182
  export { default as ppio } from './ppio';
@@ -1,4 +1,4 @@
1
- import { ModelParamsSchema } from '@/libs/standard-parameters';
1
+ import { ModelParamsSchema } from '../standard-parameters';
2
2
  import {
3
3
  AIChatModelCard,
4
4
  AIEmbeddingModelCard,
@@ -0,0 +1,37 @@
1
+ import { readFileSync, readdirSync } from 'node:fs';
2
+ import path from 'node:path';
3
+ import { describe, expect, it } from 'vitest';
4
+
5
+ // 本测试确保 packages/model-bank/package.json 的 exports 覆盖 src/aiModels 下的所有文件
6
+ describe('model-bank package.json exports should cover all aiModels files', () => {
7
+ const packageRoot = path.resolve(__dirname, '..');
8
+ const aiModelsDir = path.resolve(packageRoot, 'src/aiModels');
9
+ const packageJsonPath = path.resolve(packageRoot, 'package.json');
10
+
11
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8')) as {
12
+ exports?: Record<string, string>;
13
+ };
14
+
15
+ const allModelFiles = readdirSync(aiModelsDir)
16
+ .filter((f) => f.endsWith('.ts'))
17
+ .map((f) => f.replace(/\.ts$/, ''))
18
+ // 排除非 provider 文件,如 index、类型声明等
19
+ .filter((name) => !['index'].includes(name));
20
+
21
+ it('every aiModels file should be exported in package.json.exports', () => {
22
+ const exportsMap = packageJson.exports ?? {};
23
+
24
+ const missing = allModelFiles.filter((name) => {
25
+ const key = `./${name}`;
26
+ const expectedPath = `./src/aiModels/${name}.ts`;
27
+ return !(key in exportsMap) || exportsMap[key] !== expectedPath;
28
+ });
29
+
30
+ if (missing.length > 0) {
31
+ // eslint-disable-next-line no-console
32
+ console.error('Missing exports for aiModels files:', missing);
33
+ }
34
+
35
+ expect(missing).toEqual([]);
36
+ });
37
+ });
@@ -0,0 +1,2 @@
1
+ export * from './aiModels';
2
+ export * from './standard-parameters';
@@ -1,7 +1,7 @@
1
1
  import type { Simplify } from 'type-fest';
2
2
  import { z } from 'zod';
3
3
 
4
- import { MAX_SEED } from '@/const/image';
4
+ export const MAX_SEED = 2 ** 31 - 1;
5
5
 
6
6
  // 定义顶层的元规范 - 平铺结构
7
7
  export const ModelParamsMetaSchema = z.object({
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ coverage: {
6
+ all: false,
7
+ reporter: ['text', 'json', 'lcov', 'text-summary'],
8
+ },
9
+ environment: 'happy-dom',
10
+ },
11
+ });
@@ -12,6 +12,7 @@
12
12
  "@lobechat/types": "workspace:*",
13
13
  "@lobechat/utils": "workspace:*",
14
14
  "debug": "^4.4.1",
15
+ "model-bank": "workspace:*",
15
16
  "openai": "^4.104.0"
16
17
  }
17
18
  }
@@ -38,7 +38,7 @@ export const LobeAi360AI = createOpenAICompatibleRuntime({
38
38
  chatCompletion: () => process.env.DEBUG_AI360_CHAT_COMPLETION === '1',
39
39
  },
40
40
  models: async ({ client }) => {
41
- const { LOBE_DEFAULT_MODEL_LIST } = await import('@/config/aiModels');
41
+ const { LOBE_DEFAULT_MODEL_LIST } = await import('model-bank');
42
42
 
43
43
  const reasoningKeywords = ['360gpt2-o1', '360zhinao2-o1'];
44
44