B-65: create_analysis_graph() 编译时带 MemorySaver(),ainvoke 未传 config 导致 "ValueError: Expected a thread_id to be passed to the checkpointer", POST /api/v1/analyze 500。改为把调用内生成的 trace_id 作为 thread_id 传入, 保持 MemorySaver 有状态设计不变。
@@ -41,5 +41,5 @@ async def analyze(req: AnalyzeRequest):
"dimension_scores": None,
"analysis": None,
"recommendations": [],
- })
+ }, config={"configurable": {"thread_id": trace_id}})
return AnalyzeResponse(analysis=result.get("analysis", ""), trace_id=trace_id)