Ensure remote respects recursion_limit param if it's passed (#3470)

Currently when using RemoteGraph the recursion_limit cannot be set, due
to the sanitize_config.

---------

Co-authored-by: Simon Moxon <simon@together.ly>
Co-authored-by: Vadym Barda <vadim.barda@gmail.com>
This commit is contained in:
Simon Moxon
2025-02-18 17:49:31 +00:00
committed by GitHub
co-authored by Simon Moxon Vadym Barda
parent a93f17e624
commit a008725c06
+5 -1
View File
@@ -323,11 +323,15 @@ class RemoteGraph(PregelProtocol):
if k not in reserved_configurable_keys and not k.startswith("__pregel_")
}
return {
sanitized: RunnableConfig = {
"tags": config.get("tags") or [],
"metadata": config.get("metadata") or {},
"configurable": new_configurable,
}
if "recursion_limit" in config:
sanitized["recursion_limit"] = config["recursion_limit"]
return sanitized
def get_state(
self, config: RunnableConfig, *, subgraphs: bool = False