langsmith 0.7.15 → 0.7.16

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 (46) hide show
  1. package/dist/_openapi_client/client.cjs +1 -1
  2. package/dist/_openapi_client/client.d.ts +3 -3
  3. package/dist/_openapi_client/client.js +1 -1
  4. package/dist/_openapi_client/resources/datasets/datasets.cjs +0 -130
  5. package/dist/_openapi_client/resources/datasets/datasets.d.ts +3 -271
  6. package/dist/_openapi_client/resources/datasets/datasets.js +0 -130
  7. package/dist/_openapi_client/resources/datasets/experiment-runs.cjs +1 -1
  8. package/dist/_openapi_client/resources/datasets/experiment-runs.d.ts +8 -8
  9. package/dist/_openapi_client/resources/datasets/experiment-runs.js +1 -1
  10. package/dist/_openapi_client/resources/index.cjs +1 -1
  11. package/dist/_openapi_client/resources/index.d.ts +2 -2
  12. package/dist/_openapi_client/resources/index.js +1 -1
  13. package/dist/_openapi_client/resources/runs.cjs +69 -15
  14. package/dist/_openapi_client/resources/runs.d.ts +806 -1
  15. package/dist/_openapi_client/resources/runs.js +67 -1
  16. package/dist/client.cjs +1 -5
  17. package/dist/client.d.ts +2 -5
  18. package/dist/client.js +1 -5
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/package.json +1 -1
  23. package/dist/_openapi_client/resources/datasets/comparative.cjs +0 -22
  24. package/dist/_openapi_client/resources/datasets/comparative.d.ts +0 -55
  25. package/dist/_openapi_client/resources/datasets/comparative.js +0 -18
  26. package/dist/_openapi_client/resources/datasets/runs.cjs +0 -22
  27. package/dist/_openapi_client/resources/datasets/runs.d.ts +0 -175
  28. package/dist/_openapi_client/resources/datasets/runs.js +0 -18
  29. package/dist/_openapi_client/resources/datasets/share.cjs +0 -32
  30. package/dist/_openapi_client/resources/datasets/share.d.ts +0 -28
  31. package/dist/_openapi_client/resources/datasets/share.js +0 -28
  32. package/dist/_openapi_client/resources/datasets/splits.cjs +0 -22
  33. package/dist/_openapi_client/resources/datasets/splits.d.ts +0 -30
  34. package/dist/_openapi_client/resources/datasets/splits.js +0 -18
  35. package/dist/_openapi_client/resources/datasets/versions.cjs +0 -23
  36. package/dist/_openapi_client/resources/datasets/versions.d.ts +0 -36
  37. package/dist/_openapi_client/resources/datasets/versions.js +0 -19
  38. package/dist/_openapi_client/resources/runs/index.cjs +0 -9
  39. package/dist/_openapi_client/resources/runs/index.d.ts +0 -2
  40. package/dist/_openapi_client/resources/runs/index.js +0 -4
  41. package/dist/_openapi_client/resources/runs/rules.cjs +0 -9
  42. package/dist/_openapi_client/resources/runs/rules.d.ts +0 -3
  43. package/dist/_openapi_client/resources/runs/rules.js +0 -5
  44. package/dist/_openapi_client/resources/runs/runs.cjs +0 -115
  45. package/dist/_openapi_client/resources/runs/runs.d.ts +0 -800
  46. package/dist/_openapi_client/resources/runs/runs.js +0 -78
