sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

@@ -1,6 +1,7 @@
"""Gateway 进程的本机绑定配置。
目前唯一字段是 ``port``——Gateway FastAPI 的监听端口。圆桌三路由
``port`` 是 Gateway FastAPI 的监听端口;``enable_docs`` 控制 Swagger UI、
ReDoc 和 OpenAPI 端点是否注册。圆桌三路由
(intent / recommend / multi_agent) 内部用 loopback 调本机的其它 endpoint
(``/api/threads``、``/api/agents`` 等),需要知道这个端口才能拼出 base URL。
@@ -19,6 +20,7 @@
gateway:
port: 9999 # 默认 8001;部署机改了 gateway 端口时改这里
enable_docs: true # 启用 /docs、/redoc、/openapi.json
只想临时改一次(不动 yaml)→ 设环境变量:
@@ -33,7 +35,7 @@ from pydantic import BaseModel, Field
class GatewayConfig(BaseModel):
"""Gateway 本机 loopback 端口配置。"""
"""Gateway 本机监听与 API 文档配置。"""
port: int = Field(
default=8001,
@@ -44,3 +46,7 @@ class GatewayConfig(BaseModel):
"``http://127.0.0.1:<port>``。默认 8001(与 Makefile/scripts/start-all.sh 对齐)。"
),
)
enable_docs: bool = Field(
default=True,
description="是否注册 Swagger UI(/docs)、ReDoc(/redoc) 和 OpenAPI(/openapi.json)。",
)