@lobehub/chat 1.54.0 → 1.55.1

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 (38) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/Dockerfile +2 -0
  3. package/Dockerfile.database +2 -0
  4. package/README.ja-JP.md +1 -1
  5. package/README.md +1 -1
  6. package/README.zh-CN.md +1 -1
  7. package/README.zh-TW.md +9 -14
  8. package/changelog/v1.json +21 -0
  9. package/docs/changelog/2024-11-25-november-providers.mdx +1 -1
  10. package/docs/changelog/2024-11-25-november-providers.zh-CN.mdx +1 -1
  11. package/docs/self-hosting/platform/tencentcloud-lighthouse.mdx +33 -0
  12. package/docs/self-hosting/platform/tencentcloud-lighthouse.zh-CN.mdx +33 -0
  13. package/docs/self-hosting/start.zh-CN.mdx +3 -1
  14. package/docs/usage/features/multi-ai-providers.mdx +1 -1
  15. package/docs/usage/features/multi-ai-providers.zh-CN.mdx +1 -1
  16. package/package.json +1 -3
  17. package/src/app/[variants]/(main)/settings/llm/ProviderList/providers.tsx +2 -0
  18. package/src/config/aiModels/index.ts +3 -0
  19. package/src/config/aiModels/openrouter.ts +30 -0
  20. package/src/config/aiModels/vllm.ts +94 -0
  21. package/src/config/llm.ts +6 -0
  22. package/src/config/modelProviders/index.ts +4 -0
  23. package/src/config/modelProviders/openrouter.ts +9 -0
  24. package/src/config/modelProviders/vllm.ts +20 -0
  25. package/src/const/url.ts +1 -1
  26. package/src/libs/agent-runtime/AgentRuntime.test.ts +1 -0
  27. package/src/libs/agent-runtime/AgentRuntime.ts +7 -0
  28. package/src/libs/agent-runtime/azureOpenai/index.test.ts +47 -9
  29. package/src/libs/agent-runtime/azureOpenai/index.ts +35 -28
  30. package/src/libs/agent-runtime/types/type.ts +1 -0
  31. package/src/libs/agent-runtime/utils/streams/index.ts +0 -1
  32. package/src/libs/agent-runtime/vllm/index.ts +44 -0
  33. package/src/server/modules/AgentRuntime/index.test.ts +3 -1
  34. package/src/server/routers/lambda/aiModel.test.ts +240 -0
  35. package/src/store/aiInfra/slices/aiModel/selectors.test.ts +228 -0
  36. package/src/types/user/settings/keyVaults.ts +1 -0
  37. package/src/libs/agent-runtime/utils/streams/azureOpenai.test.ts +0 -536
  38. package/src/libs/agent-runtime/utils/streams/azureOpenai.ts +0 -83
package/CHANGELOG.md CHANGED
@@ -2,6 +2,64 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 1.55.1](https://github.com/lobehub/lobe-chat/compare/v1.55.0...v1.55.1)
6
+
7
+ <sup>Released on **2025-02-15**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **misc**: Fix Azure OpenAI O1 models and refactor the Azure OpenAI implement.
12
+
13
+ #### 💄 Styles
14
+
15
+ - **misc**: Update openrouter model list and descriptions.
16
+
17
+ <br/>
18
+
19
+ <details>
20
+ <summary><kbd>Improvements and Fixes</kbd></summary>
21
+
22
+ #### What's fixed
23
+
24
+ - **misc**: Fix Azure OpenAI O1 models and refactor the Azure OpenAI implement, closes [#6079](https://github.com/lobehub/lobe-chat/issues/6079) ([6a89a8c](https://github.com/lobehub/lobe-chat/commit/6a89a8c))
25
+
26
+ #### Styles
27
+
28
+ - **misc**: Update openrouter model list and descriptions, closes [#6160](https://github.com/lobehub/lobe-chat/issues/6160) ([3ce0485](https://github.com/lobehub/lobe-chat/commit/3ce0485))
29
+
30
+ </details>
31
+
32
+ <div align="right">
33
+
34
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
35
+
36
+ </div>
37
+
38
+ ## [Version 1.55.0](https://github.com/lobehub/lobe-chat/compare/v1.54.0...v1.55.0)
39
+
40
+ <sup>Released on **2025-02-14**</sup>
41
+
42
+ #### ✨ Features
43
+
44
+ - **misc**: Add vLLM provider support.
45
+
46
+ <br/>
47
+
48
+ <details>
49
+ <summary><kbd>Improvements and Fixes</kbd></summary>
50
+
51
+ #### What's improved
52
+
53
+ - **misc**: Add vLLM provider support, closes [#6154](https://github.com/lobehub/lobe-chat/issues/6154) ([1708e32](https://github.com/lobehub/lobe-chat/commit/1708e32))
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.54.0](https://github.com/lobehub/lobe-chat/compare/v1.53.12...v1.54.0)
6
64
 
7
65
  <sup>Released on **2025-02-14**</sup>
package/Dockerfile CHANGED
@@ -217,6 +217,8 @@ ENV \
217
217
  TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
218
218
  # Upstage
219
219
  UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
220
+ # vLLM
221
+ VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
220
222
  # Wenxin
221
223
  WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
222
224
  # xAI
@@ -254,6 +254,8 @@ ENV \
254
254
  TOGETHERAI_API_KEY="" TOGETHERAI_MODEL_LIST="" \
255
255
  # Upstage
256
256
  UPSTAGE_API_KEY="" UPSTAGE_MODEL_LIST="" \
257
+ # vLLM
258
+ VLLM_API_KEY="" VLLM_MODEL_LIST="" VLLM_PROXY_URL="" \
257
259
  # Wenxin
258
260
  WENXIN_API_KEY="" WENXIN_MODEL_LIST="" \
259
261
  # xAI
package/README.ja-JP.md CHANGED
@@ -170,7 +170,7 @@ LobeChat の継続的な開発において、AI 会話サービスを提供す
170
170
 
171
171
  <!-- PROVIDER LIST -->
172
172
 
173
- 同時に、私たちはさらに多くのモデルサービスプロバイダーをサポートする計画を立てており、サービスプロバイダーのライブラリをさらに充実させる予定です。 LobeChat があなたのお気に入りのサービスプロバイダーをサポートすることを希望する場合は、[💬 コミュニティディスカッション](https://github.com/lobehub/lobe-chat/discussions/1284)に参加してください。
173
+ 同時に、私たちはさらに多くのモデルサービスプロバイダーをサポートする計画を立てており、サービスプロバイダーのライブラリをさらに充実させる予定です。 LobeChat があなたのお気に入りのサービスプロバイダーをサポートすることを希望する場合は、[💬 コミュニティディスカッション](https://github.com/lobehub/lobe-chat/discussions/6157)に参加してください。
174
174
 
175
175
  <div align="right">
176
176
 
package/README.md CHANGED
@@ -189,7 +189,7 @@ We have implemented support for the following model service providers:
189
189
 
190
190
  <!-- PROVIDER LIST -->
191
191
 
192
- At the same time, we are also planning to support more model service providers. If you would like LobeChat to support your favorite service provider, feel free to join our [💬 community discussion](https://github.com/lobehub/lobe-chat/discussions/1284).
192
+ At the same time, we are also planning to support more model service providers. If you would like LobeChat to support your favorite service provider, feel free to join our [💬 community discussion](https://github.com/lobehub/lobe-chat/discussions/6157).
193
193
 
194
194
  <div align="right">
195
195
 
package/README.zh-CN.md CHANGED
@@ -189,7 +189,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
189
189
 
190
190
  <!-- PROVIDER LIST -->
191
191
 
192
- 同时,我们也在计划支持更多的模型服务商,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的 [💬 社区讨论](https://github.com/lobehub/lobe-chat/discussions/1284)。
192
+ 同时,我们也在计划支持更多的模型服务商,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的 [💬 社区讨论](https://github.com/lobehub/lobe-chat/discussions/6157)。
193
193
 
194
194
  <div align="right">
195
195
 
package/README.zh-TW.md CHANGED
@@ -4,8 +4,8 @@
4
4
 
5
5
  <h1>Lobe Chat</h1>
6
6
 
7
- 現代風格的開源 ChatGPT/LLMs 使用介面/框架
8
- 支持語音合成、多模態、可擴展的([function call][docs-functionc-call])插件系統
7
+ 現代風格的開源 ChatGPT/LLMs 使用介面 / 框架\
8
+ 支持語音合成、多模態、可擴展的([function call][docs-functionc-call])插件系統\
9
9
  一鍵**免費**部署私人的 OpenAI ChatGPT/Claude/Gemini/Groq/Ollama 聊天應用
10
10
 
11
11
  [English](./README.md) · **繁體中文** · [簡體中文](./README.zh-CN.md) · [日本語](./README.ja-JP.md) · [官網][official-site] · [更新日誌][changelog] · [文檔][docs] · [部落格][blog] · [反饋問題][github-issues-link]
@@ -50,14 +50,13 @@
50
50
 
51
51
  #### TOC
52
52
 
53
- - [👋🏻 開始使用 \& 交流](#-開始使用--交流)
53
+ - [👋🏻 開始使用 & 交流](#-開始使用--交流)
54
54
  - [✨ 特性一覽](#-特性一覽)
55
55
  - [`1` 文件上傳 / 知識庫](#1-文件上傳--知識庫)
56
56
  - [`2` 多模型服務商支持](#2-多模型服務商支持)
57
- - [已支持的模型服務商](#已支持的模型服務商)
58
57
  - [`3` 支持本地大型語言模型 (LLM)](#3-支持本地大型語言模型-llm)
59
58
  - [`4` 模型視覺識別 (Model Visual)](#4-模型視覺識別-model-visual)
60
- - [`5` TTS \& STT 語音轉化](#5-tts--stt-語音轉化)
59
+ - [`5` TTS & STT 語音轉化](#5-tts--stt-語音轉化)
61
60
  - [`6` Text to Image 文生圖](#6-text-to-image-文生圖)
62
61
  - [`7` 插件系統 (Tools Calling)](#7-插件系統-tools-calling)
63
62
  - [`8` 助手市集 (GPTs)](#8-助手市集-gpts)
@@ -70,13 +69,9 @@
70
69
  - [⚡️ 性能測試](#️-性能測試)
71
70
  - [🛳 開箱即用](#-開箱即用)
72
71
  - [`A` 使用 Vercel、Zeabur 、Sealos 或 Alibaba Cloud 部署](#a-使用-vercelzeabur-sealos-或-alibaba-cloud-部署)
73
- - [Fork 之後](#fork-之後)
74
- - [保持更新](#保持更新)
75
72
  - [`B` 使用 Docker 部署](#b-使用-docker-部署)
76
73
  - [環境變量](#環境變量)
77
74
  - [獲取 OpenAI API Key](#獲取-openai-api-key)
78
- - [`A` 通過 OpenAI 官方渠道](#a-通過-openai-官方渠道)
79
- - [`B` 通過 OpenAI 第三方代理商](#b-通過-openai-第三方代理商)
80
75
  - [📦 生態系統](#-生態系統)
81
76
  - [🧩 插件體系](#-插件體系)
82
77
  - [⌨️ 本地開發](#️-本地開發)
@@ -93,12 +88,12 @@
93
88
  ## 👋🏻 開始使用 & 交流
94
89
 
95
90
  我們是一群充滿熱情的設計工程師,希望為 AIGC 提供現代化的設計組件和工具,並以開源的方式分享。
96
- 透過採用Bootstrapping 的方式,我們的目標是為開發人員和使用者提供一個更加開放、透明和使用者友好的產品生態系統。
91
+ 透過採用 Bootstrapping 的方式,我們的目標是為開發人員和使用者提供一個更加開放、透明和使用者友好的產品生態系統。
97
92
 
98
93
  LobeHub 旨在成為普通用戶與專業開發者測試 AI 助手的場所。LobeChat 目前正在積極開發中,有任何需求或者問題,歡迎提交 [issues][issues-link]
99
94
 
100
- | [![][vercel-shield-badge]][vercel-link] | 無需安裝或註冊!訪問我們的網站立刻體驗 |
101
- | :---------------------------------------- | :--------------------------------------------------------------------------- |
95
+ | [![][vercel-shield-badge]][vercel-link] | 無需安裝或註冊!訪問我們的網站立刻體驗 |
96
+ | :---------------------------------------- | :------------------------------------------------------ |
102
97
  | [![][discord-shield-badge]][discord-link] | 加入我們的 Discord 和開發者交流,和其他用戶們分享心得! |
103
98
 
104
99
  > \[!IMPORTANT]
@@ -194,7 +189,7 @@ LobeChat 支持文件上傳與知識庫功能,你可以上傳文件、圖片
194
189
 
195
190
  <!-- PROVIDER LIST -->
196
191
 
197
- 同時,我們也在計劃支持更多的模型服務商,以進一步豐富我們的服務商庫。如果你希望讓 LobeChat 支持你喜愛的服務商,歡迎加入我們的 [💬 社區討論](https://github.com/lobehub/lobe-chat/discussions/1284)。
192
+ 同時,我們也在計劃支持更多的模型服務商,以進一步豐富我們的服務商庫。如果你希望讓 LobeChat 支持你喜愛的服務商,歡迎加入我們的 [💬 社區討論](https://github.com/lobehub/lobe-chat/discussions/6157)。
198
193
 
199
194
  <div align="right">
200
195
 
@@ -477,7 +472,7 @@ LobeChat 提供了 Vercel 的 自托管版本 和 [Docker 鏡像][docker-release
477
472
 
478
473
  <div align="center">
479
474
 
480
- | 使用 Vercel 部署 | 使用 Zeabur 部署 | 使用 Sealos 部署 | 使用 Alibaba Cloud 部署 |
475
+ | 使用 Vercel 部署 | 使用 Zeabur 部署 | 使用 Sealos 部署 | 使用 Alibaba Cloud 部署 |
481
476
  | :-------------------------------------: | :---------------------------------------------------------: | :---------------------------------------------------------: | :-----------------------------------------------------------------------: |
482
477
  | [![][deploy-button-image]][deploy-link] | [![][deploy-on-zeabur-button-image]][deploy-on-zeabur-link] | [![][deploy-on-sealos-button-image]][deploy-on-sealos-link] | [![][deploy-on-alibaba-cloud-button-image]][deploy-on-alibaba-cloud-link] |
483
478
 
package/changelog/v1.json CHANGED
@@ -1,4 +1,25 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "fixes": [
5
+ "Fix Azure OpenAI O1 models and refactor the Azure OpenAI implement."
6
+ ],
7
+ "improvements": [
8
+ "Update openrouter model list and descriptions."
9
+ ]
10
+ },
11
+ "date": "2025-02-15",
12
+ "version": "1.55.1"
13
+ },
14
+ {
15
+ "children": {
16
+ "features": [
17
+ "Add vLLM provider support."
18
+ ]
19
+ },
20
+ "date": "2025-02-14",
21
+ "version": "1.55.0"
22
+ },
2
23
  {
3
24
  "children": {
4
25
  "features": [
@@ -23,4 +23,4 @@ We're excited to announce that LobeChat has expanded its AI model support with t
23
23
 
24
24
  ## Need More Model Providers?
25
25
 
26
- Feel free to submit your requests at [More Model Provider Support](https://github.com/lobehub/lobe-chat/discussions/1284).
26
+ Feel free to submit your requests at [More Model Provider Support](https://github.com/lobehub/lobe-chat/discussions/6157).
@@ -21,4 +21,4 @@ tags:
21
21
 
22
22
  ## 需要更多模型服务?
23
23
 
24
- 欢迎在 [更多模型服务商支持](https://github.com/lobehub/lobe-chat/discussions/1284) 提交您的需求。
24
+ 欢迎在 [更多模型服务商支持](https://github.com/lobehub/lobe-chat/discussions/6157) 提交您的需求。
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: Deploy LobeChat on TencentCloud Lighthouse
3
+ description: Learn how to deploy the LobeChat application on TencentCloud Lighthouse, including preparing the large model API Key, clicking the deploy button, and other operations.
4
+ tags:
5
+ - TencentCloud Lighthouse
6
+ - TencentCloud
7
+ - LobeChat
8
+ - API Key
9
+ ---
10
+
11
+ # Deploy LobeChat with TencentCloud Lighthouse
12
+
13
+ If you want to deploy LobeChat on TencentCloud Lighthouse, you can follow the steps below:
14
+
15
+ ## Tencent Cloud Deployment Process
16
+
17
+ <Steps>
18
+
19
+ ### Prepare your API Key
20
+
21
+ Go to [OpenAI API Key](https://platform.openai.com/account/api-keys) to get your OpenAI API Key.
22
+
23
+
24
+ ### One-click to deploy
25
+
26
+ [![][deploy-button-image]][deploy-link]
27
+
28
+ ### Once deployed, you can start using it
29
+
30
+ </Steps>
31
+
32
+ [deploy-button-image]: https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/d65fb782-4fb0-4348-ad85-f2943d6bee8f.svg
33
+ [deploy-link]: https://buy.tencentcloud.com/lighthouse?blueprintType=APP_OS&blueprintOfficialId=lhbp-6u0ti132&regionId=9&zone=ap-singapore-3&bundleId=bundle_starter_nmc_lin_med2_01&loginSet=AUTO&rule=true&from=lobechat
@@ -0,0 +1,33 @@
1
+ ---
2
+ title: 在 腾讯轻量云 上部署 LobeChat
3
+ description: 学习如何快速在腾讯轻量云上部署LobeChat应用,包括准备大模型 API Key、点击部署按钮等操作。
4
+ tags:
5
+ - 腾讯云
6
+ - 腾讯轻量云
7
+ - LobeChat
8
+ - 部署流程
9
+ - 大模型 API Key
10
+ ---
11
+
12
+ # 使用 腾讯轻量云 部署
13
+
14
+ 如果想在 腾讯云 上部署 LobeChat,可以按照以下步骤进行操作:
15
+
16
+ ## 腾讯轻量云 部署流程
17
+
18
+ <Steps>
19
+
20
+ ### 准备好你的 API Key
21
+
22
+ 前往 [OpenAI API Key](https://platform.openai.com/account/api-keys) 获取你的 OpenAI API Key
23
+
24
+ ### 点击下方按钮进行部署
25
+
26
+ [![][deploy-button-image]][deploy-link]
27
+
28
+ ### 部署完毕后,即可开始使用
29
+
30
+ </Steps>
31
+
32
+ [deploy-button-image]: https://cloudcache.tencent-cloud.com/qcloud/ui/static/static_source_business/d65fb782-4fb0-4348-ad85-f2943d6bee8f.svg
33
+ [deploy-link]: https://buy.cloud.tencent.com/lighthouse?blueprintType=APP_OS&amp;blueprintOfficialId=lhbp-6u0ti132&amp;regionId=8&amp;zone=ap-beijing-3&amp;bundleId=bundle_starter_mc_med2_01&amp;loginSet=AUTO&amp;rule=true&amp;from=lobechat
@@ -11,11 +11,13 @@ tags:
11
11
  - Vercel
12
12
  - 阿里云计算巢
13
13
  - 个性化
14
+ - 腾讯云
15
+ - 腾讯轻量云
14
16
  ---
15
17
 
16
18
  # 构建属于自己的 Lobe Chat
17
19
 
18
- LobeChat 支持多种部署平台,包括 Vercel、Docker、 Docker Compose 阿里云计算巢 等,你可以选择适合自己的部署平台进行部署,构建属于自己的 Lobe Chat。
20
+ LobeChat 支持多种部署平台,包括 Vercel、Docker、 Docker Compose 、阿里云计算巢 和腾讯轻量云 等,你可以选择适合自己的部署平台进行部署,构建属于自己的 Lobe Chat。
19
21
 
20
22
  ## 快速部署
21
23
 
@@ -43,7 +43,7 @@ We have implemented support for the following model service providers:
43
43
  - **DeepSeek**: Integrated with the DeepSeek series models, an innovative AI startup from China, The product has been designed to provide a model that balances performance with price. [Learn more](https://www.deepseek.com/)
44
44
  - **Qwen**: Integrated with the Qwen series models, including the latest **qwen-turbo**, **qwen-plus** and **qwen-max**. [Learn more](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction)
45
45
 
46
- At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/1284).
46
+ At the same time, we are also planning to support more model service providers, such as Replicate and Perplexity, to further enrich our service provider library. If you would like LobeChat to support your favorite service provider, feel free to join our [community discussion](https://github.com/lobehub/lobe-chat/discussions/6157).
47
47
 
48
48
  ## Local Model Support
49
49
 
@@ -43,7 +43,7 @@ tags:
43
43
  - **DeepSeek**: 接入了 DeepSeek 的 AI 模型,包括最新的 **DeepSeek-V2**,提供兼顾性能与价格的模型。[了解更多](https://www.deepseek.com/)
44
44
  - **Qwen (通义千问)**: 接入了 Qwen 的 AI 模型,包括最新的 **qwen-turbo**,**qwen-plus** 和 **qwen-max** 等模型。[了解更多](https://help.aliyun.com/zh/dashscope/developer-reference/model-introduction)
45
45
 
46
- 同时,我们也在计划支持更多的模型服务商,如 Replicate 和 Perplexity 等,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的[社区讨论](https://github.com/lobehub/lobe-chat/discussions/1284)。
46
+ 同时,我们也在计划支持更多的模型服务商,如 Replicate 和 Perplexity 等,以进一步丰富我们的服务商库。如果你希望让 LobeChat 支持你喜爱的服务商,欢迎加入我们的[社区讨论](https://github.com/lobehub/lobe-chat/discussions/6157)。
47
47
 
48
48
  ## 本地模型支持
49
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/chat",
3
- "version": "1.54.0",
3
+ "version": "1.55.1",
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",
@@ -109,8 +109,6 @@
109
109
  "@aws-sdk/client-bedrock-runtime": "^3.723.0",
110
110
  "@aws-sdk/client-s3": "^3.723.0",
111
111
  "@aws-sdk/s3-request-presigner": "^3.723.0",
112
- "@azure/core-rest-pipeline": "1.16.0",
113
- "@azure/openai": "1.0.0-beta.12",
114
112
  "@cfworker/json-schema": "^4.1.0",
115
113
  "@clerk/localizations": "^3.9.6",
116
114
  "@clerk/nextjs": "^6.10.6",
@@ -28,6 +28,7 @@ import {
28
28
  TaichuProviderCard,
29
29
  TogetherAIProviderCard,
30
30
  UpstageProviderCard,
31
+ VLLMProviderCard,
31
32
  WenxinProviderCard,
32
33
  XAIProviderCard,
33
34
  ZeroOneProviderCard,
@@ -57,6 +58,7 @@ export const useProviderList = (): ProviderItem[] => {
57
58
  OpenAIProvider,
58
59
  AzureProvider,
59
60
  OllamaProvider,
61
+ VLLMProviderCard,
60
62
  AnthropicProviderCard,
61
63
  BedrockProvider,
62
64
  GoogleProviderCard,
@@ -37,6 +37,7 @@ import { default as taichu } from './taichu';
37
37
  import { default as tencentcloud } from './tencentcloud';
38
38
  import { default as togetherai } from './togetherai';
39
39
  import { default as upstage } from './upstage';
40
+ import { default as vllm } from './vllm';
40
41
  import { default as wenxin } from './wenxin';
41
42
  import { default as xai } from './xai';
42
43
  import { default as zeroone } from './zeroone';
@@ -99,6 +100,7 @@ export const LOBE_DEFAULT_MODEL_LIST = buildDefaultModelList({
99
100
  tencentcloud,
100
101
  togetherai,
101
102
  upstage,
103
+ vllm,
102
104
  wenxin,
103
105
  xai,
104
106
  zeroone,
@@ -142,6 +144,7 @@ export { default as taichu } from './taichu';
142
144
  export { default as tencentcloud } from './tencentcloud';
143
145
  export { default as togetherai } from './togetherai';
144
146
  export { default as upstage } from './upstage';
147
+ export { default as vllm } from './vllm';
145
148
  export { default as wenxin } from './wenxin';
146
149
  export { default as xai } from './xai';
147
150
  export { default as zeroone } from './zeroone';
@@ -229,6 +229,36 @@ const openrouterChatModels: AIChatModelCard[] = [
229
229
  releasedAt: '2024-09-05',
230
230
  type: 'chat',
231
231
  },
232
+ {
233
+ abilities: {
234
+ reasoning: true,
235
+ },
236
+ contextWindowTokens: 163_840,
237
+ description:
238
+ 'DeepSeek-R1 在仅有极少标注数据的情况下,极大提升了模型推理能力。在输出最终回答之前,模型会先输出一段思维链内容,以提升最终答案的准确性。',
239
+ displayName: 'DeepSeek R1',
240
+ enabled: true,
241
+ id: 'deepseek/deepseek-r1',
242
+ pricing: {
243
+ input: 3,
244
+ output: 8,
245
+ },
246
+ releasedAt: '2025-01-20',
247
+ type: 'chat',
248
+ },
249
+ {
250
+ abilities: {
251
+ reasoning: true,
252
+ },
253
+ contextWindowTokens: 163_840,
254
+ description:
255
+ 'DeepSeek-R1 在仅有极少标注数据的情况下,极大提升了模型推理能力。在输出最终回答之前,模型会先输出一段思维链内容,以提升最终答案的准确性。',
256
+ displayName: 'DeepSeek R1 (Free)',
257
+ enabled: true,
258
+ id: 'deepseek/deepseek-r1:free',
259
+ releasedAt: '2025-01-20',
260
+ type: 'chat',
261
+ },
232
262
  {
233
263
  abilities: {
234
264
  vision: true,
@@ -0,0 +1,94 @@
1
+ import { AIChatModelCard } from '@/types/aiModel';
2
+
3
+ const vllmChatModels: AIChatModelCard[] = [
4
+ {
5
+ abilities: {
6
+ functionCall: true
7
+ },
8
+ contextWindowTokens: 128_000,
9
+ description:
10
+ 'Llama 3.1 是 Meta 推出的领先模型,支持高达 405B 参数,可应用于复杂对话、多语言翻译和数据分析领域。',
11
+ displayName: 'Llama 3.1 70B',
12
+ enabled: true,
13
+ id: 'meta-llama/Meta-Llama-3.1-70B',
14
+ type: 'chat',
15
+ },
16
+ {
17
+ abilities: {
18
+ functionCall: true
19
+ },
20
+ contextWindowTokens: 128_000,
21
+ description:
22
+ 'Llama 3.1 是 Meta 推出的领先模型,支持高达 405B 参数,可应用于复杂对话、多语言翻译和数据分析领域。',
23
+ displayName: 'Llama 3.1 405B Instruct',
24
+ id: 'meta-llama/Meta-Llama-3.1-405B-Instruct',
25
+ type: 'chat',
26
+ },
27
+ {
28
+ contextWindowTokens: 8192,
29
+ description:
30
+ 'Gemma 2 是 Google 推出的高效模型,涵盖从小型应用到复杂数据处理的多种应用场景。',
31
+ displayName: 'Gemma 2 9B',
32
+ id: 'google/gemma-2-9b',
33
+ type: 'chat',
34
+ },
35
+ {
36
+ contextWindowTokens: 8192,
37
+ description:
38
+ 'Gemma 2 是 Google 推出的高效模型,涵盖从小型应用到复杂数据处理的多种应用场景。',
39
+ displayName: 'Gemma 2 27B',
40
+ id: 'google/gemma-2-27b',
41
+ type: 'chat',
42
+ },
43
+ {
44
+ contextWindowTokens: 8192,
45
+ description:
46
+ 'Mistral (7B) Instruct 以高性能著称,适用于多种语言任务。',
47
+ displayName: 'Mistral 7B Instruct v0.1',
48
+ id: 'mistralai/Mistral-7B-Instruct-v0.1',
49
+ type: 'chat',
50
+ },
51
+ {
52
+ contextWindowTokens: 32_768,
53
+ description:
54
+ 'Mixtral-8x7B Instruct (46.7B) 提供高容量的计算框架,适合大规模数据处理。',
55
+ displayName: 'Mistral 8x7B Instruct v0.1',
56
+ id: 'mistralai/Mixtral-8x7B-Instruct-v0.1',
57
+ type: 'chat',
58
+ },
59
+ {
60
+ abilities: {
61
+ functionCall: true
62
+ },
63
+ contextWindowTokens: 65_536,
64
+ description:
65
+ 'DeepSeek-V3 是一款拥有 6710 亿参数的混合专家(MoE)语言模型,采用多头潜在注意力(MLA)和 DeepSeekMoE 架构,结合无辅助损失的负载平衡策略,优化推理和训练效率。通过在 14.8 万亿高质量tokens上预训练,并进行监督微调和强化学习,DeepSeek-V3 在性能上超越其他开源模型,接近领先闭源模型。',
66
+ displayName: 'DeepSeek V3',
67
+ enabled: true,
68
+ id: 'deepseek-ai/DeepSeek-V3',
69
+ type: 'chat',
70
+ },
71
+ {
72
+ abilities: {
73
+ reasoning: true
74
+ },
75
+ contextWindowTokens: 32_768,
76
+ description: 'Qwen QwQ 是由 Qwen 团队开发的实验研究模型,专注于提升AI推理能力。',
77
+ displayName: 'QwQ 32B Preview',
78
+ enabled: true,
79
+ id: 'Qwen/QwQ-32B-Preview',
80
+ type: 'chat',
81
+ },
82
+ {
83
+ contextWindowTokens: 32_768,
84
+ description: 'Qwen2-7B-Instruct 是 Qwen2 系列中的指令微调大语言模型,参数规模为 7B。该模型基于 Transformer 架构,采用了 SwiGLU 激活函数、注意力 QKV 偏置和组查询注意力等技术。它能够处理大规模输入。该模型在语言理解、生成、多语言能力、编码、数学和推理等多个基准测试中表现出色,超越了大多数开源模型,并在某些任务上展现出与专有模型相当的竞争力。Qwen2-7B-Instruct 在多项评测中均优于 Qwen1.5-7B-Chat,显示出显著的性能提升',
85
+ displayName: 'Qwen2 7B Instruct',
86
+ enabled: true,
87
+ id: 'Qwen/Qwen2-7B-Instruct',
88
+ type: 'chat',
89
+ },
90
+ ]
91
+
92
+ export const allModels = [...vllmChatModels];
93
+
94
+ export default allModels;
package/src/config/llm.ts CHANGED
@@ -68,6 +68,9 @@ export const getLLMConfig = () => {
68
68
 
69
69
  ENABLED_OLLAMA: z.boolean(),
70
70
 
71
+ ENABLED_VLLM: z.boolean(),
72
+ VLLM_API_KEY: z.string().optional(),
73
+
71
74
  ENABLED_QWEN: z.boolean(),
72
75
  QWEN_API_KEY: z.string().optional(),
73
76
 
@@ -196,6 +199,9 @@ export const getLLMConfig = () => {
196
199
 
197
200
  ENABLED_OLLAMA: process.env.ENABLED_OLLAMA !== '0',
198
201
 
202
+ ENABLED_VLLM: !!process.env.VLLM_API_KEY,
203
+ VLLM_API_KEY: process.env.VLLM_API_KEY,
204
+
199
205
  ENABLED_QWEN: !!process.env.QWEN_API_KEY,
200
206
  QWEN_API_KEY: process.env.QWEN_API_KEY,
201
207
 
@@ -37,6 +37,7 @@ import TaichuProvider from './taichu';
37
37
  import TencentcloudProvider from './tencentcloud';
38
38
  import TogetherAIProvider from './togetherai';
39
39
  import UpstageProvider from './upstage';
40
+ import VLLMProvider from './vllm';
40
41
  import WenxinProvider from './wenxin';
41
42
  import XAIProvider from './xai';
42
43
  import ZeroOneProvider from './zeroone';
@@ -58,6 +59,7 @@ export const LOBE_DEFAULT_MODEL_LIST: ChatModelCard[] = [
58
59
  MistralProvider.chatModels,
59
60
  MoonshotProvider.chatModels,
60
61
  OllamaProvider.chatModels,
62
+ VLLMProvider.chatModels,
61
63
  OpenRouterProvider.chatModels,
62
64
  TogetherAIProvider.chatModels,
63
65
  FireworksAIProvider.chatModels,
@@ -89,6 +91,7 @@ export const DEFAULT_MODEL_PROVIDER_LIST = [
89
91
  OpenAIProvider,
90
92
  { ...AzureProvider, chatModels: [] },
91
93
  OllamaProvider,
94
+ VLLMProvider,
92
95
  AnthropicProvider,
93
96
  BedrockProvider,
94
97
  GoogleProvider,
@@ -175,6 +178,7 @@ export { default as TaichuProviderCard } from './taichu';
175
178
  export { default as TencentCloudProviderCard } from './tencentcloud';
176
179
  export { default as TogetherAIProviderCard } from './togetherai';
177
180
  export { default as UpstageProviderCard } from './upstage';
181
+ export { default as VLLMProviderCard } from './vllm';
178
182
  export { default as WenxinProviderCard } from './wenxin';
179
183
  export { default as XAIProviderCard } from './xai';
180
184
  export { default as ZeroOneProviderCard } from './zeroone';
@@ -228,6 +228,15 @@ const OpenRouter: ModelProviderCard = {
228
228
  },
229
229
  releasedAt: '2025-01-20',
230
230
  },
231
+ {
232
+ contextWindowTokens: 163_840,
233
+ description: 'DeepSeek-R1',
234
+ displayName: 'DeepSeek R1 (Free)',
235
+ enabled: true,
236
+ functionCall: false,
237
+ id: 'deepseek/deepseek-r1:free',
238
+ releasedAt: '2025-01-20',
239
+ },
231
240
  {
232
241
  contextWindowTokens: 131_072,
233
242
  description:
@@ -0,0 +1,20 @@
1
+ import { ModelProviderCard } from '@/types/llm';
2
+
3
+ const VLLM: ModelProviderCard = {
4
+ chatModels: [],
5
+ description: 'vLLM 是一个快速且易于使用的库,用于 LLM 推理和服务。',
6
+ id: 'vllm',
7
+ modelList: { showModelFetcher: true },
8
+ modelsUrl: 'https://docs.vllm.ai/en/latest/models/supported_models.html#supported-models',
9
+ name: 'vLLM',
10
+ settings: {
11
+ proxyUrl: {
12
+ placeholder: 'http://localhost:8000/v1',
13
+ },
14
+ sdkType: 'openai',
15
+ showModelFetcher: true,
16
+ },
17
+ url: 'https://docs.vllm.ai',
18
+ };
19
+
20
+ export default VLLM;
package/src/const/url.ts CHANGED
@@ -44,7 +44,7 @@ export const TERMS_URL = urlJoin(OFFICIAL_SITE, '/terms');
44
44
  export const PLUGINS_INDEX_URL = 'https://chat-plugins.lobehub.com';
45
45
 
46
46
  export const MORE_MODEL_PROVIDER_REQUEST_URL =
47
- 'https://github.com/lobehub/lobe-chat/discussions/1284';
47
+ 'https://github.com/lobehub/lobe-chat/discussions/6157';
48
48
 
49
49
  export const MORE_FILE_PREVIEW_REQUEST_URL =
50
50
  'https://github.com/lobehub/lobe-chat/discussions/3684';
@@ -107,6 +107,7 @@ describe('AgentRuntime', () => {
107
107
  const jwtPayload = {
108
108
  apiKey: 'user-azure-key',
109
109
  baseURL: 'user-azure-endpoint',
110
+ apiVersion: '2024-06-01',
110
111
  };
111
112
  const runtime = await AgentRuntime.initializeWithProviderOptions(ModelProvider.Azure, {
112
113
  azure: jwtPayload,