diff --git a/python/langsmith/client.py b/python/langsmith/client.py index bd31974d4..1accdbf9b 100644 --- a/python/langsmith/client.py +++ b/python/langsmith/client.py @@ -729,6 +729,7 @@ def create_run( ls_utils.get_tracer_project(), ), ) + revision_id = kwargs.pop("revision_id", None) run_create = { **kwargs, "session_name": project_name, @@ -747,6 +748,8 @@ def create_run( metadata.update( {k: v for k, v in langchain_metadata.items() if k not in metadata} ) + if revision_id is not None: + metadata["revision_id"] = revision_id run_extra["runtime"] = {**runtime_env, **runtime} headers = { **self._headers,