Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/tall-jeans-drop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@langchain/core": patch
---

handle missing parent runs in tracer to prevent LangSmith 400 errors
5 changes: 5 additions & 0 deletions langchain-core/src/tracers/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ export abstract class BaseTracer extends BaseCallbackHandler {
// console.debug(
// `Parent run with UUID ${storedRun.parent_run_id} not found.`
// );

// Child run with no trace_id and dotted_order causes 400 error on LangSmith.
// So we set the parent_run_id to undefined as a workaround.
// This run will be shown as isolated run on LangSmith.
storedRun.parent_run_id = undefined;
}
} else {
storedRun.trace_id = storedRun.id;
Expand Down