Skip to content

Bring the TypeScript LangSmith plugin to parity with Python - #457

Merged
patbeqo merged 6 commits into
mainfrom
patbeqo/langsmith-ts-parity
Nov 13, 2026
Merged

patbeqo merged 6 commits into
mainfrom
patbeqo/langsmith-ts-parity

Conversation

@patbeqo

@patbeqo patbeqo commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #314. Brings the TypeScript LangSmith plugin in line with the Python plugin.

What changed

  • Same runs as Python. Plugin runs record no Temporal arguments or results, end with {status}, and treat continue-as-new and cancellation as statuses, not errors. Errors read ClassName: message, and Nexus handler runs are tool runs.
  • Same trace shape. Client markers span their call and record its error. Update-with-start propagates to the update, signals nest beside their marker, and runs carry Temporal ID metadata and the plugin's tags. Metadata is no longer scrubbed.
  • Replay-safe IDs and times. Workflow run IDs are UUIDv7 from Workflow time and the plugin's random stream; queries and validators get random IDs. Start and end times come from the Worker's clock when live.
  • Ordered, logged writes. An update can't reach LangSmith before its create, and failed writes are logged.
  • ESM Workflows are traced. langsmith imports in the Workflow bundle resolve to the patched CommonJS build.
  • A propagated parent keeps tracing on when LANGSMITH_TRACING is off, like Python.
  • Fails loudly when LangSmith changes. Worker setup fails if a patched RunTree method is missing.

Plugin run inputs no longer include Temporal arguments, which changes what existing users see in LangSmith.

Not in this PR

  • langsmith 0.11 support. The address option breaks on 0.11 and needs its own change.
  • LangChain and LangGraph inside Workflows, until a TypeScript LangGraph plugin exists.

Testing

  • pnpm run lint and pnpm test pass (176 tests).
  • Each new test fails when its change is reverted.

@patbeqo
patbeqo force-pushed the patbeqo/langsmith-ts-parity branch from b246b2b to 21350ee Compare November 10, 2026 16:20
@patbeqo
patbeqo marked this pull request as ready for review November 10, 2026 16:59
@patbeqo
patbeqo requested a review from a team as a code owner November 10, 2026 16:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T17:02:09.615194Z 7348b3e Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7348b3efbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread typescript/langsmith/src/sinks.ts Resolved
@campoy
campoy requested a review from xumaple November 13, 2026 21:11
Plugin runs record no Temporal arguments or results and end with a status, continue-as-new and cancellation are not errors, and client markers span their call. Update-with-start propagates to the update, signals nest like Python, runs carry Temporal ID metadata and the plugin's tags, and a propagated parent keeps tracing on when LANGSMITH_TRACING is off. Run IDs and timestamps follow Python's replay rules, and the LangChain sandbox support moves out until a TypeScript LangGraph plugin exists.
Both plugins queue writes in front of the LangSmith client, so the flush on Worker shutdown could run before queued writes reached the client. TypeScript now drains its sink queue first, and Python runs the flush on its write thread after pending writes.

In TypeScript Workflows, a child built with `new RunTree({ parent_run })` from an untraced run is now untraced too, like one built with createChild.
The deprecated activityInbound list is only kept for compatibility, and
OpenAIAgentsPlugin rebuilds the Worker interceptors without it, which
dropped LangSmith's Activity runs. Registering on activity keeps the
interceptor when another plugin rebuilds the list.
@patbeqo
patbeqo force-pushed the patbeqo/langsmith-ts-parity branch from de88e75 to e062b8b Compare November 13, 2026 23:03
@patbeqo
patbeqo enabled auto-merge (squash) November 13, 2026 23:05
@patbeqo
patbeqo merged commit 032c8c0 into main Nov 13, 2026
19 checks passed
@patbeqo
patbeqo deleted the patbeqo/langsmith-ts-parity branch November 13, 2026 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants