feat: support multiple extra LangSmith trace projects in SDK#8110
Open
Mason Daugherty (mdrxy) wants to merge 1 commit into
Open
feat: support multiple extra LangSmith trace projects in SDK#8110Mason Daugherty (mdrxy) wants to merge 1 commit into
Mason Daugherty (mdrxy) wants to merge 1 commit into
Conversation
Add an optional `project_names: list[str]` field to the `LangSmithTracing` TypedDict so callers can request multiple extra trace replica projects on a run, while keeping the singular `project_name` field working as before. The Python SDK passes the tracing config straight through as `langsmith_tracer`, so backward compatibility is preserved. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
| @@ -112,7 +112,13 @@ class LangSmithTracing(TypedDict, total=False): | |||
| """Configuration for LangSmith tracing.""" | |||
|
|
|||
| project_name: str | |||
Collaborator
There was a problem hiding this comment.
str | list[str]? so we don't break
Member
Author
There was a problem hiding this comment.
I think keeping project_name: str unchanged is the backward-compatible path. The new multi-project field is project_names: list[str]; the server-side change normalizes/dedupes project_name and project_names. Typing project_name as str | list[str] would imply the server accepts a list under the existing singular key, which isn’t the intended API shape unless we also support that server-side.
Collaborator
There was a problem hiding this comment.
fwiw i thought this was deleted i just can't see
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LangGraph Python SDK:
langsmith_tracingnow acceptsproject_namesto trace a run to multiple extra LangSmith projects.Adds an optional
project_names: list[str]field to theLangSmithTracingTypedDict so callers can request multiple extra LangSmith trace replica projects on a run. The singularproject_namefield is unchanged and continues to work.The SDK already forwards
langsmith_tracingdirectly aslangsmith_tracer, so this PR is a schema/documentation + test coverage change for the Python SDK pass-through behavior and is fully backward compatible.Note: this SDK change depends on the corresponding server-side
langgraph-apichange to normalize/dedupeproject_nameandproject_namesand fan out traces to multiple projects. That server-side change, as well as JS LangSmith tracing support, lives outside this public repo.