langsmith 0.8.7 → 0.8.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/_openapi_client/client.cjs +8 -0
  2. package/dist/_openapi_client/client.d.ts +3 -0
  3. package/dist/_openapi_client/client.js +8 -0
  4. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.cjs +157 -0
  5. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.d.ts +382 -0
  6. package/dist/_openapi_client/resources/annotation-queues/annotation-queues.js +120 -0
  7. package/dist/_openapi_client/resources/annotation-queues/items.cjs +84 -0
  8. package/dist/_openapi_client/resources/annotation-queues/items.d.ts +207 -0
  9. package/dist/_openapi_client/resources/annotation-queues/items.js +80 -0
  10. package/dist/_openapi_client/resources/annotation-queues/runs.cjs +73 -0
  11. package/dist/_openapi_client/resources/annotation-queues/runs.d.ts +197 -0
  12. package/dist/_openapi_client/resources/annotation-queues/runs.js +69 -0
  13. package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +3 -1
  14. package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +2 -0
  15. package/dist/_openapi_client/resources/datasets/experiment-runs.js +3 -1
  16. package/dist/_openapi_client/resources/index.cjs +3 -1
  17. package/dist/_openapi_client/resources/index.d.ts +1 -0
  18. package/dist/_openapi_client/resources/index.js +1 -0
  19. package/dist/_openapi_client/resources/info.cjs +3 -1
  20. package/dist/_openapi_client/resources/info.d.ts +16 -22
  21. package/dist/_openapi_client/resources/info.js +3 -1
  22. package/dist/_openapi_client/resources/issues.cjs +2 -2
  23. package/dist/_openapi_client/resources/issues.d.ts +1 -1
  24. package/dist/_openapi_client/resources/issues.js +2 -2
  25. package/dist/_openapi_client/resources/online-evaluators.cjs +7 -7
  26. package/dist/_openapi_client/resources/online-evaluators.d.ts +8 -0
  27. package/dist/_openapi_client/resources/online-evaluators.js +7 -7
  28. package/dist/_openapi_client/resources/public/runs.cjs +10 -8
  29. package/dist/_openapi_client/resources/public/runs.d.ts +9 -7
  30. package/dist/_openapi_client/resources/public/runs.js +10 -8
  31. package/dist/_openapi_client/resources/runs/runs.cjs +14 -9
  32. package/dist/_openapi_client/resources/runs/runs.d.ts +20 -10
  33. package/dist/_openapi_client/resources/runs/runs.js +14 -9
  34. package/dist/_openapi_client/resources/runs/share.cjs +6 -2
  35. package/dist/_openapi_client/resources/runs/share.d.ts +4 -0
  36. package/dist/_openapi_client/resources/runs/share.js +6 -2
  37. package/dist/_openapi_client/resources/sandboxes/boxes.cjs +10 -10
  38. package/dist/_openapi_client/resources/sandboxes/boxes.d.ts +40 -0
  39. package/dist/_openapi_client/resources/sandboxes/boxes.js +10 -10
  40. package/dist/_openapi_client/resources/sandboxes/registries.cjs +5 -5
  41. package/dist/_openapi_client/resources/sandboxes/registries.js +5 -5
  42. package/dist/_openapi_client/resources/sandboxes/sandboxes.d.ts +17 -0
  43. package/dist/_openapi_client/resources/sandboxes/snapshots.cjs +4 -4
  44. package/dist/_openapi_client/resources/sandboxes/snapshots.d.ts +12 -0
  45. package/dist/_openapi_client/resources/sandboxes/snapshots.js +4 -4
  46. package/dist/_openapi_client/resources/threads.cjs +14 -11
  47. package/dist/_openapi_client/resources/threads.d.ts +13 -9
  48. package/dist/_openapi_client/resources/threads.js +14 -11
  49. package/dist/_openapi_client/resources/traces.cjs +8 -5
  50. package/dist/_openapi_client/resources/traces.d.ts +7 -4
  51. package/dist/_openapi_client/resources/traces.js +8 -5
  52. package/dist/client.cjs +318 -40
  53. package/dist/client.d.ts +111 -25
  54. package/dist/client.js +318 -40
  55. package/dist/evaluation/evaluate_comparative.cjs +7 -4
  56. package/dist/evaluation/evaluate_comparative.js +7 -4
  57. package/dist/index.cjs +1 -1
  58. package/dist/index.d.ts +1 -1
  59. package/dist/index.js +1 -1
  60. package/dist/sandbox/command_handle.cjs +38 -11
  61. package/dist/sandbox/command_handle.d.ts +1 -0
  62. package/dist/sandbox/command_handle.js +39 -12
  63. package/dist/sandbox/errors.cjs +16 -1
  64. package/dist/sandbox/errors.d.ts +11 -0
  65. package/dist/sandbox/errors.js +14 -0
  66. package/dist/sandbox/index.cjs +2 -1
  67. package/dist/sandbox/index.d.ts +1 -1
  68. package/dist/sandbox/index.js +1 -1
  69. package/dist/sandbox/sandbox.cjs +22 -4
  70. package/dist/sandbox/sandbox.js +24 -6
  71. package/dist/sandbox/ws_execute.cjs +82 -11
  72. package/dist/sandbox/ws_execute.d.ts +12 -2
  73. package/dist/sandbox/ws_execute.js +79 -11
  74. package/dist/utils/v2_migration.cjs +18 -0
  75. package/dist/utils/v2_migration.d.ts +8 -0
  76. package/dist/utils/v2_migration.js +16 -0
  77. package/dist/utils/warn.cjs +30 -4
  78. package/dist/utils/warn.d.ts +4 -1
  79. package/dist/utils/warn.js +29 -4
  80. package/package.json +1 -1
  81. package/dist/utils/constants.cjs +0 -4
  82. package/dist/utils/constants.d.ts +0 -1
  83. package/dist/utils/constants.js +0 -1
@@ -11,31 +11,31 @@ class Registries extends resource_js_1.APIResource {
11
11
  * Create a sandbox registry for pulling private images.
12
12
  */
13
13
  create(body, options) {
14
- return this._client.post('/v2/sandboxes/registries', { body, ...options });
14
+ return this._client.post('/api/v2/sandboxes/registries', { body, ...options });
15
15
  }
16
16
  /**
17
17
  * Get a sandbox registry by name.
18
18
  */
19
19
  retrieve(name, options) {
20
- return this._client.get((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, options);
20
+ return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, options);
21
21
  }
22
22
  /**
23
23
  * Update a sandbox registry's name and/or credentials.
24
24
  */
25
25
  update(name, body, options) {
26
- return this._client.patch((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, { body, ...options });
26
+ return this._client.patch((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, { body, ...options });
27
27
  }
28
28
  /**
29
29
  * List sandbox registries for pulling private images.
30
30
  */
31
31
  list(query = {}, options) {
32
- return this._client.get('/v2/sandboxes/registries', { query, ...options });
32
+ return this._client.get('/api/v2/sandboxes/registries', { query, ...options });
33
33
  }
34
34
  /**
35
35
  * Delete a sandbox registry by name.
36
36
  */
37
37
  delete(name, options) {
38
- return this._client.delete((0, path_js_1.path) `/v2/sandboxes/registries/${name}`, {
38
+ return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/registries/${name}`, {
39
39
  ...options,
40
40
  headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
41
41
  });
@@ -8,31 +8,31 @@ export class Registries extends APIResource {
8
8
  * Create a sandbox registry for pulling private images.
9
9
  */
10
10
  create(body, options) {
11
- return this._client.post('/v2/sandboxes/registries', { body, ...options });
11
+ return this._client.post('/api/v2/sandboxes/registries', { body, ...options });
12
12
  }
13
13
  /**
14
14
  * Get a sandbox registry by name.
15
15
  */
16
16
  retrieve(name, options) {
17
- return this._client.get(path `/v2/sandboxes/registries/${name}`, options);
17
+ return this._client.get(path `/api/v2/sandboxes/registries/${name}`, options);
18
18
  }
19
19
  /**
20
20
  * Update a sandbox registry's name and/or credentials.
21
21
  */
22
22
  update(name, body, options) {
23
- return this._client.patch(path `/v2/sandboxes/registries/${name}`, { body, ...options });
23
+ return this._client.patch(path `/api/v2/sandboxes/registries/${name}`, { body, ...options });
24
24
  }
25
25
  /**
26
26
  * List sandbox registries for pulling private images.
27
27
  */
28
28
  list(query = {}, options) {
29
- return this._client.get('/v2/sandboxes/registries', { query, ...options });
29
+ return this._client.get('/api/v2/sandboxes/registries', { query, ...options });
30
30
  }
31
31
  /**
32
32
  * Delete a sandbox registry by name.
33
33
  */
34
34
  delete(name, options) {
35
- return this._client.delete(path `/v2/sandboxes/registries/${name}`, {
35
+ return this._client.delete(path `/api/v2/sandboxes/registries/${name}`, {
36
36
  ...options,
37
37
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
38
38
  });
@@ -23,6 +23,9 @@ export interface SandboxResponse {
23
23
  delete_after_stop_seconds?: number;
24
24
  fs_capacity_bytes?: number;
25
25
  idle_ttl_seconds?: number;
26
+ labels?: {
27
+ [key: string]: string;
28
+ };
26
29
  mem_bytes?: number;
27
30
  mount_config?: SandboxResponse.MountConfig;
28
31
  name?: string;
@@ -314,6 +317,17 @@ export declare namespace SandboxResponse {
314
317
  name: string;
315
318
  aws?: Rule.Aws;
316
319
  enabled?: boolean;
320
+ /**
321
+ * EnvVars are plaintext env vars set for every command in the sandbox while this
322
+ * rule is enabled. Use them for tools that refuse to run unless a credential env
323
+ * var is present (e.g. gh needs GH_TOKEN) even though this rule injects the real
324
+ * credential on the wire — set a dummy value here so the command starts. Explicit
325
+ * per-sandbox env_vars win over these, and provider-managed (AWS/GCP) vars win
326
+ * over both.
327
+ */
328
+ env_vars?: {
329
+ [key: string]: string;
330
+ };
317
331
  gcp?: Rule.Gcp;
318
332
  headers?: Array<Rule.Header>;
319
333
  /**
@@ -383,6 +397,9 @@ export interface SnapshotResponse {
383
397
  fs_capacity_bytes?: number;
384
398
  fs_used_bytes?: number;
385
399
  image_digest?: string;
400
+ labels?: {
401
+ [key: string]: string;
402
+ };
386
403
  /**
387
404
  * MemorySnapshotSizeBytes is non-nil iff the snapshot was captured with VM memory
388
405
  * state. A non-nil value is the canonical signal that this snapshot can
@@ -11,26 +11,26 @@ class Snapshots extends resource_js_1.APIResource {
11
11
  * Create a snapshot from a Docker image (async build).
12
12
  */
13
13
  create(body, options) {
14
- return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
14
+ return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
15
15
  }
16
16
  /**
17
17
  * Get a sandbox snapshot by ID.
18
18
  */
19
19
  retrieve(snapshotID, options) {
20
- return this._client.get((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, options);
20
+ return this._client.get((0, path_js_1.path) `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
21
21
  }
22
22
  /**
23
23
  * List sandbox snapshots for the authenticated tenant, with optional filtering,
24
24
  * sorting, and pagination.
25
25
  */
26
26
  list(query = {}, options) {
27
- return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
27
+ return this._client.get('/api/v2/sandboxes/snapshots', { query, ...options });
28
28
  }
29
29
  /**
30
30
  * Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
31
31
  */
32
32
  delete(snapshotID, options) {
33
- return this._client.delete((0, path_js_1.path) `/v2/sandboxes/snapshots/${snapshotID}`, {
33
+ return this._client.delete((0, path_js_1.path) `/api/v2/sandboxes/snapshots/${snapshotID}`, {
34
34
  ...options,
35
35
  headers: (0, headers_js_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
36
36
  });
@@ -25,6 +25,13 @@ export interface SnapshotCreateParams {
25
25
  docker_image: string;
26
26
  fs_capacity_bytes: number;
27
27
  name: string;
28
+ /**
29
+ * Labels seed the snapshot's labels, overriding any label of the same key derived
30
+ * from the Docker image.
31
+ */
32
+ labels?: {
33
+ [key: string]: string;
34
+ };
28
35
  registry_id?: string;
29
36
  }
30
37
  export interface SnapshotListParams {
@@ -32,6 +39,11 @@ export interface SnapshotListParams {
32
39
  * Filter by creator identity. Only 'me' is supported.
33
40
  */
34
41
  created_by?: string;
42
+ /**
43
+ * Filter by label. Repeatable; all must match. Use 'key' to match on key presence
44
+ * or 'key=value' for equality.
45
+ */
46
+ label?: Array<string>;
35
47
  /**
36
48
  * Maximum number of results
37
49
  */
@@ -8,26 +8,26 @@ export class Snapshots extends APIResource {
8
8
  * Create a snapshot from a Docker image (async build).
9
9
  */
10
10
  create(body, options) {
11
- return this._client.post('/v2/sandboxes/snapshots', { body, ...options });
11
+ return this._client.post('/api/v2/sandboxes/snapshots', { body, ...options });
12
12
  }
13
13
  /**
14
14
  * Get a sandbox snapshot by ID.
15
15
  */
16
16
  retrieve(snapshotID, options) {
17
- return this._client.get(path `/v2/sandboxes/snapshots/${snapshotID}`, options);
17
+ return this._client.get(path `/api/v2/sandboxes/snapshots/${snapshotID}`, options);
18
18
  }
19
19
  /**
20
20
  * List sandbox snapshots for the authenticated tenant, with optional filtering,
21
21
  * sorting, and pagination.
22
22
  */
23
23
  list(query = {}, options) {
24
- return this._client.get('/v2/sandboxes/snapshots', { query, ...options });
24
+ return this._client.get('/api/v2/sandboxes/snapshots', { query, ...options });
25
25
  }
26
26
  /**
27
27
  * Delete a snapshot by ID. The underlying storage is reclaimed asynchronously.
28
28
  */
29
29
  delete(snapshotID, options) {
30
- return this._client.delete(path `/v2/sandboxes/snapshots/${snapshotID}`, {
30
+ return this._client.delete(path `/api/v2/sandboxes/snapshots/${snapshotID}`, {
31
31
  ...options,
32
32
  headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
33
33
  });
@@ -8,8 +8,9 @@ const pagination_js_1 = require("../core/pagination.cjs");
8
8
  const path_js_1 = require("../internal/utils/path.cjs");
9
9
  class Threads extends resource_js_1.APIResource {
10
10
  /**
11
- * **Alpha:** The request and response contract may change; Retrieve all traces
12
- * belonging to a specific thread within a project.
11
+ * Retrieve all traces belonging to a specific thread within a project.
12
+ *
13
+ * Self-hosted deployments require LangSmith `v0.16` or later.
13
14
  *
14
15
  * @example
15
16
  * ```ts
@@ -23,12 +24,13 @@ class Threads extends resource_js_1.APIResource {
23
24
  * ```
24
25
  */
25
26
  listTraces(threadID, query, options) {
26
- return this._client.getAPIList((0, path_js_1.path) `/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
27
+ return this._client.getAPIList((0, path_js_1.path) `/api/v2/threads/${threadID}/traces`, (pagination_js_1.ItemsCursorGetPagination), { query, ...options });
27
28
  }
28
29
  /**
29
- * **Alpha:** The request and response contract may change; Query threads within a
30
- * project (session), with cursor-based pagination. Returns threads matching the
31
- * given time range and optional filter.
30
+ * Query threads within a project (session), with cursor-based pagination. Returns
31
+ * threads matching the given time range and optional filter.
32
+ *
33
+ * Self-hosted deployments require LangSmith `v0.16` or later.
32
34
  *
33
35
  * @example
34
36
  * ```ts
@@ -39,16 +41,17 @@ class Threads extends resource_js_1.APIResource {
39
41
  * ```
40
42
  */
41
43
  query(body, options) {
42
- return this._client.getAPIList('/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
44
+ return this._client.getAPIList('/api/v2/threads/query', (pagination_js_1.ItemsCursorPostPagination), {
43
45
  body,
44
46
  method: 'post',
45
47
  ...options,
46
48
  });
47
49
  }
48
50
  /**
49
- * **Alpha:** The request and response contract may change; Compute aggregate stats
50
- * for a single thread (turn count, latency percentiles, token/cost sums, and
51
- * detail breakdowns) within a project.
51
+ * Compute aggregate stats for a single thread (turn count, latency percentiles,
52
+ * token/cost sums, and detail breakdowns) within a project.
53
+ *
54
+ * Self-hosted deployments require LangSmith `v0.16` or later.
52
55
  *
53
56
  * @example
54
57
  * ```ts
@@ -62,7 +65,7 @@ class Threads extends resource_js_1.APIResource {
62
65
  * ```
63
66
  */
64
67
  stats(threadID, query, options) {
65
- return this._client.get((0, path_js_1.path) `/v2/threads/${threadID}/stats`, { query, ...options });
68
+ return this._client.get((0, path_js_1.path) `/api/v2/threads/${threadID}/stats`, { query, ...options });
66
69
  }
67
70
  }
68
71
  exports.Threads = Threads;
@@ -4,8 +4,9 @@ import { ItemsCursorGetPagination, type ItemsCursorGetPaginationParams, ItemsCur
4
4
  import { RequestOptions } from '../internal/request-options.js';
5
5
  export declare class Threads extends APIResource {
6
6
  /**
7
- * **Alpha:** The request and response contract may change; Retrieve all traces
8
- * belonging to a specific thread within a project.
7
+ * Retrieve all traces belonging to a specific thread within a project.
8
+ *
9
+ * Self-hosted deployments require LangSmith `v0.16` or later.
9
10
  *
10
11
  * @example
11
12
  * ```ts
@@ -20,9 +21,10 @@ export declare class Threads extends APIResource {
20
21
  */
21
22
  listTraces(threadID: string, query: ThreadListTracesParams, options?: RequestOptions): PagePromise<ThreadTracesItemsCursorGetPagination, ThreadTrace>;
22
23
  /**
23
- * **Alpha:** The request and response contract may change; Query threads within a
24
- * project (session), with cursor-based pagination. Returns threads matching the
25
- * given time range and optional filter.
24
+ * Query threads within a project (session), with cursor-based pagination. Returns
25
+ * threads matching the given time range and optional filter.
26
+ *
27
+ * Self-hosted deployments require LangSmith `v0.16` or later.
26
28
  *
27
29
  * @example
28
30
  * ```ts
@@ -34,9 +36,10 @@ export declare class Threads extends APIResource {
34
36
  */
35
37
  query(body: ThreadQueryParams, options?: RequestOptions): PagePromise<ThreadsItemsCursorPostPagination, Thread>;
36
38
  /**
37
- * **Alpha:** The request and response contract may change; Compute aggregate stats
38
- * for a single thread (turn count, latency percentiles, token/cost sums, and
39
- * detail breakdowns) within a project.
39
+ * Compute aggregate stats for a single thread (turn count, latency percentiles,
40
+ * token/cost sums, and detail breakdowns) within a project.
41
+ *
42
+ * Self-hosted deployments require LangSmith `v0.16` or later.
40
43
  *
41
44
  * @example
42
45
  * ```ts
@@ -554,7 +557,8 @@ export interface ThreadTrace {
554
557
  */
555
558
  total_tokens?: number;
556
559
  /**
557
- * `trace_id` is the UUID of this trace (the root run). Always present.
560
+ * `trace_id` is the UUID of this trace (the root run). Returned when `TRACE_ID` is
561
+ * in `selects`, or when `selects` is omitted entirely (sole fallback field).
558
562
  */
559
563
  trace_id?: string;
560
564
  }
@@ -5,8 +5,9 @@ import { ItemsCursorGetPagination, ItemsCursorPostPagination, } from '../core/pa
5
5
  import { path } from '../internal/utils/path.js';
6
6
  export class Threads extends APIResource {
7
7
  /**
8
- * **Alpha:** The request and response contract may change; Retrieve all traces
9
- * belonging to a specific thread within a project.
8
+ * Retrieve all traces belonging to a specific thread within a project.
9
+ *
10
+ * Self-hosted deployments require LangSmith `v0.16` or later.
10
11
  *
11
12
  * @example
12
13
  * ```ts
@@ -20,12 +21,13 @@ export class Threads extends APIResource {
20
21
  * ```
21
22
  */
22
23
  listTraces(threadID, query, options) {
23
- return this._client.getAPIList(path `/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
24
+ return this._client.getAPIList(path `/api/v2/threads/${threadID}/traces`, (ItemsCursorGetPagination), { query, ...options });
24
25
  }
25
26
  /**
26
- * **Alpha:** The request and response contract may change; Query threads within a
27
- * project (session), with cursor-based pagination. Returns threads matching the
28
- * given time range and optional filter.
27
+ * Query threads within a project (session), with cursor-based pagination. Returns
28
+ * threads matching the given time range and optional filter.
29
+ *
30
+ * Self-hosted deployments require LangSmith `v0.16` or later.
29
31
  *
30
32
  * @example
31
33
  * ```ts
@@ -36,16 +38,17 @@ export class Threads extends APIResource {
36
38
  * ```
37
39
  */
38
40
  query(body, options) {
39
- return this._client.getAPIList('/v2/threads/query', (ItemsCursorPostPagination), {
41
+ return this._client.getAPIList('/api/v2/threads/query', (ItemsCursorPostPagination), {
40
42
  body,
41
43
  method: 'post',
42
44
  ...options,
43
45
  });
44
46
  }
45
47
  /**
46
- * **Alpha:** The request and response contract may change; Compute aggregate stats
47
- * for a single thread (turn count, latency percentiles, token/cost sums, and
48
- * detail breakdowns) within a project.
48
+ * Compute aggregate stats for a single thread (turn count, latency percentiles,
49
+ * token/cost sums, and detail breakdowns) within a project.
50
+ *
51
+ * Self-hosted deployments require LangSmith `v0.16` or later.
49
52
  *
50
53
  * @example
51
54
  * ```ts
@@ -59,6 +62,6 @@ export class Threads extends APIResource {
59
62
  * ```
60
63
  */
61
64
  stats(threadID, query, options) {
62
- return this._client.get(path `/v2/threads/${threadID}/stats`, { query, ...options });
65
+ return this._client.get(path `/api/v2/threads/${threadID}/stats`, { query, ...options });
63
66
  }
64
67
  }
@@ -9,9 +9,10 @@ const headers_js_1 = require("../internal/headers.cjs");
9
9
  const path_js_1 = require("../internal/utils/path.cjs");
10
10
  class Traces extends resource_js_1.APIResource {
11
11
  /**
12
- * **Alpha:** The request and response contract may change; Returns runs for a
13
- * trace ID within min/max start time. Optional `filter`; repeatable `selects` to
14
- * select fields to return.
12
+ * Returns runs for a trace ID within min/max start time. Optional `filter`;
13
+ * repeatable `selects` to select fields to return.
14
+ *
15
+ * Self-hosted deployments require LangSmith `v0.16` or later.
15
16
  *
16
17
  * @example
17
18
  * ```ts
@@ -23,7 +24,7 @@ class Traces extends resource_js_1.APIResource {
23
24
  */
24
25
  listRuns(traceID, params, options) {
25
26
  const { Accept, ...query } = params;
26
- return this._client.get((0, path_js_1.path) `/v2/traces/${traceID}/runs`, {
27
+ return this._client.get((0, path_js_1.path) `/api/v2/traces/${traceID}/runs`, {
27
28
  query,
28
29
  ...options,
29
30
  headers: (0, headers_js_1.buildHeaders)([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
@@ -42,6 +43,8 @@ class Traces extends resource_js_1.APIResource {
42
43
  * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`),
43
44
  * and field projection (`selects`).
44
45
  *
46
+ * Self-hosted deployments require LangSmith `v0.16` or later.
47
+ *
45
48
  * @example
46
49
  * ```ts
47
50
  * // Automatically fetches more pages as needed.
@@ -51,7 +54,7 @@ class Traces extends resource_js_1.APIResource {
51
54
  * ```
52
55
  */
53
56
  query(body, options) {
54
- return this._client.getAPIList('/v2/traces/query', (pagination_js_1.ItemsCursorPostPagination), {
57
+ return this._client.getAPIList('/api/v2/traces/query', (pagination_js_1.ItemsCursorPostPagination), {
55
58
  body,
56
59
  method: 'post',
57
60
  ...options,
@@ -5,9 +5,10 @@ import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePr
5
5
  import { RequestOptions } from '../internal/request-options.js';
6
6
  export declare class Traces extends APIResource {
7
7
  /**
8
- * **Alpha:** The request and response contract may change; Returns runs for a
9
- * trace ID within min/max start time. Optional `filter`; repeatable `selects` to
10
- * select fields to return.
8
+ * Returns runs for a trace ID within min/max start time. Optional `filter`;
9
+ * repeatable `selects` to select fields to return.
10
+ *
11
+ * Self-hosted deployments require LangSmith `v0.16` or later.
11
12
  *
12
13
  * @example
13
14
  * ```ts
@@ -31,6 +32,8 @@ export declare class Traces extends APIResource {
31
32
  * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`),
32
33
  * and field projection (`selects`).
33
34
  *
35
+ * Self-hosted deployments require LangSmith `v0.16` or later.
36
+ *
34
37
  * @example
35
38
  * ```ts
36
39
  * // Automatically fetches more pages as needed.
@@ -108,7 +111,7 @@ export interface TraceListRunsParams {
108
111
  * (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
109
112
  * omitted, only `id` is returned.
110
113
  */
111
- selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
114
+ selects?: Array<'ID' | 'NAME' | 'RUN_TYPE' | 'STATUS' | 'START_TIME' | 'END_TIME' | 'LATENCY_SECONDS' | 'FIRST_TOKEN_TIME' | 'ERROR' | 'ERROR_PREVIEW' | 'EXTRA' | 'METADATA' | 'EVENTS' | 'INPUTS' | 'INPUTS_PREVIEW' | 'OUTPUTS' | 'OUTPUTS_PREVIEW' | 'MANIFEST' | 'PARENT_RUN_IDS' | 'PROJECT_ID' | 'TRACE_ID' | 'THREAD_ID' | 'DOTTED_ORDER' | 'IS_ROOT' | 'REFERENCE_EXAMPLE_ID' | 'REFERENCE_DATASET_ID' | 'TOTAL_TOKENS' | 'PROMPT_TOKENS' | 'COMPLETION_TOKENS' | 'TOTAL_COST' | 'PROMPT_COST' | 'COMPLETION_COST' | 'PROMPT_TOKEN_DETAILS' | 'COMPLETION_TOKEN_DETAILS' | 'PROMPT_COST_DETAILS' | 'COMPLETION_COST_DETAILS' | 'PRICE_MODEL_ID' | 'TAGS' | 'APP_PATH' | 'ATTACHMENTS' | 'THREAD_EVALUATION_TIME' | 'IS_IN_DATASET' | 'LAST_QUEUED_AT' | 'SHARE_URL' | 'FEEDBACK_STATS'>;
112
115
  /**
113
116
  * Header param: application/json
114
117
  */
@@ -6,9 +6,10 @@ import { buildHeaders } from '../internal/headers.js';
6
6
  import { path } from '../internal/utils/path.js';
7
7
  export class Traces extends APIResource {
8
8
  /**
9
- * **Alpha:** The request and response contract may change; Returns runs for a
10
- * trace ID within min/max start time. Optional `filter`; repeatable `selects` to
11
- * select fields to return.
9
+ * Returns runs for a trace ID within min/max start time. Optional `filter`;
10
+ * repeatable `selects` to select fields to return.
11
+ *
12
+ * Self-hosted deployments require LangSmith `v0.16` or later.
12
13
  *
13
14
  * @example
14
15
  * ```ts
@@ -20,7 +21,7 @@ export class Traces extends APIResource {
20
21
  */
21
22
  listRuns(traceID, params, options) {
22
23
  const { Accept, ...query } = params;
23
- return this._client.get(path `/v2/traces/${traceID}/runs`, {
24
+ return this._client.get(path `/api/v2/traces/${traceID}/runs`, {
24
25
  query,
25
26
  ...options,
26
27
  headers: buildHeaders([{ ...(Accept != null ? { Accept: Accept } : undefined) }, options?.headers]),
@@ -39,6 +40,8 @@ export class Traces extends APIResource {
39
40
  * Supports filters (`trace_filter`, `tree_filter`), cursor pagination (`cursor`),
40
41
  * and field projection (`selects`).
41
42
  *
43
+ * Self-hosted deployments require LangSmith `v0.16` or later.
44
+ *
42
45
  * @example
43
46
  * ```ts
44
47
  * // Automatically fetches more pages as needed.
@@ -48,7 +51,7 @@ export class Traces extends APIResource {
48
51
  * ```
49
52
  */
50
53
  query(body, options) {
51
- return this._client.getAPIList('/v2/traces/query', (ItemsCursorPostPagination), {
54
+ return this._client.getAPIList('/api/v2/traces/query', (ItemsCursorPostPagination), {
52
55
  body,
53
56
  method: 'post',
54
57
  ...options,