@@ -1,800 +0,0 @@
1
- import { APIResource } from '../../core/resource.js';
2
- import * as SessionsAPI from '../sessions.js';
3
- import * as RulesAPI from './rules.js';
4
- import { Rules } from './rules.js';
5
- import { APIPromise } from '../../core/api-promise.js';
6
- import { ItemsCursorPostPagination, type ItemsCursorPostPaginationParams, PagePromise } from '../../core/pagination.js';
7
- import { RequestOptions } from '../../internal/request-options.js';
8
- export declare class Runs extends APIResource {
9
- rules: RulesAPI.Rules;
10
- /**
11
- * **Alpha:** The request and response contract may change; Returns a paginated
12
- * list of runs for the given projects within min/max start_time. Supports filters,
13
- * cursor pagination, and `selects` to select fields to return.
14
- *
15
- * @example
16
- * ```ts
17
- * // Automatically fetches more pages as needed.
18
- * for await (const run of client.runs.queryV2()) {
19
- * // ...
20
- * }
21
- * ```
22
- */
23
- queryV2(params: RunQueryV2Params, options?: RequestOptions): PagePromise<RunsItemsCursorPostPagination, Run>;
24
- /**
25
- * **Alpha:** The request and response contract may change; Returns one run by ID
26
- * for the given session and start_time. Use the `selects` query parameter
27
- * (repeatable) to select fields to return.
28
- *
29
- * @example
30
- * ```ts
31
- * const run = await client.runs.retrieveV2(
32
- * '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
33
- * {
34
- * project_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
35
- * start_time: '2019-12-27T18:11:19.117Z',
36
- * },
37
- * );
38
- * ```
39
- */
40
- retrieveV2(runID: string, params: RunRetrieveV2Params, options?: RequestOptions): APIPromise<Run>;
41
- retrieve: (runID: string, params: RunRetrieveV2Params, options?: RequestOptions) => APIPromise<Run>;
42
- query: (params: RunQueryV2Params, options?: RequestOptions) => PagePromise<RunsItemsCursorPostPagination, Run>;
43
- }
44
- export type RunsItemsCursorPostPagination = ItemsCursorPostPagination<Run>;
45
- export interface ResponseBodyForRunsGenerateQuery {
46
- feedback_urls: {
47
- [key: string]: string;
48
- };
49
- filter: string;
50
- }
51
- export interface Run {
52
- /**
53
- * `id` is this run's UUID.
54
- */
55
- id?: string;
56
- /**
57
- * `app_path` identifies the application code location that produced this run, if
58
- * recorded.
59
- */
60
- app_path?: string;
61
- /**
62
- * `attachments` maps each attachment file name to a pre-signed HTTPS download URL.
63
- */
64
- attachments?: {
65
- [key: string]: string;
66
- };
67
- /**
68
- * `completion_cost` is estimated USD cost for the completion.
69
- */
70
- completion_cost?: number;
71
- /**
72
- * `completion_cost_details` is the per-category USD breakdown of
73
- * `completion_cost`. Categories mirror `completion_token_details`. Returned only
74
- * when the `COMPLETION_COST_DETAILS` field is requested.
75
- */
76
- completion_cost_details?: Run.CompletionCostDetails;
77
- /**
78
- * `completion_token_details` is the per-category breakdown of `completion_tokens`.
79
- * Category names are model-specific (for example `reasoning`, `audio`). Returned
80
- * only when the `COMPLETION_TOKEN_DETAILS` field is requested.
81
- */
82
- completion_token_details?: Run.CompletionTokenDetails;
83
- /**
84
- * `completion_tokens` is the completion-side token count.
85
- */
86
- completion_tokens?: number;
87
- /**
88
- * `dotted_order` is the hierarchical ordering key for trace trees.
89
- */
90
- dotted_order?: string;
91
- /**
92
- * `end_time` is when the run ended (RFC3339 date-time). JSON null if the run has
93
- * not finished yet.
94
- */
95
- end_time?: string;
96
- /**
97
- * `error` is the error message when `status` indicates failure.
98
- */
99
- error?: string;
100
- /**
101
- * `error_preview` is a truncated plain-text error snippet.
102
- */
103
- error_preview?: string;
104
- /**
105
- * `events` is the ordered list of run events (for example streaming tokens).
106
- */
107
- events?: Array<Run.Event>;
108
- /**
109
- * `extra` is additional runtime JSON attached to the run.
110
- */
111
- extra?: unknown;
112
- /**
113
- * `feedback_stats` aggregates feedback scores keyed by feedback key.
114
- */
115
- feedback_stats?: {
116
- [key: string]: Run.FeedbackStats;
117
- };
118
- /**
119
- * `first_token_time` is when the first output token was produced (RFC3339
120
- * date-time), when recorded for streamed runs.
121
- */
122
- first_token_time?: string;
123
- /**
124
- * `inputs` is the run input payload (arbitrary JSON object).
125
- */
126
- inputs?: unknown;
127
- /**
128
- * `inputs_preview` is a truncated plain-text preview of inputs.
129
- */
130
- inputs_preview?: string;
131
- /**
132
- * `is_in_dataset` is true when this run is linked to a dataset example.
133
- */
134
- is_in_dataset?: boolean;
135
- /**
136
- * `is_root` is true when this run has no parent (it is the trace root).
137
- */
138
- is_root?: boolean;
139
- /**
140
- * `latency_seconds` is wall-clock duration from start to end in seconds.
141
- */
142
- latency_seconds?: number;
143
- /**
144
- * `manifest` is the serialized configuration of the traced component (for example
145
- * the model parameters, prompt template, or pipeline definition), when recorded.
146
- */
147
- manifest?: unknown;
148
- /**
149
- * `metadata` is arbitrary user-defined JSON metadata.
150
- */
151
- metadata?: unknown;
152
- /**
153
- * `name` is a human-readable label for the run (for example the model name,
154
- * function name, or step name chosen when the run was traced).
155
- */
156
- name?: string;
157
- /**
158
- * `outputs` is the run output payload (arbitrary JSON object).
159
- */
160
- outputs?: unknown;
161
- /**
162
- * `outputs_preview` is a truncated plain-text preview of outputs.
163
- */
164
- outputs_preview?: string;
165
- /**
166
- * `parent_run_ids` lists ancestor run UUIDs from the trace root down to the direct
167
- * parent.
168
- */
169
- parent_run_ids?: Array<string>;
170
- /**
171
- * `price_model_id` identifies the pricing model UUID used for cost estimates, when
172
- * recorded.
173
- */
174
- price_model_id?: string;
175
- /**
176
- * `project_id` is the tracing project UUID this run was logged to.
177
- */
178
- project_id?: string;
179
- /**
180
- * `prompt_cost` is estimated USD cost for the prompt.
181
- */
182
- prompt_cost?: number;
183
- /**
184
- * `prompt_cost_details` is the per-category USD breakdown of `prompt_cost`.
185
- * Categories mirror `prompt_token_details`. Returned only when the
186
- * `PROMPT_COST_DETAILS` field is requested.
187
- */
188
- prompt_cost_details?: Run.PromptCostDetails;
189
- /**
190
- * `prompt_token_details` is the per-category breakdown of `prompt_tokens`.
191
- * Category names are model-specific (for example `cache_read`, `cache_write`).
192
- * Returned only when the `PROMPT_TOKEN_DETAILS` field is requested.
193
- */
194
- prompt_token_details?: Run.PromptTokenDetails;
195
- /**
196
- * `prompt_tokens` is the prompt-side token count.
197
- */
198
- prompt_tokens?: number;
199
- /**
200
- * `reference_dataset_id` is the dataset UUID for the reference example, if any.
201
- */
202
- reference_dataset_id?: string;
203
- /**
204
- * `reference_example_id` is the dataset example UUID this run was compared
205
- * against, if any.
206
- */
207
- reference_example_id?: string;
208
- /**
209
- * `run_type` identifies what kind of operation this run represents (for example an
210
- * LLM call, a tool invocation, or a chain step). See the `RunType` enum for
211
- * allowed values.
212
- */
213
- run_type?: 'TOOL' | 'CHAIN' | 'LLM' | 'RETRIEVER' | 'EMBEDDING' | 'PROMPT' | 'PARSER';
214
- /**
215
- * `share_url` is the fully-qualified URL of this run's public view, rooted at the
216
- * deployment's LangSmith app origin (for example
217
- * `https://smith.langchain.com/public/4f7a1b2c-8d9e-4a0b-9c1d-2e3f4a5b6c7d/r`). It
218
- * is returned only when `SHARE_URL` is included in `selects`, and only when the
219
- * run has been explicitly shared; the URL remains stable until the run is
220
- * unshared. Anyone with this URL can view the run anonymously, so treat it as a
221
- * secret and do not log it.
222
- */
223
- share_url?: string;
224
- /**
225
- * `start_time` is when the run started (RFC3339 date-time).
226
- */
227
- start_time?: string;
228
- /**
229
- * `status` is the completion status of the run.
230
- */
231
- status?: 'SUCCESS' | 'ERROR' | 'PENDING';
232
- /**
233
- * `tags` lists user-defined tags on this run.
234
- */
235
- tags?: Array<string>;
236
- /**
237
- * `thread_evaluation_time` is thread-level evaluation timing (RFC3339 date-time),
238
- * when recorded.
239
- */
240
- thread_evaluation_time?: string;
241
- /**
242
- * `thread_id` is the conversation thread UUID this run belongs to, if any.
243
- */
244
- thread_id?: string;
245
- /**
246
- * `total_cost` is total estimated USD cost (prompt plus completion).
247
- */
248
- total_cost?: number;
249
- /**
250
- * `total_tokens` is prompt plus completion tokens.
251
- */
252
- total_tokens?: number;
253
- /**
254
- * `trace_id` is the root trace UUID; for a root run it matches `id`.
255
- */
256
- trace_id?: string;
257
- }
258
- export declare namespace Run {
259
- /**
260
- * `completion_cost_details` is the per-category USD breakdown of
261
- * `completion_cost`. Categories mirror `completion_token_details`. Returned only
262
- * when the `COMPLETION_COST_DETAILS` field is requested.
263
- */
264
- interface CompletionCostDetails {
265
- /**
266
- * `raw` maps each category name to its estimated USD cost.
267
- */
268
- raw?: {
269
- [key: string]: number;
270
- };
271
- }
272
- /**
273
- * `completion_token_details` is the per-category breakdown of `completion_tokens`.
274
- * Category names are model-specific (for example `reasoning`, `audio`). Returned
275
- * only when the `COMPLETION_TOKEN_DETAILS` field is requested.
276
- */
277
- interface CompletionTokenDetails {
278
- /**
279
- * `raw` maps each category name to its completion-token count.
280
- */
281
- raw?: {
282
- [key: string]: number;
283
- };
284
- }
285
- interface Event {
286
- /**
287
- * `kwargs` is the event payload — an opaque JSON object whose shape depends on
288
- * `name` and on the emitting SDK. For example LangChain emits `{"token": {...}}`
289
- * for `new_token` events, tool-call start/end details for tool events, and
290
- * arbitrary user-defined payloads for custom events. Clients should treat `kwargs`
291
- * as untyped JSON: do not assume specific keys exist for a given `name`, and
292
- * tolerate additional unknown keys appearing over time.
293
- */
294
- kwargs?: unknown;
295
- /**
296
- * `name` is the event kind. Common values emitted by the LangChain/LangSmith
297
- * tracer SDKs include `"start"`, `"end"`, and `"new_token"`, but applications may
298
- * emit arbitrary strings for their own instrumentation.
299
- */
300
- name?: string;
301
- /**
302
- * `time` is when the event occurred (RFC3339 date-time with millisecond
303
- * precision).
304
- */
305
- time?: string;
306
- }
307
- interface FeedbackStats {
308
- /**
309
- * `avg` is the arithmetic mean of numeric feedback scores for this key on the run,
310
- * or `null` when no numeric score has been recorded (for example purely
311
- * categorical feedback).
312
- */
313
- avg?: number;
314
- /**
315
- * `comments` is a sample of human-readable comments attached to feedback points
316
- * for this key, in no particular order. May be empty; is not exhaustive when many
317
- * comments exist.
318
- */
319
- comments?: Array<string>;
320
- /**
321
- * `contains_thread_feedback` is true when at least one feedback point for this key
322
- * was submitted at the thread level (rather than at an individual run). Always
323
- * false on responses that already describe a single run in isolation.
324
- */
325
- contains_thread_feedback?: boolean;
326
- /**
327
- * `errors` is the number of feedback points recorded as errors rather than
328
- * successful scores (for example an automated evaluator that raised an exception).
329
- * Defaults to 0 when no errors occurred.
330
- */
331
- errors?: number;
332
- /**
333
- * `max` is the largest numeric feedback score recorded for this key on the run, or
334
- * `null` when no numeric score has been recorded.
335
- */
336
- max?: number;
337
- /**
338
- * `min` is the smallest numeric feedback score recorded for this key on the run,
339
- * or `null` when no numeric score has been recorded.
340
- */
341
- min?: number;
342
- /**
343
- * `n` is the number of feedback points recorded for this key on the run. For
344
- * numeric feedback this is the sample size behind `avg`, `min`, `max`, and
345
- * `stdev`; for categorical feedback it is the sum of the `values` counts.
346
- */
347
- n?: number;
348
- /**
349
- * `sources` is a sample of feedback sources for this key. Each entry is either a
350
- * plain string identifier (for example `"api"`, `"app"`, `"model"`) or a JSON
351
- * object describing a synthetic source (for example
352
- * `{"type": "__ls_composite_feedback"}` for a computed aggregate). Clients must
353
- * tolerate both shapes.
354
- */
355
- sources?: Array<unknown>;
356
- /**
357
- * `stdev` is the sample standard deviation of numeric feedback scores for this key
358
- * on the run, or `null` when it cannot be computed (for example fewer than two
359
- * numeric scores, or purely categorical feedback).
360
- */
361
- stdev?: number;
362
- /**
363
- * `values` is the distribution of categorical feedback labels for this key,
364
- * mapping each label to its occurrence count. Empty (`{}`) for purely numeric
365
- * feedback.
366
- */
367
- values?: {
368
- [key: string]: number;
369
- };
370
- }
371
- /**
372
- * `prompt_cost_details` is the per-category USD breakdown of `prompt_cost`.
373
- * Categories mirror `prompt_token_details`. Returned only when the
374
- * `PROMPT_COST_DETAILS` field is requested.
375
- */
376
- interface PromptCostDetails {
377
- /**
378
- * `raw` maps each category name to its estimated USD cost.
379
- */
380
- raw?: {
381
- [key: string]: number;
382
- };
383
- }
384
- /**
385
- * `prompt_token_details` is the per-category breakdown of `prompt_tokens`.
386
- * Category names are model-specific (for example `cache_read`, `cache_write`).
387
- * Returned only when the `PROMPT_TOKEN_DETAILS` field is requested.
388
- */
389
- interface PromptTokenDetails {
390
- /**
391
- * `raw` maps each category name to its prompt-token count.
392
- */
393
- raw?: {
394
- [key: string]: number;
395
- };
396
- }
397
- }
398
- export interface RunIngest {
399
- id?: string;
400
- dotted_order?: string;
401
- end_time?: string;
402
- error?: string;
403
- events?: Array<{
404
- [key: string]: unknown;
405
- }>;
406
- extra?: {
407
- [key: string]: unknown;
408
- };
409
- input_attachments?: {
410
- [key: string]: unknown;
411
- };
412
- inputs?: {
413
- [key: string]: unknown;
414
- };
415
- name?: string;
416
- output_attachments?: {
417
- [key: string]: unknown;
418
- };
419
- outputs?: {
420
- [key: string]: unknown;
421
- };
422
- parent_run_id?: string;
423
- reference_example_id?: string;
424
- run_type?: 'tool' | 'chain' | 'llm' | 'retriever' | 'embedding' | 'prompt' | 'parser';
425
- serialized?: {
426
- [key: string]: unknown;
427
- };
428
- session_id?: string;
429
- session_name?: string;
430
- start_time?: string;
431
- status?: string;
432
- tags?: Array<string>;
433
- trace_id?: string;
434
- }
435
- /**
436
- * Run schema.
437
- */
438
- export interface RunSchema {
439
- id: string;
440
- app_path: string;
441
- dotted_order: string;
442
- name: string;
443
- /**
444
- * Enum for run types.
445
- */
446
- run_type: RunTypeEnum;
447
- session_id: string;
448
- status: string;
449
- trace_id: string;
450
- child_run_ids?: Array<string> | null;
451
- completion_cost?: string | null;
452
- completion_cost_details?: {
453
- [key: string]: string;
454
- } | null;
455
- completion_token_details?: {
456
- [key: string]: number;
457
- } | null;
458
- completion_tokens?: number;
459
- direct_child_run_ids?: Array<string> | null;
460
- end_time?: string | null;
461
- error?: string | null;
462
- events?: Array<{
463
- [key: string]: unknown;
464
- }> | null;
465
- execution_order?: number;
466
- extra?: {
467
- [key: string]: unknown;
468
- } | null;
469
- feedback_stats?: {
470
- [key: string]: {
471
- [key: string]: unknown;
472
- };
473
- } | null;
474
- first_token_time?: string | null;
475
- in_dataset?: boolean | null;
476
- inputs?: {
477
- [key: string]: unknown;
478
- } | null;
479
- inputs_preview?: string | null;
480
- inputs_s3_urls?: {
481
- [key: string]: unknown;
482
- } | null;
483
- last_queued_at?: string | null;
484
- manifest_id?: string | null;
485
- manifest_s3_id?: string | null;
486
- messages?: Array<{
487
- [key: string]: unknown;
488
- }> | null;
489
- outputs?: {
490
- [key: string]: unknown;
491
- } | null;
492
- outputs_preview?: string | null;
493
- outputs_s3_urls?: {
494
- [key: string]: unknown;
495
- } | null;
496
- parent_run_id?: string | null;
497
- parent_run_ids?: Array<string> | null;
498
- price_model_id?: string | null;
499
- prompt_cost?: string | null;
500
- prompt_cost_details?: {
501
- [key: string]: string;
502
- } | null;
503
- prompt_token_details?: {
504
- [key: string]: number;
505
- } | null;
506
- prompt_tokens?: number;
507
- reference_dataset_id?: string | null;
508
- reference_example_id?: string | null;
509
- s3_urls?: {
510
- [key: string]: unknown;
511
- } | null;
512
- serialized?: {
513
- [key: string]: unknown;
514
- } | null;
515
- share_token?: string | null;
516
- start_time?: string;
517
- tags?: Array<string> | null;
518
- thread_id?: string | null;
519
- total_cost?: string | null;
520
- total_tokens?: number;
521
- trace_first_received_at?: string | null;
522
- trace_max_start_time?: string | null;
523
- trace_min_start_time?: string | null;
524
- trace_tier?: 'longlived' | 'shortlived' | null;
525
- trace_upgrade?: boolean;
526
- ttl_seconds?: number | null;
527
- }
528
- /**
529
- * Query params for run stats.
530
- */
531
- export interface RunStatsQueryParams {
532
- id?: Array<string> | null;
533
- /**
534
- * Enum for run data source types.
535
- */
536
- data_source_type?: RunsFilterDataSourceTypeEnum | null;
537
- end_time?: string | null;
538
- error?: boolean | null;
539
- execution_order?: number | null;
540
- filter?: string | null;
541
- /**
542
- * Group by param for run stats.
543
- */
544
- group_by?: SessionsAPI.RunStatsGroupBy | null;
545
- groups?: Array<string | null> | null;
546
- include_details?: boolean;
547
- is_root?: boolean | null;
548
- parent_run?: string | null;
549
- query?: string | null;
550
- reference_example?: Array<string> | null;
551
- /**
552
- * Enum for run types.
553
- */
554
- run_type?: RunTypeEnum | null;
555
- search_filter?: string | null;
556
- select?: Array<'run_count' | 'latency_p50' | 'latency_p99' | 'latency_avg' | 'first_token_p50' | 'first_token_p99' | 'total_tokens' | 'prompt_tokens' | 'completion_tokens' | 'median_tokens' | 'completion_tokens_p50' | 'prompt_tokens_p50' | 'tokens_p99' | 'completion_tokens_p99' | 'prompt_tokens_p99' | 'last_run_start_time' | 'feedback_stats' | 'thread_feedback_stats' | 'run_facets' | 'error_rate' | 'streaming_rate' | 'total_cost' | 'prompt_cost' | 'completion_cost' | 'cost_p50' | 'cost_p99' | 'session_feedback_stats' | 'all_run_stats' | 'all_token_stats' | 'group_count' | 'prompt_token_details' | 'completion_token_details' | 'prompt_cost_details' | 'completion_cost_details'> | null;
557
- session?: Array<string> | null;
558
- skip_pagination?: boolean | null;
559
- start_time?: string | null;
560
- trace?: string | null;
561
- trace_filter?: string | null;
562
- tree_filter?: string | null;
563
- use_experimental_search?: boolean;
564
- }
565
- /**
566
- * Enum for run types.
567
- */
568
- export type RunTypeEnum = 'tool' | 'chain' | 'llm' | 'retriever' | 'embedding' | 'prompt' | 'parser';
569
- /**
570
- * Enum for run data source types.
571
- */
572
- export type RunsFilterDataSourceTypeEnum = 'current' | 'historical' | 'lite' | 'root_lite' | 'runs_feedbacks_rmt_wide';
573
- export interface RunQueryV2Params extends ItemsCursorPostPaginationParams {
574
- /**
575
- * Body param: `filter` narrows results to runs matching this LangSmith filter
576
- * expression, evaluated against each individual run. For example: and(eq(run_type,
577
- * "llm"), gt(latency, 5)) or eq(status, "error"). See
578
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
579
- * for syntax.
580
- */
581
- filter?: string;
582
- /**
583
- * Body param: `has_error` filters to runs that errored (true) or completed without
584
- * error (false).
585
- */
586
- has_error?: boolean;
587
- /**
588
- * Body param: `ids` optionally limits the request to these run UUIDs.
589
- */
590
- ids?: Array<string>;
591
- /**
592
- * Body param: `is_root` returns only root runs (true) or only non-root runs
593
- * (false).
594
- */
595
- is_root?: boolean;
596
- /**
597
- * Body param: `max_start_time` is the upper bound for run `start_time` (RFC3339).
598
- * Defaults to now.
599
- */
600
- max_start_time?: string;
601
- /**
602
- * Body param: `min_start_time` is the lower bound for run `start_time` (RFC3339).
603
- * Defaults to 1 day ago.
604
- */
605
- min_start_time?: string;
606
- /**
607
- * Body param: `project_ids` lists tracing project UUIDs to query. Required unless
608
- * `reference_dataset_id` is set. Mutually exclusive with `reference_dataset_id` —
609
- * set exactly one of them.
610
- */
611
- project_ids?: Array<string>;
612
- /**
613
- * Body param: `reference_dataset_id` resolves session IDs server-side from the
614
- * dataset. Required unless `project_ids` is set. Mutually exclusive with
615
- * `project_ids` — set exactly one of them. When provided and `min_start_time` is
616
- * omitted, the server derives it from the earliest session creation date.
617
- */
618
- reference_dataset_id?: string;
619
- /**
620
- * Body param: `reference_examples` optionally limits to runs linked to these
621
- * dataset example UUIDs.
622
- */
623
- reference_examples?: Array<string>;
624
- /**
625
- * Body param: `run_type`, when set, restricts results to runs whose `run_type`
626
- * equals this value.
627
- */
628
- run_type?: 'TOOL' | 'CHAIN' | 'LLM' | 'RETRIEVER' | 'EMBEDDING' | 'PROMPT' | 'PARSER';
629
- /**
630
- * Body param: `selects` lists which properties to include on each returned run. If
631
- * omitted, only `id` is returned. Properties not listed are omitted from each run
632
- * object.
633
- */
634
- 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'>;
635
- /**
636
- * Body param: `trace_filter` narrows results to runs whose root trace matches this
637
- * LangSmith filter expression. Use this to filter by properties of the trace's
638
- * root run — for example eq(status, "success") to include only traces that
639
- * completed without error. See
640
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
641
- * for syntax.
642
- */
643
- trace_filter?: string;
644
- /**
645
- * Body param: `trace_id` optionally limits results to runs belonging to this trace
646
- * UUID.
647
- */
648
- trace_id?: string;
649
- /**
650
- * Body param: `tree_filter` narrows results to runs that belong to a trace
651
- * containing at least one run matching this LangSmith filter expression anywhere
652
- * in the run tree (not just the root). Use this to find runs inside traces that
653
- * involved a specific tool, tag, or model — for example has(tags, "production") or
654
- * eq(name, "my_tool"). See
655
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
656
- * for syntax.
657
- */
658
- tree_filter?: string;
659
- /**
660
- * Header param: application/json
661
- */
662
- Accept?: string;
663
- }
664
- export interface RunRetrieveV2Params {
665
- /**
666
- * Query param: `project_id` is the UUID of the tracing project that owns the run.
667
- */
668
- project_id: string;
669
- /**
670
- * Query param: `start_time` is the run's `start_time` (RFC3339 date-time), used
671
- * together with `project_id` to locate the run.
672
- */
673
- start_time: string;
674
- /**
675
- * Query param: `selects` lists which properties to include on the returned run
676
- * (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
677
- * omitted, only `id` is returned.
678
- */
679
- 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'>;
680
- /**
681
- * Header param: application/json
682
- */
683
- Accept?: string;
684
- }
685
- export interface RunRetrieveParams {
686
- /**
687
- * Query param: `project_id` is the UUID of the tracing project that owns the run.
688
- */
689
- project_id: string;
690
- /**
691
- * Query param: `start_time` is the run's `start_time` (RFC3339 date-time), used
692
- * together with `project_id` to locate the run.
693
- */
694
- start_time: string;
695
- /**
696
- * Query param: `selects` lists which properties to include on the returned run
697
- * (repeatable query parameter). Accepts any value of the `RunSelectField` enum. If
698
- * omitted, only `id` is returned.
699
- */
700
- 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'>;
701
- /**
702
- * Header param: application/json
703
- */
704
- Accept?: string;
705
- }
706
- export interface RunQueryParams extends ItemsCursorPostPaginationParams {
707
- /**
708
- * Body param: `filter` narrows results to runs matching this LangSmith filter
709
- * expression, evaluated against each individual run. For example: and(eq(run_type,
710
- * "llm"), gt(latency, 5)) or eq(status, "error"). See
711
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
712
- * for syntax.
713
- */
714
- filter?: string;
715
- /**
716
- * Body param: `has_error` filters to runs that errored (true) or completed without
717
- * error (false).
718
- */
719
- has_error?: boolean;
720
- /**
721
- * Body param: `ids` optionally limits the request to these run UUIDs.
722
- */
723
- ids?: Array<string>;
724
- /**
725
- * Body param: `is_root` returns only root runs (true) or only non-root runs
726
- * (false).
727
- */
728
- is_root?: boolean;
729
- /**
730
- * Body param: `max_start_time` is the upper bound for run `start_time` (RFC3339).
731
- * Defaults to now.
732
- */
733
- max_start_time?: string;
734
- /**
735
- * Body param: `min_start_time` is the lower bound for run `start_time` (RFC3339).
736
- * Defaults to 1 day ago.
737
- */
738
- min_start_time?: string;
739
- /**
740
- * Body param: `project_ids` lists tracing project UUIDs to query. Required unless
741
- * `reference_dataset_id` is set. Mutually exclusive with `reference_dataset_id` —
742
- * set exactly one of them.
743
- */
744
- project_ids?: Array<string>;
745
- /**
746
- * Body param: `reference_dataset_id` resolves session IDs server-side from the
747
- * dataset. Required unless `project_ids` is set. Mutually exclusive with
748
- * `project_ids` — set exactly one of them. When provided and `min_start_time` is
749
- * omitted, the server derives it from the earliest session creation date.
750
- */
751
- reference_dataset_id?: string;
752
- /**
753
- * Body param: `reference_examples` optionally limits to runs linked to these
754
- * dataset example UUIDs.
755
- */
756
- reference_examples?: Array<string>;
757
- /**
758
- * Body param: `run_type`, when set, restricts results to runs whose `run_type`
759
- * equals this value.
760
- */
761
- run_type?: 'TOOL' | 'CHAIN' | 'LLM' | 'RETRIEVER' | 'EMBEDDING' | 'PROMPT' | 'PARSER';
762
- /**
763
- * Body param: `selects` lists which properties to include on each returned run. If
764
- * omitted, only `id` is returned. Properties not listed are omitted from each run
765
- * object.
766
- */
767
- 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'>;
768
- /**
769
- * Body param: `trace_filter` narrows results to runs whose root trace matches this
770
- * LangSmith filter expression. Use this to filter by properties of the trace's
771
- * root run — for example eq(status, "success") to include only traces that
772
- * completed without error. See
773
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
774
- * for syntax.
775
- */
776
- trace_filter?: string;
777
- /**
778
- * Body param: `trace_id` optionally limits results to runs belonging to this trace
779
- * UUID.
780
- */
781
- trace_id?: string;
782
- /**
783
- * Body param: `tree_filter` narrows results to runs that belong to a trace
784
- * containing at least one run matching this LangSmith filter expression anywhere
785
- * in the run tree (not just the root). Use this to find runs inside traces that
786
- * involved a specific tool, tag, or model — for example has(tags, "production") or
787
- * eq(name, "my_tool"). See
788
- * https://docs.langchain.com/langsmith/trace-query-syntax#filter-query-language
789
- * for syntax.
790
- */
791
- tree_filter?: string;
792
- /**
793
- * Header param: application/json
794
- */
795
- Accept?: string;
796
- }
797
- export declare namespace Runs {
798
- export { type ResponseBodyForRunsGenerateQuery as ResponseBodyForRunsGenerateQuery, type Run as Run, type RunIngest as RunIngest, type RunSchema as RunSchema, type RunStatsQueryParams as RunStatsQueryParams, type RunTypeEnum as RunTypeEnum, type RunsFilterDataSourceTypeEnum as RunsFilterDataSourceTypeEnum, type RunsItemsCursorPostPagination as RunsItemsCursorPostPagination, type RunQueryV2Params as RunQueryV2Params, type RunRetrieveV2Params as RunRetrieveV2Params, type RunRetrieveParams as RunRetrieveParams, type RunQueryParams as RunQueryParams, };
799
- export { Rules as Rules };
800
- }