From e70a2919dd211adccc8feb639f800f8f2c7e39a5 Mon Sep 17 00:00:00 2001 From: root <953994191@qq.com> Date: Wed, 6 May 2026 15:21:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=EF=BC=9A=E5=90=8C=E6=97=B6?= =?UTF-8?q?=E6=B3=A8=E5=86=8C=E6=96=B0=E6=97=A7=E8=B7=AF=E5=BE=84=E5=88=B0?= =?UTF-8?q?=20allowed=5Fmsgpack=5Fmodules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 避免旧 checkpoint 反序列化时出现警告 --- backend/app/agent/agent_service.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/backend/app/agent/agent_service.py b/backend/app/agent/agent_service.py index 9d0f59a..376c6a1 100644 --- a/backend/app/agent/agent_service.py +++ b/backend/app/agent/agent_service.py @@ -33,6 +33,7 @@ def create_serde() -> JsonPlusSerializer: return JsonPlusSerializer( allowed_msgpack_modules=[ + # 新路径 ("backend.app.core.intent", "ReasoningAction"), ("backend.app.core.intent", "RetrievalConfig"), ("backend.app.core.intent", "ReasoningResult"), @@ -43,6 +44,17 @@ def create_serde() -> JsonPlusSerializer: ("backend.app.main_graph.state", "HybridRouterState"), ("backend.app.main_graph.state", "FastPathState"), ("backend.app.main_graph.nodes.hybrid_router", "HybridRouterResult"), + # 旧路径(兼容旧 checkpoint 数据) + ("app.core.intent", "ReasoningAction"), + ("app.core.intent", "RetrievalConfig"), + ("app.core.intent", "ReasoningResult"), + ("app.main_graph.state", "CurrentAction"), + ("app.main_graph.state", "ErrorSeverity"), + ("app.main_graph.state", "ErrorRecord"), + ("app.main_graph.state", "ReactReasoningState"), + ("app.main_graph.state", "HybridRouterState"), + ("app.main_graph.state", "FastPathState"), + ("app.main_graph.nodes.hybrid_router", "HybridRouterResult"), ] )