From 0c9533b41ec42cb535ef693f51b81634cdc73a93 Mon Sep 17 00:00:00 2001 From: xbsheng Date: Wed, 4 Mar 2026 22:50:26 +0800 Subject: [PATCH] refactor: use START constant instead of "__start__" literal --- src/agent/graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/graph.py b/src/agent/graph.py index cd3bd38..7dc2dce 100644 --- a/src/agent/graph.py +++ b/src/agent/graph.py @@ -8,7 +8,7 @@ from dataclasses import dataclass from typing import Any, Dict -from langgraph.graph import StateGraph +from langgraph.graph import START, StateGraph from langgraph.runtime import Runtime from typing_extensions import TypedDict @@ -49,6 +49,6 @@ async def call_model(state: State, runtime: Runtime[Context]) -> Dict[str, Any]: graph = ( StateGraph(State, context_schema=Context) .add_node(call_model) - .add_edge("__start__", "call_model") + .add_edge(START, "call_model") .compile(name="New Graph") )