Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix(web): 个人版不注册 /api/sessions compat 路由,避免走到企业版 history_store

chen hui2a435fd19577
diff --git a/jiuwenswarm/gateway/channel_manager/web/web_http_sessions_compat.py b/jiuwenswarm/gateway/channel_manager/web/web_http_sessions_compat.py
index 0f7ec6db9f..8236a03ca5 100644
--- a/jiuwenswarm/gateway/channel_manager/web/web_http_sessions_compat.py
+++ b/jiuwenswarm/gateway/channel_manager/web/web_http_sessions_compat.py
@@ -21,7 +21,16 @@ logger = logging.getLogger(__name__)
def register_sessions_compat_routes(app: FastAPI) -> None:
- """Mount ``GET /api/sessions`` and ``GET /api/sessions/{session_id}``."""
+ """Mount ``GET /api/sessions`` and ``GET /api/sessions/{session_id}``.
+
+ Enterprise only:``/api/sessions*``(无 ``/api/v1`` 前缀)走 ``ChatHistoryStore``;
+ 个人版不注册(``/api/v1/sessions`` 走 ``session_metadata`` JSON 文件方案)。
+ """
+ if not is_enterprise():
+ logger.debug(
+ "[WebHTTP] skip enterprise history compat routes (not enterprise edition)"
+ )
+ return
@app.get(
"/api/sessions",