Skip to content

Commit 3bba443

Browse files
patch[python, js]: Update runs with project name (#1659)
Currently, patch requests don't carry information about the project they are associated with. This causes upstream issues on ingestion when the patch is sent separately and we don't know the trace tier of the project, and thus, assign it the default tracing project tier. The result of this is that we upgrade the s3 urls post ingestion API: resulting in higher storage costs and an increase in class A operations.
1 parent 68e0231 commit 3bba443

File tree

6 files changed

+6
-3
lines changed

6 files changed

+6
-3
lines changed

js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "langsmith",
3-
"version": "0.3.15",
3+
"version": "0.3.16",
44
"description": "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform.",
55
"packageManager": "[email protected]",
66
"files": [

js/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ export { RunTree, type RunTreeConfig } from "./run_trees.js";
1818
export { overrideFetchImplementation } from "./singletons/fetch.js";
1919

2020
// Update using yarn bump-version
21-
export const __version__ = "0.3.15";
21+
export const __version__ = "0.3.16";

js/src/run_trees.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ export class RunTree implements BaseRun {
422422
trace_id: this.trace_id,
423423
tags: this.tags,
424424
attachments: this.attachments,
425+
session_name: this.project_name,
425426
};
426427

427428
await this.client.updateRun(this.id, runUpdate);

js/src/schemas.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ export interface RunUpdate {
231231
reference_example_id?: string;
232232
events?: KVMap[];
233233
session_id?: string;
234+
session_name?: string;
234235
/** Unique ID assigned to every run within this nested trace. **/
235236
trace_id?: string;
236237

python/langsmith/run_trees.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ def patch(self) -> None:
367367
outputs=self.outputs.copy() if self.outputs else None,
368368
error=self.error,
369369
parent_run_id=self.parent_run_id,
370+
session_name=self.session_name,
370371
reference_example_id=self.reference_example_id,
371372
end_time=self.end_time,
372373
dotted_order=self.dotted_order,

python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "langsmith"
3-
version = "0.3.30"
3+
version = "0.3.31"
44
description = "Client library to connect to the LangSmith LLM Tracing and Evaluation Platform."
55
authors = ["LangChain <[email protected]>"]
66
license = "MIT"

0 commit comments

Comments
 (0)