diff --git a/libs/langgraph/langgraph/pregel/_read.py b/libs/langgraph/langgraph/pregel/_read.py index f51f988a7..9effaf391 100644 --- a/libs/langgraph/langgraph/pregel/_read.py +++ b/libs/langgraph/langgraph/pregel/_read.py @@ -45,6 +45,7 @@ def _validate_traceable_config(raw: Any) -> TraceableConfig | None: "process_inputs": raw.get("process_inputs"), "process_outputs": raw.get("process_outputs"), "enabled": raw.get("enabled"), # None means use external context + "wrapped": raw.get("wrapped"), } @@ -249,11 +250,6 @@ class PregelNode: config = _validate_traceable_config(raw_config) if config is None: return None - - unwrapped = getattr(func, "__wrapped__", None) - if unwrapped: - config["__unwrapped__"] = unwrapped - return config @cached_property diff --git a/libs/langgraph/tests/test_traceable_integration.py b/libs/langgraph/tests/test_traceable_integration.py index be056e509..0e93dde69 100644 --- a/libs/langgraph/tests/test_traceable_integration.py +++ b/libs/langgraph/tests/test_traceable_integration.py @@ -50,6 +50,7 @@ def _set_traceable_config( "process_inputs": process_inputs, "process_outputs": process_outputs, "enabled": enabled, + "wrapped": func, }, ) return func