mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 12:47:53 +02:00
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:
co-authored by
Simon Moxon
Vadym Barda
parent
a93f17e624
commit
a008725c06
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user