langchain-ai/langgraph · error · LangGraphDeprecatedSinceV05
`retry` is deprecated and will be removed. Please use `retry
Error message
`retry` is deprecated and will be removed. Please use `retry_policy` instead.
What it means
Error "`retry` is deprecated and will be removed. Please use `retry_policy` instead." thrown in langchain-ai/langgraph.
Source
Thrown at libs/langgraph/langgraph/graph/state.py:762
graph.invoke({"x": 1})
# {'x': 2}
```
Example: Customize the name:
```python
builder = StateGraph(State)
builder.add_node("my_fair_node", my_node)
builder.add_edge(START, "my_fair_node")
graph = builder.compile()
graph.invoke({"x": 1})
# {'x': 2}
```
Returns:
Self: The instance of the `StateGraph`, allowing for method chaining.
"""
if (retry := kwargs.get("retry", MISSING)) is not MISSING:
warnings.warn(
"`retry` is deprecated and will be removed. Please use `retry_policy` instead.",
category=LangGraphDeprecatedSinceV05,
)
if retry_policy is None:
retry_policy = retry # type: ignore[assignment]
if (input_ := kwargs.get("input", MISSING)) is not MISSING:
warnings.warn(
"`input` is deprecated and will be removed. Please use `input_schema` instead.",
category=LangGraphDeprecatedSinceV05,
)
if input_schema is None:
input_schema = cast(type[NodeInputT] | None, input_)
timeout = coerce_timeout_policy(timeout)
if not isinstance(node, str):
action = node
if isinstance(action, Runnable):View on GitHub (pinned to 38031739e5)
When it happens
Trigger: Thrown at libs/langgraph/langgraph/graph/state.py:762 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of langchain-ai/langgraph@38031739e5 (2026-08-26).
Data as JSON: /api/errors/d0ef59950d578157.
Report an issue: GitHub.