Skip to content

The agent engineering platform.

core: Cache RunnableLambda deps (#29200)

Christophe Bornet618e550f062e
diff --git a/libs/core/langchain_core/runnables/base.py b/libs/core/langchain_core/runnables/base.py
index 4ad7c04a73..9942174103 100644
--- a/libs/core/langchain_core/runnables/base.py
+++ b/libs/core/langchain_core/runnables/base.py
@@ -4457,7 +4457,7 @@ class RunnableLambda(Runnable[Input, Output]):
module_name=module,
)
- @property
+ @functools.cached_property
def deps(self) -> list[Runnable]:
"""The dependencies of this Runnable.