@lobehub/lobehub 2.1.3 → 2.1.4

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 (129) hide show
  1. package/.env.example +0 -3
  2. package/.env.example.development +0 -3
  3. package/CHANGELOG.md +34 -0
  4. package/changelog/v2.json +9 -0
  5. package/docker-compose/deploy/.env.example +3 -1
  6. package/docker-compose/deploy/.env.zh-CN.example +4 -1
  7. package/docker-compose/local/.env.example +0 -1
  8. package/docker-compose/local/.env.zh-CN.example +0 -1
  9. package/docker-compose/local/grafana/.env.example +0 -1
  10. package/docker-compose/local/grafana/.env.zh-CN.example +0 -1
  11. package/docker-compose/local/logto/docker-compose.yml +0 -1
  12. package/docker-compose/local/zitadel/.env.example +1 -2
  13. package/docker-compose/local/zitadel/.env.zh-CN.example +1 -2
  14. package/docker-compose/production/grafana/.env.example +0 -1
  15. package/docker-compose/production/grafana/.env.zh-CN.example +0 -1
  16. package/docker-compose/production/logto/.env.example +0 -2
  17. package/docker-compose/production/logto/.env.zh-CN.example +0 -2
  18. package/docker-compose/production/zitadel/.env.example +0 -2
  19. package/docker-compose/production/zitadel/.env.zh-CN.example +0 -2
  20. package/docker-compose/setup.sh +16 -2
  21. package/docs/development/basic/folder-structure.mdx +23 -14
  22. package/docs/development/basic/folder-structure.zh-CN.mdx +23 -14
  23. package/docs/development/basic/work-with-server-side-database.mdx +0 -1
  24. package/docs/development/basic/work-with-server-side-database.zh-CN.mdx +0 -1
  25. package/docs/development/start.mdx +19 -12
  26. package/docs/development/start.zh-CN.mdx +19 -12
  27. package/docs/self-hosting/advanced/s3/cloudflare-r2.mdx +0 -5
  28. package/docs/self-hosting/advanced/s3/cloudflare-r2.zh-CN.mdx +0 -5
  29. package/docs/self-hosting/advanced/s3/rustfs.mdx +0 -2
  30. package/docs/self-hosting/advanced/s3/rustfs.zh-CN.mdx +0 -2
  31. package/docs/self-hosting/advanced/s3/tencent-cloud.mdx +0 -1
  32. package/docs/self-hosting/advanced/s3/tencent-cloud.zh-CN.mdx +0 -2
  33. package/docs/self-hosting/advanced/s3.mdx +0 -9
  34. package/docs/self-hosting/advanced/s3.zh-CN.mdx +0 -8
  35. package/docs/self-hosting/environment-variables/s3.mdx +0 -7
  36. package/docs/self-hosting/environment-variables/s3.zh-CN.mdx +0 -7
  37. package/docs/self-hosting/platform/docker-compose.mdx +0 -1
  38. package/docs/self-hosting/platform/docker-compose.zh-CN.mdx +0 -1
  39. package/docs/self-hosting/platform/docker.mdx +5 -3
  40. package/docs/self-hosting/platform/docker.zh-CN.mdx +5 -4
  41. package/docs/self-hosting/platform/dokploy.mdx +0 -2
  42. package/docs/self-hosting/platform/dokploy.zh-CN.mdx +0 -2
  43. package/docs/self-hosting/platform/vercel.mdx +0 -7
  44. package/docs/self-hosting/platform/vercel.zh-CN.mdx +0 -7
  45. package/e2e/src/steps/home/sidebarAgent.steps.ts +56 -24
  46. package/locales/ar/authError.json +1 -0
  47. package/locales/ar/models.json +25 -22
  48. package/locales/ar/providers.json +0 -1
  49. package/locales/ar/setting.json +16 -0
  50. package/locales/bg-BG/authError.json +1 -0
  51. package/locales/bg-BG/models.json +18 -21
  52. package/locales/bg-BG/providers.json +0 -1
  53. package/locales/bg-BG/setting.json +16 -0
  54. package/locales/de-DE/authError.json +1 -0
  55. package/locales/de-DE/models.json +20 -20
  56. package/locales/de-DE/providers.json +0 -1
  57. package/locales/de-DE/setting.json +16 -0
  58. package/locales/en-US/models.json +22 -22
  59. package/locales/en-US/providers.json +0 -1
  60. package/locales/es-ES/authError.json +1 -0
  61. package/locales/es-ES/models.json +84 -20
  62. package/locales/es-ES/providers.json +0 -1
  63. package/locales/es-ES/setting.json +16 -0
  64. package/locales/fa-IR/authError.json +1 -0
  65. package/locales/fa-IR/models.json +43 -20
  66. package/locales/fa-IR/providers.json +0 -1
  67. package/locales/fa-IR/setting.json +16 -0
  68. package/locales/fr-FR/authError.json +1 -0
  69. package/locales/fr-FR/models.json +19 -21
  70. package/locales/fr-FR/providers.json +0 -1
  71. package/locales/fr-FR/setting.json +16 -0
  72. package/locales/it-IT/authError.json +1 -0
  73. package/locales/it-IT/models.json +17 -19
  74. package/locales/it-IT/providers.json +0 -1
  75. package/locales/it-IT/setting.json +16 -0
  76. package/locales/ja-JP/authError.json +1 -0
  77. package/locales/ja-JP/models.json +43 -22
  78. package/locales/ja-JP/providers.json +0 -1
  79. package/locales/ja-JP/setting.json +16 -0
  80. package/locales/ko-KR/authError.json +1 -0
  81. package/locales/ko-KR/models.json +41 -20
  82. package/locales/ko-KR/providers.json +0 -1
  83. package/locales/ko-KR/setting.json +16 -0
  84. package/locales/nl-NL/authError.json +1 -0
  85. package/locales/nl-NL/models.json +48 -20
  86. package/locales/nl-NL/providers.json +0 -1
  87. package/locales/nl-NL/setting.json +16 -0
  88. package/locales/pl-PL/authError.json +1 -0
  89. package/locales/pl-PL/models.json +19 -22
  90. package/locales/pl-PL/providers.json +0 -1
  91. package/locales/pl-PL/setting.json +16 -0
  92. package/locales/pt-BR/authError.json +1 -0
  93. package/locales/pt-BR/models.json +21 -21
  94. package/locales/pt-BR/providers.json +0 -1
  95. package/locales/pt-BR/setting.json +16 -0
  96. package/locales/ru-RU/authError.json +1 -0
  97. package/locales/ru-RU/models.json +23 -20
  98. package/locales/ru-RU/providers.json +0 -1
  99. package/locales/ru-RU/setting.json +16 -0
  100. package/locales/tr-TR/authError.json +1 -0
  101. package/locales/tr-TR/models.json +37 -20
  102. package/locales/tr-TR/providers.json +0 -1
  103. package/locales/tr-TR/setting.json +16 -0
  104. package/locales/vi-VN/authError.json +1 -0
  105. package/locales/vi-VN/models.json +15 -19
  106. package/locales/vi-VN/providers.json +0 -1
  107. package/locales/vi-VN/setting.json +16 -0
  108. package/locales/zh-CN/models.json +20 -20
  109. package/locales/zh-CN/providers.json +0 -1
  110. package/locales/zh-TW/authError.json +1 -0
  111. package/locales/zh-TW/models.json +20 -20
  112. package/locales/zh-TW/providers.json +0 -1
  113. package/locales/zh-TW/setting.json +16 -0
  114. package/package.json +1 -1
  115. package/packages/model-bank/src/aiModels/google.ts +0 -19
  116. package/packages/model-bank/src/aiModels/moonshot.ts +56 -5
  117. package/packages/model-bank/src/aiModels/ollamacloud.ts +14 -0
  118. package/packages/model-bank/src/aiModels/openrouter.ts +0 -14
  119. package/packages/model-bank/src/aiModels/qwen.ts +105 -4
  120. package/packages/model-bank/src/aiModels/siliconcloud.ts +39 -0
  121. package/packages/model-bank/src/aiModels/wenxin.ts +0 -99
  122. package/packages/model-runtime/src/core/contextBuilders/openai.test.ts +24 -0
  123. package/packages/model-runtime/src/core/contextBuilders/openai.ts +22 -5
  124. package/packages/model-runtime/src/core/openaiCompatibleFactory/index.ts +10 -3
  125. package/packages/model-runtime/src/core/streams/google/google-ai.test.ts +54 -13
  126. package/packages/model-runtime/src/core/streams/google/index.ts +1 -4
  127. package/packages/model-runtime/src/providers/moonshot/index.ts +24 -2
  128. package/packages/model-runtime/src/providers/qwen/index.ts +16 -15
  129. package/src/server/routers/lambda/__tests__/integration/aiAgent/execAgent.integration.test.ts +3 -2
package/.env.example CHANGED
@@ -262,9 +262,6 @@ OPENAI_API_KEY=sk-xxxxxxxxx
262
262
  # Bucket request endpoint
263
263
  # S3_ENDPOINT=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.r2.cloudflarestorage.com
264
264
 
265
- # Public access domain for the bucket
266
- # S3_PUBLIC_DOMAIN=https://s3-for-lobechat.your-domain.com
267
-
268
265
  # Bucket region, such as us-west-1, generally not needed to add
269
266
  # but some service providers may require configuration
270
267
  # S3_REGION=us-west-1
@@ -85,9 +85,6 @@ S3_ENDPOINT=http://localhost:${MINIO_PORT}
85
85
  # S3 bucket name for storing files
86
86
  S3_BUCKET=${MINIO_LOBE_BUCKET}
87
87
 
88
- # Public domain for S3 file access
89
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
90
-
91
88
  # Enable path-style S3 requests (required for MinIO)
92
89
  S3_ENABLE_PATH_STYLE=1
93
90
 
package/CHANGELOG.md CHANGED
@@ -2,6 +2,40 @@
2
2
 
3
3
  # Changelog
4
4
 
5
+ ### [Version 2.1.4](https://github.com/lobehub/lobe-chat/compare/v2.1.3...v2.1.4)
6
+
7
+ <sup>Released on **2026-01-31**</sup>
8
+
9
+ #### 🐛 Bug Fixes
10
+
11
+ - **stream**: Update event handling to use 'text' instead of 'content_part' in gemini 2.5 models.
12
+
13
+ #### 💄 Styles
14
+
15
+ - **misc**: Update i18n, Update Kimi K2.5 & Qwen3 Max Thinking models.
16
+
17
+ <br/>
18
+
19
+ <details>
20
+ <summary><kbd>Improvements and Fixes</kbd></summary>
21
+
22
+ #### What's fixed
23
+
24
+ - **stream**: Update event handling to use 'text' instead of 'content_part' in gemini 2.5 models, closes [#11235](https://github.com/lobehub/lobe-chat/issues/11235) ([a76a630](https://github.com/lobehub/lobe-chat/commit/a76a630))
25
+
26
+ #### Styles
27
+
28
+ - **misc**: Update i18n, closes [#11920](https://github.com/lobehub/lobe-chat/issues/11920) ([1a590a0](https://github.com/lobehub/lobe-chat/commit/1a590a0))
29
+ - **misc**: Update Kimi K2.5 & Qwen3 Max Thinking models, closes [#11925](https://github.com/lobehub/lobe-chat/issues/11925) ([6f9e010](https://github.com/lobehub/lobe-chat/commit/6f9e010))
30
+
31
+ </details>
32
+
33
+ <div align="right">
34
+
35
+ [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)
36
+
37
+ </div>
38
+
5
39
  ### [Version 2.1.3](https://github.com/lobehub/lobe-chat/compare/v2.1.2...v2.1.3)
6
40
 
7
41
  <sup>Released on **2026-01-31**</sup>
package/changelog/v2.json CHANGED
@@ -1,4 +1,13 @@
1
1
  [
2
+ {
3
+ "children": {
4
+ "improvements": [
5
+ "Update i18n, Update Kimi K2.5 & Qwen3 Max Thinking models."
6
+ ]
7
+ },
8
+ "date": "2026-01-31",
9
+ "version": "2.1.4"
10
+ },
2
11
  {
3
12
  "children": {},
4
13
  "date": "2026-01-31",
@@ -7,6 +7,9 @@
7
7
  # Leave empty to allow all users to register
8
8
  # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
9
 
10
+ # Disable user registration (SSO-only mode)
11
+ # When set to 1, users cannot register via email/password, only SSO login is allowed
12
+ # AUTH_DISABLE_EMAIL_PASSWORD=1
10
13
 
11
14
  # ===========================
12
15
  # ====== Preset config ======
@@ -28,7 +31,6 @@ RUSTFS_ACCESS_KEY=admin
28
31
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
29
32
 
30
33
  # Configure the bucket information of RUSTFS
31
- S3_PUBLIC_DOMAIN=http://localhost:9000
32
34
  S3_ENDPOINT=http://localhost:9000
33
35
  RUSTFS_LOBE_BUCKET=lobe
34
36
 
@@ -7,6 +7,10 @@
7
7
  # 留空则允许所有用户注册登录
8
8
  # AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com
9
9
 
10
+ # 禁用用户注册(仅允许 SSO 登录)
11
+ # 设置为 1 后,用户无法通过邮箱密码注册,只能通过 SSO 登录
12
+ # AUTH_DISABLE_EMAIL_PASSWORD=1
13
+
10
14
  # ===================
11
15
  # ===== 预设配置 =====
12
16
  # ===================
@@ -24,7 +28,6 @@ RUSTFS_ACCESS_KEY=admin
24
28
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
25
29
 
26
30
  # 在下方配置 rustfs 中添加的桶
27
- S3_PUBLIC_DOMAIN=http://localhost:9000
28
31
  S3_ENDPOINT=http://localhost:9000
29
32
  RUSTFS_LOBE_BUCKET=lobe
30
33
 
@@ -37,7 +37,6 @@ RUSTFS_ACCESS_KEY=admin
37
37
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
38
38
 
39
39
  # Configure the bucket information of RUSTFS
40
- S3_PUBLIC_DOMAIN=http://localhost:9000
41
40
  S3_ENDPOINT=http://localhost:9000
42
41
  RUSTFS_LOBE_BUCKET=lobe
43
42
 
@@ -34,7 +34,6 @@ RUSTFS_ACCESS_KEY=admin
34
34
  RUSTFS_SECRET_KEY=YOUR_RUSTFS_PASSWORD
35
35
 
36
36
  # 在下方配置 rustfs 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  RUSTFS_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # Configure the bucket information of MinIO
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # 在下方配置 minio 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -103,7 +103,6 @@ services:
103
103
  - 'DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgresql:5432/${LOBE_DB_NAME}'
104
104
  - 'S3_ENDPOINT=http://localhost:${MINIO_PORT}'
105
105
  - 'S3_BUCKET=${MINIO_LOBE_BUCKET}'
106
- - 'S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}'
107
106
  - 'S3_ENABLE_PATH_STYLE=1'
108
107
  - 'REDIS_URL=redis://redis:6379'
109
108
  - 'REDIS_PREFIX=lobechat'
@@ -21,8 +21,7 @@ AUTH_ZITADEL_ISSUER=http://localhost:8080
21
21
  S3_ACCESS_KEY_ID=
22
22
  S3_SECRET_ACCESS_KEY=
23
23
  S3_ENDPOINT=http://localhost:9000
24
- S3_BUCKET=lobe
25
- S3_PUBLIC_DOMAIN=http://localhost:9000
24
+ S3_BUCKET=lobe
26
25
  S3_ENABLE_PATH_STYLE=1
27
26
  LLM_VISION_IMAGE_USE_BASE64=1
28
27
 
@@ -20,8 +20,7 @@ AUTH_ZITADEL_ISSUER=http://localhost:8080
20
20
  S3_ACCESS_KEY_ID=
21
21
  S3_SECRET_ACCESS_KEY=
22
22
  S3_ENDPOINT=http://localhost:9000
23
- S3_BUCKET=lobe
24
- S3_PUBLIC_DOMAIN=http://localhost:9000
23
+ S3_BUCKET=lobe
25
24
  S3_ENABLE_PATH_STYLE=1
26
25
  LLM_VISION_IMAGE_USE_BASE64=1
27
26
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # Configure the bucket information of MinIO
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -34,7 +34,6 @@ MINIO_ROOT_USER=admin
34
34
  MINIO_ROOT_PASSWORD=YOUR_MINIO_PASSWORD
35
35
 
36
36
  # 在下方配置 minio 中添加的桶
37
- S3_PUBLIC_DOMAIN=http://localhost:9000
38
37
  S3_ENDPOINT=http://localhost:9000
39
38
  MINIO_LOBE_BUCKET=lobe
40
39
 
@@ -38,8 +38,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
38
38
  S3_ENDPOINT=https://lobe-s3-api.example.com
39
39
  # Required: S3 Bucket (invalid until manually created in MinIO UI)
40
40
  S3_BUCKET=lobe
41
- # Required: S3 Public Domain for client access to unstructured data
42
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
43
41
  # Optional: S3 Enable Path Style
44
42
  # Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO
45
43
  # See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -38,8 +38,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
38
38
  S3_ENDPOINT=https://lobe-s3-api.example.com
39
39
  # 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的
40
40
  S3_BUCKET=lobe
41
- # 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据
42
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
43
41
  # 选填,S3 的 Enable Path Style
44
42
  # 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1
45
43
  # 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -35,8 +35,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
35
35
  S3_ENDPOINT=https://lobe-s3-api.example.com
36
36
  # Required: S3 Bucket (invalid until manually created in MinIO UI)
37
37
  S3_BUCKET=lobe
38
- # Required: S3 Public Domain for client access to unstructured data
39
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
40
38
  # Optional: S3 Enable Path Style
41
39
  # Use 0 for mainstream S3 cloud providers; use 1 for self-hosted MinIO
42
40
  # See: https://lobehub.com/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -31,8 +31,6 @@ S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
31
31
  S3_ENDPOINT=https://lobe-s3-api.example.com
32
32
  # 必填,S3 的 Bucket,直到在 MinIO UI 中手动创建之前都是无效的
33
33
  S3_BUCKET=lobe
34
- # 必填,S3 的 Public Domain,用于客户端通过公开连接访问非结构化数据
35
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
36
34
  # 选填,S3 的 Enable Path Style
37
35
  # 对于主流 S3 Cloud 服务商,一般填 0 即可;对于自部署的 MinIO,请填 1
38
36
  # 请参考:https://lobehub.com/zh/docs/self-hosting/advanced/s3#s-3-enable-path-style
@@ -230,6 +230,20 @@ show_message() {
230
230
  ;;
231
231
  esac
232
232
  ;;
233
+ tips_disable_registration)
234
+ case $LANGUAGE in
235
+ zh_CN)
236
+ echo "如需限制用户注册,可在 .env 中配置:"
237
+ echo " - 使用 SSO 登录时,设置 AUTH_DISABLE_EMAIL_PASSWORD=1 可禁用邮箱密码注册"
238
+ echo " - 使用邮箱密码登录时,设置 AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com 可限制允许登录的邮箱"
239
+ ;;
240
+ *)
241
+ echo "To restrict user registration, configure in .env:"
242
+ echo " - For SSO login: set AUTH_DISABLE_EMAIL_PASSWORD=1 to disable email/password registration"
243
+ echo " - For email/password login: set AUTH_ALLOWED_EMAILS=user1@example.com,user2@example.com to allow specific emails"
244
+ ;;
245
+ esac
246
+ ;;
233
247
  tips_show_documentation)
234
248
  case $LANGUAGE in
235
249
  zh_CN)
@@ -595,7 +609,6 @@ section_configurate_host() {
595
609
  # lobe host
596
610
  sed "${SED_INPLACE_ARGS[@]}" "s#^APP_URL=.*#APP_URL=$PROTOCOL://$LOBE_HOST#" .env
597
611
  # s3 related
598
- sed "${SED_INPLACE_ARGS[@]}" "s#^S3_PUBLIC_DOMAIN=.*#S3_PUBLIC_DOMAIN=$PROTOCOL://$RUSTFS_HOST#" .env
599
612
  sed "${SED_INPLACE_ARGS[@]}" "s#^S3_ENDPOINT=.*#S3_ENDPOINT=$PROTOCOL://$RUSTFS_HOST#" .env
600
613
 
601
614
 
@@ -726,7 +739,8 @@ section_display_configurated_report() {
726
739
  printf "\n%s\n\n" "$(show_message "tips_run_command")"
727
740
  print_centered "docker compose up --no-attach searxng" "green"
728
741
  printf "\n%s\n" "$(show_message "tips_if_run_normally")"
729
- printf "\n%s\n\n" "$(show_message "tips_regen_jwks")"
742
+ printf "\n%s\n" "$(show_message "tips_regen_jwks")"
743
+ printf "\n%s\n\n" "$(show_message "tips_disable_registration")"
730
744
  print_centered "docker compose up -d --no-attach searxng" "green"
731
745
  printf "\n%s\n" "$(show_message "tips_if_want_searxng_logs")"
732
746
  print_centered "docker compose logs -f searxng" "white"
@@ -17,20 +17,29 @@ The directory structure of LobeHub is as follows:
17
17
 
18
18
  ```bash
19
19
  src
20
- ├── app # Next.js App Router implementation with route groups and API routes
21
- ├── components # Reusable UI components
22
- ├── config # Application configuration files, including client-side and server-side environment variables
23
- ├── features # Function modules related to business functions, such as agent settings, plugin development pop-ups, etc.
24
- ├── hooks # Custom utility hooks reused throughout the application
25
- ├── layout # Application layout components, such as navigation bars, sidebars, etc.
26
- ├── libs # Third-party integrations (analytics, OIDC, etc.)
27
- ├── locales # Internationalization language files
28
- ├── server # Server-side modules and services
29
- ├── services # Encapsulated backend service interfaces, such as HTTP requests
30
- ├── store # Zustand store for state management
31
- ├── styles # Global styles and CSS-in-JS configurations
32
- ├── types # TypeScript type definition files
33
- └── utils # Common utility functions
20
+ ├── app # Next.js App Router implementation with route groups and API routes
21
+ ├── business # Business logic modules (client and server)
22
+ ├── components # Reusable UI components
23
+ ├── config # Application configuration files, including client-side and server-side environment variables
24
+ ├── const # Application constants and enums
25
+ ├── envs # Environment variable definitions and validation (analytics, auth, llm, etc.)
26
+ ├── features # Function modules related to business functions, such as agent settings, plugin development pop-ups, etc.
27
+ ├── helpers # Utility helpers for tool engineering, placeholder parsing, etc.
28
+ ├── hooks # Custom utility hooks reused throughout the application
29
+ ├── layout # Application layout components, such as navigation bars, sidebars, etc.
30
+ ├── libs # Third-party integrations (analytics, OIDC, etc.)
31
+ ├── locales # Internationalization language files
32
+ ├── server # Server-side modules and services
33
+ ├── services # Encapsulated backend service interfaces, such as HTTP requests
34
+ ├── store # Zustand store for state management
35
+ ├── styles # Global styles and CSS-in-JS configurations
36
+ ├── tools # Built-in tools (artifacts, inspectors, interventions, etc.)
37
+ ├── types # TypeScript type definition files
38
+ ├── utils # Common utility functions
39
+ ├── auth.ts # Authentication configuration (Better Auth)
40
+ ├── instrumentation.ts # Application monitoring and telemetry setup
41
+ ├── instrumentation.node.ts # Node.js-specific instrumentation
42
+ └── proxy.ts # Next.js middleware proxy configuration
34
43
  ```
35
44
 
36
45
  ## app
@@ -15,20 +15,29 @@ LobeHub 的文件夹目录架构如下:
15
15
 
16
16
  ```bash
17
17
  src
18
- ├── app # Next.js App Router 实现,包含路由组和 API 路由
19
- ├── components # 可复用的 UI 组件
20
- ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
21
- ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
22
- ├── hooks # 全应用复用自定义的工具 Hooks
23
- ├── layout # 应用的布局组件,如导航栏、侧边栏等
24
- ├── libs # 第三方集成(分析、OIDC 等)
25
- ├── locales # 国际化的语言文件
26
- ├── server # 服务端模块和服务
27
- ├── services # 封装的后端服务接口,如 HTTP 请求
28
- ├── store # 用于状态管理的 zustand store
29
- ├── styles # 全局样式和 CSS-in-JS 配置
30
- ├── types # TypeScript 的类型定义文件
31
- └── utils # 通用的工具函数
18
+ ├── app # Next.js App Router 实现,包含路由组和 API 路由
19
+ ├── business # 业务逻辑模块(客户端和服务端)
20
+ ├── components # 可复用的 UI 组件
21
+ ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
22
+ ├── const # 应用常量和枚举
23
+ ├── envs # 环境变量定义和校验(分析、认证、LLM 等)
24
+ ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
25
+ ├── helpers # 工具辅助函数,用于工具工程、占位符解析等
26
+ ├── hooks # 全应用复用自定义的工具 Hooks
27
+ ├── layout # 应用的布局组件,如导航栏、侧边栏等
28
+ ├── libs # 第三方集成(分析、OIDC 等)
29
+ ├── locales # 国际化的语言文件
30
+ ├── server # 服务端模块和服务
31
+ ├── services # 封装的后端服务接口,如 HTTP 请求
32
+ ├── store # 用于状态管理的 zustand store
33
+ ├── styles # 全局样式和 CSS-in-JS 配置
34
+ ├── tools # 内置工具(artifacts、inspectors、interventions 等)
35
+ ├── types # TypeScript 的类型定义文件
36
+ ├── utils # 通用的工具函数
37
+ ├── auth.ts # 认证配置(Better Auth)
38
+ ├── instrumentation.ts # 应用监控和遥测设置
39
+ ├── instrumentation.node.ts # Node.js 专用的 instrumentation
40
+ └── proxy.ts # Next.js 中间件代理配置
32
41
  ```
33
42
 
34
43
  ## app
@@ -101,7 +101,6 @@ S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}
101
101
  S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
102
102
  S3_ENDPOINT=http://localhost:${MINIO_PORT}
103
103
  S3_BUCKET=${MINIO_LOBE_BUCKET}
104
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
105
104
  S3_ENABLE_PATH_STYLE=1 # Required for MinIO
106
105
  S3_SET_ACL=0 # MinIO compatibility
107
106
  ```
@@ -101,7 +101,6 @@ S3_ACCESS_KEY_ID=${MINIO_ROOT_USER}
101
101
  S3_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD}
102
102
  S3_ENDPOINT=http://localhost:${MINIO_PORT}
103
103
  S3_BUCKET=${MINIO_LOBE_BUCKET}
104
- S3_PUBLIC_DOMAIN=http://localhost:${MINIO_PORT}
105
104
  S3_ENABLE_PATH_STYLE=1 # MinIO 必需
106
105
  S3_SET_ACL=0 # MinIO 兼容性
107
106
  ```
@@ -34,18 +34,25 @@ The folder directory structure of LobeHub is as follows:
34
34
 
35
35
  ```bash
36
36
  src
37
- ├── app # Code related to the main logic and state management of the application
38
- ├── components # Reusable UI components
39
- ├── config # Application configuration files, including client and server environment variables
40
- ├── const # Used to define constants, such as action types, route names, etc.
41
- ├── features # Business-related feature modules, such as Agent settings, plugin development pop-ups, etc.
42
- ├── hooks # Custom utility Hooks reusable across the application
43
- ├── layout # Application layout components, such as navigation bars, sidebars, etc.
44
- ├── locales # Language files for internationalization
45
- ├── services # Encapsulated backend service interfaces, such as HTTP requests
46
- ├── store # Zustand store for state management
47
- ├── types # TypeScript type definition files
48
- └── utils # General utility functions
37
+ ├── app # Next.js App Router implementation with route groups and API routes
38
+ ├── business # Business logic modules (client and server)
39
+ ├── components # Reusable UI components
40
+ ├── config # Application configuration files, including client and server environment variables
41
+ ├── const # Application constants and enums
42
+ ├── envs # Environment variable definitions and validation (analytics, auth, llm, etc.)
43
+ ├── features # Business-related feature modules, such as Agent settings, plugin development pop-ups, etc.
44
+ ├── helpers # Utility helpers for tool engineering, placeholder parsing, etc.
45
+ ├── hooks # Custom utility Hooks reusable across the application
46
+ ├── layout # Application layout components, such as navigation bars, sidebars, etc.
47
+ ├── libs # Third-party integrations (analytics, OIDC, etc.)
48
+ ├── locales # Language files for internationalization
49
+ ├── server # Server-side modules and services
50
+ ├── services # Encapsulated backend service interfaces, such as HTTP requests
51
+ ├── store # Zustand store for state management
52
+ ├── styles # Global styles and CSS-in-JS configurations
53
+ ├── tools # Built-in tools (artifacts, inspectors, interventions, etc.)
54
+ ├── types # TypeScript type definition files
55
+ └── utils # General utility functions
49
56
  ```
50
57
 
51
58
  For a detailed introduction to the directory structure, see: [Folder Directory Structure](/docs/development/basic/folder-structure)
@@ -32,18 +32,25 @@ LobeHub 的文件夹目录架构如下:
32
32
 
33
33
  ```bash
34
34
  src
35
- ├── app # 应用主要逻辑和状态管理相关的代码
36
- ├── components # 可复用的 UI 组件
37
- ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
38
- ├── const # 用于定义常量,如 action 类型、路由名等
39
- ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
40
- ├── hooks # 全应用复用自定义的工具 Hooks
41
- ├── layout # 应用的布局组件,如导航栏、侧边栏等
42
- ├── locales # 国际化的语言文件
43
- ├── services # 封装的后端服务接口,如 HTTP 请求
44
- ├── store # 用于状态管理的 zustand store
45
- ├── types # TypeScript 的类型定义文件
46
- └── utils # 通用的工具函数
35
+ ├── app # Next.js App Router 实现,包含路由组和 API 路由
36
+ ├── business # 业务逻辑模块(客户端和服务端)
37
+ ├── components # 可复用的 UI 组件
38
+ ├── config # 应用的配置文件,包含客户端环境变量与服务端环境变量
39
+ ├── const # 应用常量和枚举
40
+ ├── envs # 环境变量定义和校验(分析、认证、LLM 等)
41
+ ├── features # 与业务功能相关的功能模块,如 Agent 设置、插件开发弹窗等
42
+ ├── helpers # 工具辅助函数,用于工具工程、占位符解析等
43
+ ├── hooks # 全应用复用自定义的工具 Hooks
44
+ ├── layout # 应用的布局组件,如导航栏、侧边栏等
45
+ ├── libs # 第三方集成(分析、OIDC 等)
46
+ ├── locales # 国际化的语言文件
47
+ ├── server # 服务端模块和服务
48
+ ├── services # 封装的后端服务接口,如 HTTP 请求
49
+ ├── store # 用于状态管理的 zustand store
50
+ ├── styles # 全局样式和 CSS-in-JS 配置
51
+ ├── tools # 内置工具(artifacts、inspectors、interventions 等)
52
+ ├── types # TypeScript 的类型定义文件
53
+ └── utils # 通用的工具函数
47
54
  ```
48
55
 
49
56
  有关目录架构的详细介绍,详见: [文件夹目录架构](/zh/docs/development/basic/folder-structure)
@@ -39,8 +39,6 @@ We need to configure an S3 storage service in the server-side database to store
39
39
  S3_BUCKET=LobeHub
40
40
  # Request endpoint of the bucket (note that the path in this link includes the bucket name, which must be removed, or use the link provided on the page for applying S3 API token)
41
41
  S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
42
- # Access domain of the bucket
43
- S3_PUBLIC_DOMAIN=https://s3-for-LobeHub.your-domain.com
44
42
  ```
45
43
 
46
44
  <Callout type={'warning'}>
@@ -118,9 +116,6 @@ S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f4
118
116
  S3_BUCKET=LobeHub
119
117
  # Bucket Request Endpoint
120
118
  S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
121
- # Public Access Domain for the Bucket
122
- S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com
123
-
124
119
  # Bucket Region, such as us-west-1. Generally not required, but some service providers may need it.
125
120
  # S3_REGION=us-west-1
126
121
  ```
@@ -40,8 +40,6 @@ tags:
40
40
  S3_BUCKET=LobeHub
41
41
  # 存储桶的请求端点(注意此处链接的路径带存储桶名称,必须删除该路径,或使用申请 S3 API token 页面所提供的链接)
42
42
  S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
43
- # 存储桶对外的访问域名
44
- S3_PUBLIC_DOMAIN=https://s3-for-LobeHub.your-domain.com
45
43
  ```
46
44
 
47
45
  <Callout type={'warning'}>`S3_ENDPOINT`必须删除其路径,否则会无法访问所上传文件</Callout>
@@ -115,9 +113,6 @@ S3_SECRET_ACCESS_KEY=55af75d8eb6b99f189f6a35f855336ea62cd9c4751a5cf4337c53c1d3f4
115
113
  S3_BUCKET=LobeHub
116
114
  # 存储桶的请求端点
117
115
  S3_ENDPOINT=https://0b33a03b5c993fd2f453379dc36558e5.r2.cloudflarestorage.com
118
- # 存储桶对外的访问域名
119
- S3_PUBLIC_DOMAIN=https://s3-dev.your-domain.com
120
-
121
116
  # 桶的区域,如 us-west-1,一般来说不需要添加,但某些服务商则需要配置
122
117
  # S3_REGION=us-west-1
123
118
  ```
@@ -135,8 +135,6 @@ We need to configure an S3-compatible storage service in the server-side databas
135
135
  S3_ENDPOINT=https://lobe-s3-api.example.com
136
136
  # Bucket name
137
137
  S3_BUCKET=lobe
138
- # Public domain for accessing the bucket
139
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
140
138
  S3_ENABLE_PATH_STYLE=1
141
139
  ```
142
140
  </Steps>
@@ -135,8 +135,6 @@ tags:
135
135
  S3_ENDPOINT=https://lobe-s3-api.example.com
136
136
  # 存储桶的名称
137
137
  S3_BUCKET=lobe
138
- # 存储桶对外的访问域名
139
- S3_PUBLIC_DOMAIN=https://lobe-s3-api.example.com
140
138
  S3_ENABLE_PATH_STYLE=1
141
139
  ```
142
140
  </Steps>
@@ -39,7 +39,6 @@ We need to configure S3 storage service for file storage in the server-side data
39
39
  S3_BUCKET=lobe-130xxxxxx2
40
40
  S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
41
41
  S3_REGION=ap-chengdu
42
- S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
43
42
  ```
44
43
 
45
44
  <Callout type={'warning'}>
@@ -40,8 +40,6 @@ tags:
40
40
  S3_ENDPOINT=https://cos.ap-chengdu.myqcloud.com
41
41
  # 桶的区域
42
42
  S3_REGION=ap-chengdu
43
- # 存储桶对外的访问域名
44
- S3_PUBLIC_DOMAIN=https://lobe-1251234567.cos.ap-chengdu.myqcloud.com
45
43
  ```
46
44
 
47
45
  <Callout type={'warning'}>
@@ -50,15 +50,6 @@ The best practice in this area is to use a file storage service (S3) to store im
50
50
 
51
51
  Whether to set the ACL to `public-read` when uploading files. This option is enabled by default. If the service provider does not support setting individual ACLs for files (i.e., all files inherit the ACL of the storage bucket), enabling this option may cause request errors. Set `S3_SET_ACL` to `0` to disable it.
52
52
 
53
- ### `S3_PUBLIC_DOMAIN`
54
-
55
- The public access domain of the storage bucket, used to access files in the storage bucket. This address needs to be **publicly readable**. The reason is that when OpenAI's gpt-4o and other vision models recognize images, OpenAI will try to download this image link on their servers. Therefore, this link must be publicly accessible. If it is a private link, OpenAI will not be able to access the image and thus will not be able to recognize the image content properly.
56
-
57
- <Callout type={'warning'}>
58
- Additionally, since this access domain is often a separate URL, it needs to be configured to allow
59
- cross-origin access to the site. Otherwise, cross-origin issues will occur in the browser.
60
- </Callout>
61
-
62
53
  ### `S3_ENABLE_PATH_STYLE`
63
54
 
64
55
  Whether to enable the `path-style` access mode of S3. This option is disabled by default. If your S3 service provider uses `path-style`, set `S3_ENABLE_PATH_STYLE` to `1` to enable it.
@@ -46,14 +46,6 @@ LobeHub 在 [很早以前](https://x.com/lobehub/status/1724289575672291782) 就
46
46
 
47
47
  是否在上传文件时设置 ACL 为 `public-read`。该选项默认启用。如果服务商不支持为文件设置单独的 ACL(即所有文件继承存储桶的 ACL),启用此选项可能会导致请求错误,将 `S3_SET_ACL` 设置为 `0` 即可关闭。
48
48
 
49
- ### `S3_PUBLIC_DOMAIN`
50
-
51
- 存储桶对外的访问域名,用于访问存储桶中的文件,这个地址需要**允许互联网可读**。 原因是 OpenAI 的 gpt-4o 等视觉模型识别图片时,OpenAI 会尝试在他们的服务器中下载这个图片链接,因此这个链接必须是公开可访问的,如果是私有的链接,OpenAI 将无法访问到这个图片,进而无法正常识别到图片内容。
52
-
53
- <Callout type={'warning'}>
54
- 此外,由于该访问域名往往是一个独立的网址,因此需要配置允许站点的跨域访问,否则会在浏览器中出现跨域问题。
55
- </Callout>
56
-
57
49
  ### `S3_ENABLE_PATH_STYLE`
58
50
 
59
51
  是否启用 S3 的 `path-style` 访问模式。此选项默认禁用。如果您的 S3 服务提供商使用 `path-style`,请将 `S3_ENABLE_PATH_STYLE` 设置为 `1` 以启用它。
@@ -58,13 +58,6 @@ LobeHub supports multimodal AI sessions, including the ability to upload unstruc
58
58
  - Default: `1`
59
59
  - Example: `0`
60
60
 
61
- ### `S3_PUBLIC_DOMAIN`
62
-
63
- - Type: Required
64
- - Description: Public access domain for the bucket, used to access files in the bucket
65
- - Default: -
66
- - Example: `https://files.example.com`
67
-
68
61
  ### `S3_ENABLE_PATH_STYLE`
69
62
 
70
63
  - Type: Optional
@@ -56,13 +56,6 @@ LobeHub 支持多模态的 AI 会话,包括将图片、文件等非结构化
56
56
  - 默认值:`1`
57
57
  - 示例:`0`
58
58
 
59
- ### `S3_PUBLIC_DOMAIN`
60
-
61
- - 类型:必填
62
- - 描述:存储桶对外的访问域名,用于访问存储桶中的文件
63
- - 默认值:-
64
- - 示例:`https://files.example.com`
65
-
66
59
  ### `S3_ENABLE_PATH_STYLE`
67
60
 
68
61
  - 类型:可选
@@ -281,7 +281,6 @@ Now, we will introduce the necessary configurations for running these services:
281
281
  LobeHub needs to provide a public access URL for object files for the LLM service provider, so you need to configure the S3 Endpoint:
282
282
 
283
283
  ```env
284
- S3_PUBLIC_DOMAIN=https://s3.example.com
285
284
  S3_ENDPOINT=https://s3.example.com
286
285
  ```
287
286