The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs(langchain): clarify `ToolRetryMiddleware` exception handling (#38884)
ccurmea4538dbf07b6
diff --git a/libs/langchain_v1/langchain/agents/middleware/tool_retry.py b/libs/langchain_v1/langchain/agents/middleware/tool_retry.pyindex 87e2095617..aa7f713f9b 100644--- a/libs/langchain_v1/langchain/agents/middleware/tool_retry.py+++ b/libs/langchain_v1/langchain/agents/middleware/tool_retry.py@@ -152,7 +152,8 @@ class ToolRetryMiddleware(AgentMiddleware[AgentState[ResponseT], ContextT, Resporetry_on: Either a tuple of exception types to retry on, or a callablethat takes an exception and returns `True` if it should be retried.- Default is to retry on all exceptions.+ Default is to retry on all exceptions. Exceptions that do not match+ propagate immediately and are not handled by `on_failure`.on_failure: Behavior when all retries are exhausted.Options: