@langfuse/core 5.4.0 → 5.5.0-beta.0

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.
package/dist/index.d.ts CHANGED
@@ -393,23 +393,23 @@ interface GetAnnotationQueueItemsRequest {
393
393
  limit?: number;
394
394
  }
395
395
 
396
- type index$t_AnnotationQueue = AnnotationQueue;
397
- type index$t_AnnotationQueueAssignmentRequest = AnnotationQueueAssignmentRequest;
398
- type index$t_AnnotationQueueItem = AnnotationQueueItem;
399
- declare const index$t_AnnotationQueueObjectType: typeof AnnotationQueueObjectType;
400
- declare const index$t_AnnotationQueueStatus: typeof AnnotationQueueStatus;
401
- type index$t_CreateAnnotationQueueAssignmentResponse = CreateAnnotationQueueAssignmentResponse;
402
- type index$t_CreateAnnotationQueueItemRequest = CreateAnnotationQueueItemRequest;
403
- type index$t_CreateAnnotationQueueRequest = CreateAnnotationQueueRequest;
404
- type index$t_DeleteAnnotationQueueAssignmentResponse = DeleteAnnotationQueueAssignmentResponse;
405
- type index$t_DeleteAnnotationQueueItemResponse = DeleteAnnotationQueueItemResponse;
406
- type index$t_GetAnnotationQueueItemsRequest = GetAnnotationQueueItemsRequest;
407
- type index$t_GetAnnotationQueuesRequest = GetAnnotationQueuesRequest;
408
- type index$t_PaginatedAnnotationQueueItems = PaginatedAnnotationQueueItems;
409
- type index$t_PaginatedAnnotationQueues = PaginatedAnnotationQueues;
410
- type index$t_UpdateAnnotationQueueItemRequest = UpdateAnnotationQueueItemRequest;
411
- declare namespace index$t {
412
- export { type index$t_AnnotationQueue as AnnotationQueue, type index$t_AnnotationQueueAssignmentRequest as AnnotationQueueAssignmentRequest, type index$t_AnnotationQueueItem as AnnotationQueueItem, index$t_AnnotationQueueObjectType as AnnotationQueueObjectType, index$t_AnnotationQueueStatus as AnnotationQueueStatus, type index$t_CreateAnnotationQueueAssignmentResponse as CreateAnnotationQueueAssignmentResponse, type index$t_CreateAnnotationQueueItemRequest as CreateAnnotationQueueItemRequest, type index$t_CreateAnnotationQueueRequest as CreateAnnotationQueueRequest, type index$t_DeleteAnnotationQueueAssignmentResponse as DeleteAnnotationQueueAssignmentResponse, type index$t_DeleteAnnotationQueueItemResponse as DeleteAnnotationQueueItemResponse, type index$t_GetAnnotationQueueItemsRequest as GetAnnotationQueueItemsRequest, type index$t_GetAnnotationQueuesRequest as GetAnnotationQueuesRequest, type index$t_PaginatedAnnotationQueueItems as PaginatedAnnotationQueueItems, type index$t_PaginatedAnnotationQueues as PaginatedAnnotationQueues, type index$t_UpdateAnnotationQueueItemRequest as UpdateAnnotationQueueItemRequest };
396
+ type index$z_AnnotationQueue = AnnotationQueue;
397
+ type index$z_AnnotationQueueAssignmentRequest = AnnotationQueueAssignmentRequest;
398
+ type index$z_AnnotationQueueItem = AnnotationQueueItem;
399
+ declare const index$z_AnnotationQueueObjectType: typeof AnnotationQueueObjectType;
400
+ declare const index$z_AnnotationQueueStatus: typeof AnnotationQueueStatus;
401
+ type index$z_CreateAnnotationQueueAssignmentResponse = CreateAnnotationQueueAssignmentResponse;
402
+ type index$z_CreateAnnotationQueueItemRequest = CreateAnnotationQueueItemRequest;
403
+ type index$z_CreateAnnotationQueueRequest = CreateAnnotationQueueRequest;
404
+ type index$z_DeleteAnnotationQueueAssignmentResponse = DeleteAnnotationQueueAssignmentResponse;
405
+ type index$z_DeleteAnnotationQueueItemResponse = DeleteAnnotationQueueItemResponse;
406
+ type index$z_GetAnnotationQueueItemsRequest = GetAnnotationQueueItemsRequest;
407
+ type index$z_GetAnnotationQueuesRequest = GetAnnotationQueuesRequest;
408
+ type index$z_PaginatedAnnotationQueueItems = PaginatedAnnotationQueueItems;
409
+ type index$z_PaginatedAnnotationQueues = PaginatedAnnotationQueues;
410
+ type index$z_UpdateAnnotationQueueItemRequest = UpdateAnnotationQueueItemRequest;
411
+ declare namespace index$z {
412
+ export { type index$z_AnnotationQueue as AnnotationQueue, type index$z_AnnotationQueueAssignmentRequest as AnnotationQueueAssignmentRequest, type index$z_AnnotationQueueItem as AnnotationQueueItem, index$z_AnnotationQueueObjectType as AnnotationQueueObjectType, index$z_AnnotationQueueStatus as AnnotationQueueStatus, type index$z_CreateAnnotationQueueAssignmentResponse as CreateAnnotationQueueAssignmentResponse, type index$z_CreateAnnotationQueueItemRequest as CreateAnnotationQueueItemRequest, type index$z_CreateAnnotationQueueRequest as CreateAnnotationQueueRequest, type index$z_DeleteAnnotationQueueAssignmentResponse as DeleteAnnotationQueueAssignmentResponse, type index$z_DeleteAnnotationQueueItemResponse as DeleteAnnotationQueueItemResponse, type index$z_GetAnnotationQueueItemsRequest as GetAnnotationQueueItemsRequest, type index$z_GetAnnotationQueuesRequest as GetAnnotationQueuesRequest, type index$z_PaginatedAnnotationQueueItems as PaginatedAnnotationQueueItems, type index$z_PaginatedAnnotationQueues as PaginatedAnnotationQueues, type index$z_UpdateAnnotationQueueItemRequest as UpdateAnnotationQueueItemRequest };
413
413
  }
414
414
 
415
415
  /**
@@ -445,13 +445,53 @@ declare const BlobStorageExportMode: {
445
445
  /**
446
446
  * This file was auto-generated by Fern from our API Definition.
447
447
  */
448
- type BlobStorageExportFrequency = "hourly" | "daily" | "weekly";
448
+ type BlobStorageExportFrequency = "every_20_minutes" | "hourly" | "daily" | "weekly";
449
449
  declare const BlobStorageExportFrequency: {
450
+ readonly Every20Minutes: "every_20_minutes";
450
451
  readonly Hourly: "hourly";
451
452
  readonly Daily: "daily";
452
453
  readonly Weekly: "weekly";
453
454
  };
454
455
 
456
+ /**
457
+ * This file was auto-generated by Fern from our API Definition.
458
+ */
459
+ /**
460
+ * What data the integration exports.
461
+ * - `LEGACY_TRACES_OBSERVATIONS`: traces, observations, and scores tables with a fixed column set. The `exportFieldGroups` field is not applicable.
462
+ * - `OBSERVATIONS_V2`: same data model as the `/api/public/v2/observations` endpoint, plus scores. Columns are controlled by `exportFieldGroups`.
463
+ * - `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: both sets. For the `OBSERVATIONS_V2` portion, columns are controlled by `exportFieldGroups`.
464
+ *
465
+ * **Note:** `OBSERVATIONS_V2` and the enriched-observations portion of `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` rely on the enriched observations table (Langfuse Fast Preview / v4), which is currently available on Langfuse Cloud only. See https://langfuse.com/docs/v4.
466
+ */
467
+ type BlobStorageExportSource = "LEGACY_TRACES_OBSERVATIONS" | "OBSERVATIONS_V2" | "LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS";
468
+ declare const BlobStorageExportSource: {
469
+ readonly LegacyTracesObservations: "LEGACY_TRACES_OBSERVATIONS";
470
+ readonly ObservationsV2: "OBSERVATIONS_V2";
471
+ readonly LegacyTracesAndEnrichedObservations: "LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS";
472
+ };
473
+
474
+ /**
475
+ * This file was auto-generated by Fern from our API Definition.
476
+ */
477
+ /**
478
+ * Field group for the OBSERVATIONS_V2 and LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS export.
479
+ */
480
+ type BlobStorageExportFieldGroup = "core" | "basic" | "time" | "io" | "metadata" | "model" | "usage" | "prompt" | "metrics" | "tools" | "trace_context";
481
+ declare const BlobStorageExportFieldGroup: {
482
+ readonly Core: "core";
483
+ readonly Basic: "basic";
484
+ readonly Time: "time";
485
+ readonly Io: "io";
486
+ readonly Metadata: "metadata";
487
+ readonly Model: "model";
488
+ readonly Usage: "usage";
489
+ readonly Prompt: "prompt";
490
+ readonly Metrics: "metrics";
491
+ readonly Tools: "tools";
492
+ readonly TraceContext: "trace_context";
493
+ };
494
+
455
495
  /**
456
496
  * This file was auto-generated by Fern from our API Definition.
457
497
  */
@@ -483,6 +523,22 @@ interface CreateBlobStorageIntegrationRequest {
483
523
  exportStartDate?: string;
484
524
  /** Enable gzip compression for exported files (.csv.gz, .json.gz, .jsonl.gz). Defaults to true. */
485
525
  compressed?: boolean;
526
+ /**
527
+ * Data to export. When omitted on update, the existing value is preserved. When omitted on create: pre-cutoff Cloud projects and self-hosted deployments fall back to `LEGACY_TRACES_OBSERVATIONS`; post-cutoff Cloud projects (created on or after 2026-05-20) auto-default to `OBSERVATIONS_V2`. Required when `exportFieldGroups` is provided.
528
+ *
529
+ * **Cloud-only deprecation gate (effective 2026-05-20):** For projects created on or after 2026-05-20 on Langfuse Cloud, `LEGACY_TRACES_OBSERVATIONS` and `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` are rejected with HTTP 400. Omitting `exportSource` on these projects silently defaults to `OBSERVATIONS_V2` rather than the schema column default. Use `OBSERVATIONS_V2` for all new integrations. Projects created before 2026-05-20 and self-hosted deployments are unaffected.
530
+ */
531
+ exportSource?: BlobStorageExportSource;
532
+ /**
533
+ * Field groups to include in each exported row.
534
+ *
535
+ * For exportSource `OBSERVATIONS_V2` or `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS`: must include `core` if provided. When omitted on create, the column default (all groups) applies. When omitted on update, the existing value is preserved.
536
+ *
537
+ * For exportSource `LEGACY_TRACES_OBSERVATIONS`: this field must be omitted or null. Sending an array (including an empty array) returns 400, because that source uses a fixed column set and does not honor field groups.
538
+ *
539
+ * `exportFieldGroups` requires `exportSource` to be provided in the same request.
540
+ */
541
+ exportFieldGroups?: BlobStorageExportFieldGroup[];
486
542
  }
487
543
 
488
544
  /**
@@ -505,6 +561,9 @@ interface BlobStorageIntegrationResponse {
505
561
  exportMode: BlobStorageExportMode;
506
562
  exportStartDate: string | null;
507
563
  compressed: boolean;
564
+ exportSource: BlobStorageExportSource;
565
+ /** Field groups included in each exported row for `OBSERVATIONS_V2` / `LEGACY_TRACES_AND_ENRICHED_OBSERVATIONS` sources. Always `null` when exportSource is `LEGACY_TRACES_OBSERVATIONS` (the field does not apply to that source; any legacy DB value is hidden from the public surface). */
566
+ exportFieldGroups: BlobStorageExportFieldGroup[] | null;
508
567
  nextSyncAt: string | null;
509
568
  lastSyncAt: string | null;
510
569
  lastError: string | null;
@@ -533,8 +592,8 @@ interface BlobStorageIntegrationsResponse {
533
592
  * - `up_to_date` — all available data has been exported; next export is scheduled for the future
534
593
  *
535
594
  * **ETL usage**: poll this endpoint and check for `up_to_date` status. Compare `lastSyncAt` against your
536
- * ETL bookmark to determine if new data is available. Note that exports run with a 30-minute lag buffer,
537
- * so `lastSyncAt` will always be at least 30 minutes behind real-time.
595
+ * ETL bookmark to determine if new data is available. Note that exports run with a 20-minute lag buffer,
596
+ * so `lastSyncAt` will always be at least 20 minutes behind real-time.
538
597
  */
539
598
  type BlobStorageSyncStatus = "idle" | "queued" | "up_to_date" | "disabled" | "error";
540
599
  declare const BlobStorageSyncStatus: {
@@ -571,18 +630,20 @@ interface BlobStorageIntegrationDeletionResponse {
571
630
  message: string;
572
631
  }
573
632
 
574
- declare const index$s_BlobStorageExportFrequency: typeof BlobStorageExportFrequency;
575
- declare const index$s_BlobStorageExportMode: typeof BlobStorageExportMode;
576
- type index$s_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
577
- declare const index$s_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
578
- type index$s_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
579
- type index$s_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
580
- declare const index$s_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
581
- type index$s_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
582
- declare const index$s_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
583
- type index$s_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
584
- declare namespace index$s {
585
- export { index$s_BlobStorageExportFrequency as BlobStorageExportFrequency, index$s_BlobStorageExportMode as BlobStorageExportMode, type index$s_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$s_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$s_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$s_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$s_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$s_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$s_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$s_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
633
+ declare const index$y_BlobStorageExportFieldGroup: typeof BlobStorageExportFieldGroup;
634
+ declare const index$y_BlobStorageExportFrequency: typeof BlobStorageExportFrequency;
635
+ declare const index$y_BlobStorageExportMode: typeof BlobStorageExportMode;
636
+ declare const index$y_BlobStorageExportSource: typeof BlobStorageExportSource;
637
+ type index$y_BlobStorageIntegrationDeletionResponse = BlobStorageIntegrationDeletionResponse;
638
+ declare const index$y_BlobStorageIntegrationFileType: typeof BlobStorageIntegrationFileType;
639
+ type index$y_BlobStorageIntegrationResponse = BlobStorageIntegrationResponse;
640
+ type index$y_BlobStorageIntegrationStatusResponse = BlobStorageIntegrationStatusResponse;
641
+ declare const index$y_BlobStorageIntegrationType: typeof BlobStorageIntegrationType;
642
+ type index$y_BlobStorageIntegrationsResponse = BlobStorageIntegrationsResponse;
643
+ declare const index$y_BlobStorageSyncStatus: typeof BlobStorageSyncStatus;
644
+ type index$y_CreateBlobStorageIntegrationRequest = CreateBlobStorageIntegrationRequest;
645
+ declare namespace index$y {
646
+ export { index$y_BlobStorageExportFieldGroup as BlobStorageExportFieldGroup, index$y_BlobStorageExportFrequency as BlobStorageExportFrequency, index$y_BlobStorageExportMode as BlobStorageExportMode, index$y_BlobStorageExportSource as BlobStorageExportSource, type index$y_BlobStorageIntegrationDeletionResponse as BlobStorageIntegrationDeletionResponse, index$y_BlobStorageIntegrationFileType as BlobStorageIntegrationFileType, type index$y_BlobStorageIntegrationResponse as BlobStorageIntegrationResponse, type index$y_BlobStorageIntegrationStatusResponse as BlobStorageIntegrationStatusResponse, index$y_BlobStorageIntegrationType as BlobStorageIntegrationType, type index$y_BlobStorageIntegrationsResponse as BlobStorageIntegrationsResponse, index$y_BlobStorageSyncStatus as BlobStorageSyncStatus, type index$y_CreateBlobStorageIntegrationRequest as CreateBlobStorageIntegrationRequest };
586
647
  }
587
648
 
588
649
  /**
@@ -638,12 +699,12 @@ interface GetCommentsRequest {
638
699
  authorUserId?: string;
639
700
  }
640
701
 
641
- type index$r_CreateCommentRequest = CreateCommentRequest;
642
- type index$r_CreateCommentResponse = CreateCommentResponse;
643
- type index$r_GetCommentsRequest = GetCommentsRequest;
644
- type index$r_GetCommentsResponse = GetCommentsResponse;
645
- declare namespace index$r {
646
- export type { index$r_CreateCommentRequest as CreateCommentRequest, index$r_CreateCommentResponse as CreateCommentResponse, index$r_GetCommentsRequest as GetCommentsRequest, index$r_GetCommentsResponse as GetCommentsResponse };
702
+ type index$x_CreateCommentRequest = CreateCommentRequest;
703
+ type index$x_CreateCommentResponse = CreateCommentResponse;
704
+ type index$x_GetCommentsRequest = GetCommentsRequest;
705
+ type index$x_GetCommentsResponse = GetCommentsResponse;
706
+ declare namespace index$x {
707
+ export type { index$x_CreateCommentRequest as CreateCommentRequest, index$x_CreateCommentResponse as CreateCommentResponse, index$x_GetCommentsRequest as GetCommentsRequest, index$x_GetCommentsResponse as GetCommentsResponse };
647
708
  }
648
709
 
649
710
  /**
@@ -874,6 +935,8 @@ interface ObservationV2 {
874
935
  costDetails?: Record<string, number>;
875
936
  /** The total cost of the observation in USD */
876
937
  totalCost?: number | null;
938
+ /** The name of the pricing tier applied to this observation's usage costs */
939
+ usagePricingTierName?: string | null;
877
940
  /** The prompt ID associated with the observation */
878
941
  promptId?: string | null;
879
942
  /** The prompt name associated with the observation */
@@ -884,8 +947,20 @@ interface ObservationV2 {
884
947
  latency?: number | null;
885
948
  /** The time to first token in seconds */
886
949
  timeToFirstToken?: number | null;
887
- /** The matched model ID */
888
- modelId?: string | null;
950
+ /** The matched model ID. Null when the `model` field group is not requested. */
951
+ modelId: string | null;
952
+ /** The input token price (USD per unit) from the matched model, serialized as a decimal string (e.g. "0.0001"). Null when the `model` field group is not requested. */
953
+ inputPrice: string | null;
954
+ /** The output token price (USD per unit) from the matched model, serialized as a decimal string (e.g. "0.0001"). Null when the `model` field group is not requested. */
955
+ outputPrice: string | null;
956
+ /** The total token price (USD per unit) from the matched model, serialized as a decimal string (e.g. "0.0001"). Null when the `model` field group is not requested. */
957
+ totalPrice: string | null;
958
+ /** The name of the parent trace */
959
+ traceName?: string | null;
960
+ /** Tags from the parent trace (denormalized onto the observation) */
961
+ tags?: string[] | null;
962
+ /** The release version of the parent trace */
963
+ release?: string | null;
889
964
  }
890
965
 
891
966
  /**
@@ -1736,7 +1811,7 @@ declare class Error$1 extends LangfuseAPIError {
1736
1811
  * This file was auto-generated by Fern from our API Definition.
1737
1812
  */
1738
1813
 
1739
- declare class UnauthorizedError extends LangfuseAPIError {
1814
+ declare class UnauthorizedError$1 extends LangfuseAPIError {
1740
1815
  constructor(body?: unknown, rawResponse?: RawResponse);
1741
1816
  }
1742
1817
 
@@ -1744,7 +1819,7 @@ declare class UnauthorizedError extends LangfuseAPIError {
1744
1819
  * This file was auto-generated by Fern from our API Definition.
1745
1820
  */
1746
1821
 
1747
- declare class AccessDeniedError extends LangfuseAPIError {
1822
+ declare class AccessDeniedError$1 extends LangfuseAPIError {
1748
1823
  constructor(body?: unknown, rawResponse?: RawResponse);
1749
1824
  }
1750
1825
 
@@ -1752,7 +1827,7 @@ declare class AccessDeniedError extends LangfuseAPIError {
1752
1827
  * This file was auto-generated by Fern from our API Definition.
1753
1828
  */
1754
1829
 
1755
- declare class NotFoundError extends LangfuseAPIError {
1830
+ declare class NotFoundError$1 extends LangfuseAPIError {
1756
1831
  constructor(body?: unknown, rawResponse?: RawResponse);
1757
1832
  }
1758
1833
 
@@ -1760,63 +1835,55 @@ declare class NotFoundError extends LangfuseAPIError {
1760
1835
  * This file was auto-generated by Fern from our API Definition.
1761
1836
  */
1762
1837
 
1763
- declare class MethodNotAllowedError extends LangfuseAPIError {
1838
+ declare class MethodNotAllowedError$1 extends LangfuseAPIError {
1764
1839
  constructor(body?: unknown, rawResponse?: RawResponse);
1765
1840
  }
1766
1841
 
1767
- type index$q_AccessDeniedError = AccessDeniedError;
1768
- declare const index$q_AccessDeniedError: typeof AccessDeniedError;
1769
- type index$q_BaseScore = BaseScore;
1770
- type index$q_BaseScoreV1 = BaseScoreV1;
1771
- type index$q_BooleanScore = BooleanScore;
1772
- type index$q_BooleanScoreV1 = BooleanScoreV1;
1773
- type index$q_CategoricalScore = CategoricalScore;
1774
- type index$q_CategoricalScoreV1 = CategoricalScoreV1;
1775
- type index$q_Comment = Comment;
1776
- declare const index$q_CommentObjectType: typeof CommentObjectType;
1777
- type index$q_ConfigCategory = ConfigCategory;
1778
- type index$q_CorrectionScore = CorrectionScore;
1779
- type index$q_CreateScoreValue = CreateScoreValue;
1780
- type index$q_Dataset = Dataset;
1781
- type index$q_DatasetItem = DatasetItem;
1782
- type index$q_DatasetRun = DatasetRun;
1783
- type index$q_DatasetRunItem = DatasetRunItem;
1784
- type index$q_DatasetRunWithItems = DatasetRunWithItems;
1785
- declare const index$q_DatasetStatus: typeof DatasetStatus;
1786
- type index$q_MapValue = MapValue;
1787
- type index$q_MethodNotAllowedError = MethodNotAllowedError;
1788
- declare const index$q_MethodNotAllowedError: typeof MethodNotAllowedError;
1789
- type index$q_Model = Model;
1790
- type index$q_ModelPrice = ModelPrice;
1791
- declare const index$q_ModelUsageUnit: typeof ModelUsageUnit;
1792
- type index$q_NotFoundError = NotFoundError;
1793
- declare const index$q_NotFoundError: typeof NotFoundError;
1794
- type index$q_NumericScore = NumericScore;
1795
- type index$q_NumericScoreV1 = NumericScoreV1;
1796
- type index$q_Observation = Observation;
1797
- declare const index$q_ObservationLevel: typeof ObservationLevel;
1798
- type index$q_ObservationV2 = ObservationV2;
1799
- type index$q_ObservationsView = ObservationsView;
1800
- type index$q_PricingTier = PricingTier;
1801
- type index$q_PricingTierCondition = PricingTierCondition;
1802
- type index$q_PricingTierInput = PricingTierInput;
1803
- declare const index$q_PricingTierOperator: typeof PricingTierOperator;
1804
- declare const index$q_Score: typeof Score;
1805
- type index$q_ScoreConfig = ScoreConfig;
1806
- declare const index$q_ScoreConfigDataType: typeof ScoreConfigDataType;
1807
- declare const index$q_ScoreDataType: typeof ScoreDataType;
1808
- declare const index$q_ScoreSource: typeof ScoreSource;
1809
- type index$q_Session = Session;
1810
- type index$q_SessionWithTraces = SessionWithTraces;
1811
- type index$q_TextScore = TextScore;
1812
- type index$q_TextScoreV1 = TextScoreV1;
1813
- type index$q_TraceWithDetails = TraceWithDetails;
1814
- type index$q_TraceWithFullDetails = TraceWithFullDetails;
1815
- type index$q_UnauthorizedError = UnauthorizedError;
1816
- declare const index$q_UnauthorizedError: typeof UnauthorizedError;
1817
- type index$q_Usage = Usage;
1818
- declare namespace index$q {
1819
- export { index$q_AccessDeniedError as AccessDeniedError, type index$q_BaseScore as BaseScore, type index$q_BaseScoreV1 as BaseScoreV1, type index$q_BooleanScore as BooleanScore, type index$q_BooleanScoreV1 as BooleanScoreV1, type index$q_CategoricalScore as CategoricalScore, type index$q_CategoricalScoreV1 as CategoricalScoreV1, type index$q_Comment as Comment, index$q_CommentObjectType as CommentObjectType, type index$q_ConfigCategory as ConfigCategory, type index$q_CorrectionScore as CorrectionScore, type index$q_CreateScoreValue as CreateScoreValue, type index$q_Dataset as Dataset, type index$q_DatasetItem as DatasetItem, type index$q_DatasetRun as DatasetRun, type index$q_DatasetRunItem as DatasetRunItem, type index$q_DatasetRunWithItems as DatasetRunWithItems, index$q_DatasetStatus as DatasetStatus, Error$1 as Error, type index$q_MapValue as MapValue, index$q_MethodNotAllowedError as MethodNotAllowedError, type index$q_Model as Model, type index$q_ModelPrice as ModelPrice, index$q_ModelUsageUnit as ModelUsageUnit, index$q_NotFoundError as NotFoundError, type index$q_NumericScore as NumericScore, type index$q_NumericScoreV1 as NumericScoreV1, type index$q_Observation as Observation, index$q_ObservationLevel as ObservationLevel, type index$q_ObservationV2 as ObservationV2, type index$q_ObservationsView as ObservationsView, type index$q_PricingTier as PricingTier, type index$q_PricingTierCondition as PricingTierCondition, type index$q_PricingTierInput as PricingTierInput, index$q_PricingTierOperator as PricingTierOperator, index$q_Score as Score, type index$q_ScoreConfig as ScoreConfig, index$q_ScoreConfigDataType as ScoreConfigDataType, index$q_ScoreDataType as ScoreDataType, index$q_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$q_Session as Session, type index$q_SessionWithTraces as SessionWithTraces, type index$q_TextScore as TextScore, type index$q_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$q_TraceWithDetails as TraceWithDetails, type index$q_TraceWithFullDetails as TraceWithFullDetails, index$q_UnauthorizedError as UnauthorizedError, type index$q_Usage as Usage };
1842
+ type index$w_BaseScore = BaseScore;
1843
+ type index$w_BaseScoreV1 = BaseScoreV1;
1844
+ type index$w_BooleanScore = BooleanScore;
1845
+ type index$w_BooleanScoreV1 = BooleanScoreV1;
1846
+ type index$w_CategoricalScore = CategoricalScore;
1847
+ type index$w_CategoricalScoreV1 = CategoricalScoreV1;
1848
+ type index$w_Comment = Comment;
1849
+ declare const index$w_CommentObjectType: typeof CommentObjectType;
1850
+ type index$w_ConfigCategory = ConfigCategory;
1851
+ type index$w_CorrectionScore = CorrectionScore;
1852
+ type index$w_CreateScoreValue = CreateScoreValue;
1853
+ type index$w_Dataset = Dataset;
1854
+ type index$w_DatasetItem = DatasetItem;
1855
+ type index$w_DatasetRun = DatasetRun;
1856
+ type index$w_DatasetRunItem = DatasetRunItem;
1857
+ type index$w_DatasetRunWithItems = DatasetRunWithItems;
1858
+ declare const index$w_DatasetStatus: typeof DatasetStatus;
1859
+ type index$w_MapValue = MapValue;
1860
+ type index$w_Model = Model;
1861
+ type index$w_ModelPrice = ModelPrice;
1862
+ declare const index$w_ModelUsageUnit: typeof ModelUsageUnit;
1863
+ type index$w_NumericScore = NumericScore;
1864
+ type index$w_NumericScoreV1 = NumericScoreV1;
1865
+ type index$w_Observation = Observation;
1866
+ declare const index$w_ObservationLevel: typeof ObservationLevel;
1867
+ type index$w_ObservationV2 = ObservationV2;
1868
+ type index$w_ObservationsView = ObservationsView;
1869
+ type index$w_PricingTier = PricingTier;
1870
+ type index$w_PricingTierCondition = PricingTierCondition;
1871
+ type index$w_PricingTierInput = PricingTierInput;
1872
+ declare const index$w_PricingTierOperator: typeof PricingTierOperator;
1873
+ declare const index$w_Score: typeof Score;
1874
+ type index$w_ScoreConfig = ScoreConfig;
1875
+ declare const index$w_ScoreConfigDataType: typeof ScoreConfigDataType;
1876
+ declare const index$w_ScoreDataType: typeof ScoreDataType;
1877
+ declare const index$w_ScoreSource: typeof ScoreSource;
1878
+ type index$w_Session = Session;
1879
+ type index$w_SessionWithTraces = SessionWithTraces;
1880
+ type index$w_TextScore = TextScore;
1881
+ type index$w_TextScoreV1 = TextScoreV1;
1882
+ type index$w_TraceWithDetails = TraceWithDetails;
1883
+ type index$w_TraceWithFullDetails = TraceWithFullDetails;
1884
+ type index$w_Usage = Usage;
1885
+ declare namespace index$w {
1886
+ export { AccessDeniedError$1 as AccessDeniedError, type index$w_BaseScore as BaseScore, type index$w_BaseScoreV1 as BaseScoreV1, type index$w_BooleanScore as BooleanScore, type index$w_BooleanScoreV1 as BooleanScoreV1, type index$w_CategoricalScore as CategoricalScore, type index$w_CategoricalScoreV1 as CategoricalScoreV1, type index$w_Comment as Comment, index$w_CommentObjectType as CommentObjectType, type index$w_ConfigCategory as ConfigCategory, type index$w_CorrectionScore as CorrectionScore, type index$w_CreateScoreValue as CreateScoreValue, type index$w_Dataset as Dataset, type index$w_DatasetItem as DatasetItem, type index$w_DatasetRun as DatasetRun, type index$w_DatasetRunItem as DatasetRunItem, type index$w_DatasetRunWithItems as DatasetRunWithItems, index$w_DatasetStatus as DatasetStatus, Error$1 as Error, type index$w_MapValue as MapValue, MethodNotAllowedError$1 as MethodNotAllowedError, type index$w_Model as Model, type index$w_ModelPrice as ModelPrice, index$w_ModelUsageUnit as ModelUsageUnit, NotFoundError$1 as NotFoundError, type index$w_NumericScore as NumericScore, type index$w_NumericScoreV1 as NumericScoreV1, type index$w_Observation as Observation, index$w_ObservationLevel as ObservationLevel, type index$w_ObservationV2 as ObservationV2, type index$w_ObservationsView as ObservationsView, type index$w_PricingTier as PricingTier, type index$w_PricingTierCondition as PricingTierCondition, type index$w_PricingTierInput as PricingTierInput, index$w_PricingTierOperator as PricingTierOperator, index$w_Score as Score, type index$w_ScoreConfig as ScoreConfig, index$w_ScoreConfigDataType as ScoreConfigDataType, index$w_ScoreDataType as ScoreDataType, index$w_ScoreSource as ScoreSource, ScoreV1$1 as ScoreV1, type index$w_Session as Session, type index$w_SessionWithTraces as SessionWithTraces, type index$w_TextScore as TextScore, type index$w_TextScoreV1 as TextScoreV1, type Trace$1 as Trace, type index$w_TraceWithDetails as TraceWithDetails, type index$w_TraceWithFullDetails as TraceWithFullDetails, UnauthorizedError$1 as UnauthorizedError, type index$w_Usage as Usage };
1820
1887
  }
1821
1888
 
1822
1889
  /**
@@ -1876,12 +1943,12 @@ interface GetDatasetItemsRequest {
1876
1943
  limit?: number;
1877
1944
  }
1878
1945
 
1879
- type index$p_CreateDatasetItemRequest = CreateDatasetItemRequest;
1880
- type index$p_DeleteDatasetItemResponse = DeleteDatasetItemResponse;
1881
- type index$p_GetDatasetItemsRequest = GetDatasetItemsRequest;
1882
- type index$p_PaginatedDatasetItems = PaginatedDatasetItems;
1883
- declare namespace index$p {
1884
- export type { index$p_CreateDatasetItemRequest as CreateDatasetItemRequest, index$p_DeleteDatasetItemResponse as DeleteDatasetItemResponse, index$p_GetDatasetItemsRequest as GetDatasetItemsRequest, index$p_PaginatedDatasetItems as PaginatedDatasetItems };
1946
+ type index$v_CreateDatasetItemRequest = CreateDatasetItemRequest;
1947
+ type index$v_DeleteDatasetItemResponse = DeleteDatasetItemResponse;
1948
+ type index$v_GetDatasetItemsRequest = GetDatasetItemsRequest;
1949
+ type index$v_PaginatedDatasetItems = PaginatedDatasetItems;
1950
+ declare namespace index$v {
1951
+ export type { index$v_CreateDatasetItemRequest as CreateDatasetItemRequest, index$v_DeleteDatasetItemResponse as DeleteDatasetItemResponse, index$v_GetDatasetItemsRequest as GetDatasetItemsRequest, index$v_PaginatedDatasetItems as PaginatedDatasetItems };
1885
1952
  }
1886
1953
 
1887
1954
  /**
@@ -1936,11 +2003,11 @@ interface ListDatasetRunItemsRequest {
1936
2003
  limit?: number;
1937
2004
  }
1938
2005
 
1939
- type index$o_CreateDatasetRunItemRequest = CreateDatasetRunItemRequest;
1940
- type index$o_ListDatasetRunItemsRequest = ListDatasetRunItemsRequest;
1941
- type index$o_PaginatedDatasetRunItems = PaginatedDatasetRunItems;
1942
- declare namespace index$o {
1943
- export type { index$o_CreateDatasetRunItemRequest as CreateDatasetRunItemRequest, index$o_ListDatasetRunItemsRequest as ListDatasetRunItemsRequest, index$o_PaginatedDatasetRunItems as PaginatedDatasetRunItems };
2006
+ type index$u_CreateDatasetRunItemRequest = CreateDatasetRunItemRequest;
2007
+ type index$u_ListDatasetRunItemsRequest = ListDatasetRunItemsRequest;
2008
+ type index$u_PaginatedDatasetRunItems = PaginatedDatasetRunItems;
2009
+ declare namespace index$u {
2010
+ export type { index$u_CreateDatasetRunItemRequest as CreateDatasetRunItemRequest, index$u_ListDatasetRunItemsRequest as ListDatasetRunItemsRequest, index$u_PaginatedDatasetRunItems as PaginatedDatasetRunItems };
1944
2011
  }
1945
2012
 
1946
2013
  /**
@@ -2009,14 +2076,14 @@ interface GetDatasetRunsRequest {
2009
2076
  limit?: number;
2010
2077
  }
2011
2078
 
2012
- type index$n_CreateDatasetRequest = CreateDatasetRequest;
2013
- type index$n_DeleteDatasetRunResponse = DeleteDatasetRunResponse;
2014
- type index$n_GetDatasetRunsRequest = GetDatasetRunsRequest;
2015
- type index$n_GetDatasetsRequest = GetDatasetsRequest;
2016
- type index$n_PaginatedDatasetRuns = PaginatedDatasetRuns;
2017
- type index$n_PaginatedDatasets = PaginatedDatasets;
2018
- declare namespace index$n {
2019
- export type { index$n_CreateDatasetRequest as CreateDatasetRequest, index$n_DeleteDatasetRunResponse as DeleteDatasetRunResponse, index$n_GetDatasetRunsRequest as GetDatasetRunsRequest, index$n_GetDatasetsRequest as GetDatasetsRequest, index$n_PaginatedDatasetRuns as PaginatedDatasetRuns, index$n_PaginatedDatasets as PaginatedDatasets };
2079
+ type index$t_CreateDatasetRequest = CreateDatasetRequest;
2080
+ type index$t_DeleteDatasetRunResponse = DeleteDatasetRunResponse;
2081
+ type index$t_GetDatasetRunsRequest = GetDatasetRunsRequest;
2082
+ type index$t_GetDatasetsRequest = GetDatasetsRequest;
2083
+ type index$t_PaginatedDatasetRuns = PaginatedDatasetRuns;
2084
+ type index$t_PaginatedDatasets = PaginatedDatasets;
2085
+ declare namespace index$t {
2086
+ export type { index$t_CreateDatasetRequest as CreateDatasetRequest, index$t_DeleteDatasetRunResponse as DeleteDatasetRunResponse, index$t_GetDatasetRunsRequest as GetDatasetRunsRequest, index$t_GetDatasetsRequest as GetDatasetsRequest, index$t_PaginatedDatasetRuns as PaginatedDatasetRuns, index$t_PaginatedDatasets as PaginatedDatasets };
2020
2087
  }
2021
2088
 
2022
2089
  /**
@@ -2043,11 +2110,11 @@ declare class ServiceUnavailableError extends LangfuseAPIError {
2043
2110
  constructor(rawResponse?: RawResponse);
2044
2111
  }
2045
2112
 
2046
- type index$m_HealthResponse = HealthResponse;
2047
- type index$m_ServiceUnavailableError = ServiceUnavailableError;
2048
- declare const index$m_ServiceUnavailableError: typeof ServiceUnavailableError;
2049
- declare namespace index$m {
2050
- export { type index$m_HealthResponse as HealthResponse, index$m_ServiceUnavailableError as ServiceUnavailableError };
2113
+ type index$s_HealthResponse = HealthResponse;
2114
+ type index$s_ServiceUnavailableError = ServiceUnavailableError;
2115
+ declare const index$s_ServiceUnavailableError: typeof ServiceUnavailableError;
2116
+ declare namespace index$s {
2117
+ export { type index$s_HealthResponse as HealthResponse, index$s_ServiceUnavailableError as ServiceUnavailableError };
2051
2118
  }
2052
2119
 
2053
2120
  /**
@@ -2602,41 +2669,41 @@ interface IngestionRequest {
2602
2669
  metadata?: unknown;
2603
2670
  }
2604
2671
 
2605
- type index$l_BaseEvent = BaseEvent;
2606
- type index$l_CreateEventBody = CreateEventBody;
2607
- type index$l_CreateEventEvent = CreateEventEvent;
2608
- type index$l_CreateGenerationBody = CreateGenerationBody;
2609
- type index$l_CreateGenerationEvent = CreateGenerationEvent;
2610
- type index$l_CreateObservationEvent = CreateObservationEvent;
2611
- type index$l_CreateSpanBody = CreateSpanBody;
2612
- type index$l_CreateSpanEvent = CreateSpanEvent;
2613
- type index$l_IngestionError = IngestionError;
2614
- declare const index$l_IngestionEvent: typeof IngestionEvent;
2615
- type index$l_IngestionRequest = IngestionRequest;
2616
- type index$l_IngestionResponse = IngestionResponse;
2617
- type index$l_IngestionSuccess = IngestionSuccess;
2618
- type index$l_IngestionUsage = IngestionUsage;
2619
- type index$l_ObservationBody = ObservationBody;
2620
- declare const index$l_ObservationType: typeof ObservationType;
2621
- type index$l_OpenAiCompletionUsageSchema = OpenAiCompletionUsageSchema;
2622
- type index$l_OpenAiResponseUsageSchema = OpenAiResponseUsageSchema;
2623
- type index$l_OpenAiUsage = OpenAiUsage;
2624
- type index$l_OptionalObservationBody = OptionalObservationBody;
2625
- type index$l_ScoreBody = ScoreBody;
2626
- type index$l_ScoreEvent = ScoreEvent;
2627
- type index$l_SdkLogBody = SdkLogBody;
2628
- type index$l_SdkLogEvent = SdkLogEvent;
2629
- type index$l_TraceBody = TraceBody;
2630
- type index$l_TraceEvent = TraceEvent;
2631
- type index$l_UpdateEventBody = UpdateEventBody;
2632
- type index$l_UpdateGenerationBody = UpdateGenerationBody;
2633
- type index$l_UpdateGenerationEvent = UpdateGenerationEvent;
2634
- type index$l_UpdateObservationEvent = UpdateObservationEvent;
2635
- type index$l_UpdateSpanBody = UpdateSpanBody;
2636
- type index$l_UpdateSpanEvent = UpdateSpanEvent;
2637
- type index$l_UsageDetails = UsageDetails;
2638
- declare namespace index$l {
2639
- export { type index$l_BaseEvent as BaseEvent, type index$l_CreateEventBody as CreateEventBody, type index$l_CreateEventEvent as CreateEventEvent, type index$l_CreateGenerationBody as CreateGenerationBody, type index$l_CreateGenerationEvent as CreateGenerationEvent, type index$l_CreateObservationEvent as CreateObservationEvent, type index$l_CreateSpanBody as CreateSpanBody, type index$l_CreateSpanEvent as CreateSpanEvent, type index$l_IngestionError as IngestionError, index$l_IngestionEvent as IngestionEvent, type index$l_IngestionRequest as IngestionRequest, type index$l_IngestionResponse as IngestionResponse, type index$l_IngestionSuccess as IngestionSuccess, type index$l_IngestionUsage as IngestionUsage, type index$l_ObservationBody as ObservationBody, index$l_ObservationType as ObservationType, type index$l_OpenAiCompletionUsageSchema as OpenAiCompletionUsageSchema, type index$l_OpenAiResponseUsageSchema as OpenAiResponseUsageSchema, type index$l_OpenAiUsage as OpenAiUsage, type index$l_OptionalObservationBody as OptionalObservationBody, type index$l_ScoreBody as ScoreBody, type index$l_ScoreEvent as ScoreEvent, type index$l_SdkLogBody as SdkLogBody, type index$l_SdkLogEvent as SdkLogEvent, type index$l_TraceBody as TraceBody, type index$l_TraceEvent as TraceEvent, type index$l_UpdateEventBody as UpdateEventBody, type index$l_UpdateGenerationBody as UpdateGenerationBody, type index$l_UpdateGenerationEvent as UpdateGenerationEvent, type index$l_UpdateObservationEvent as UpdateObservationEvent, type index$l_UpdateSpanBody as UpdateSpanBody, type index$l_UpdateSpanEvent as UpdateSpanEvent, type index$l_UsageDetails as UsageDetails };
2672
+ type index$r_BaseEvent = BaseEvent;
2673
+ type index$r_CreateEventBody = CreateEventBody;
2674
+ type index$r_CreateEventEvent = CreateEventEvent;
2675
+ type index$r_CreateGenerationBody = CreateGenerationBody;
2676
+ type index$r_CreateGenerationEvent = CreateGenerationEvent;
2677
+ type index$r_CreateObservationEvent = CreateObservationEvent;
2678
+ type index$r_CreateSpanBody = CreateSpanBody;
2679
+ type index$r_CreateSpanEvent = CreateSpanEvent;
2680
+ type index$r_IngestionError = IngestionError;
2681
+ declare const index$r_IngestionEvent: typeof IngestionEvent;
2682
+ type index$r_IngestionRequest = IngestionRequest;
2683
+ type index$r_IngestionResponse = IngestionResponse;
2684
+ type index$r_IngestionSuccess = IngestionSuccess;
2685
+ type index$r_IngestionUsage = IngestionUsage;
2686
+ type index$r_ObservationBody = ObservationBody;
2687
+ declare const index$r_ObservationType: typeof ObservationType;
2688
+ type index$r_OpenAiCompletionUsageSchema = OpenAiCompletionUsageSchema;
2689
+ type index$r_OpenAiResponseUsageSchema = OpenAiResponseUsageSchema;
2690
+ type index$r_OpenAiUsage = OpenAiUsage;
2691
+ type index$r_OptionalObservationBody = OptionalObservationBody;
2692
+ type index$r_ScoreBody = ScoreBody;
2693
+ type index$r_ScoreEvent = ScoreEvent;
2694
+ type index$r_SdkLogBody = SdkLogBody;
2695
+ type index$r_SdkLogEvent = SdkLogEvent;
2696
+ type index$r_TraceBody = TraceBody;
2697
+ type index$r_TraceEvent = TraceEvent;
2698
+ type index$r_UpdateEventBody = UpdateEventBody;
2699
+ type index$r_UpdateGenerationBody = UpdateGenerationBody;
2700
+ type index$r_UpdateGenerationEvent = UpdateGenerationEvent;
2701
+ type index$r_UpdateObservationEvent = UpdateObservationEvent;
2702
+ type index$r_UpdateSpanBody = UpdateSpanBody;
2703
+ type index$r_UpdateSpanEvent = UpdateSpanEvent;
2704
+ type index$r_UsageDetails = UsageDetails;
2705
+ declare namespace index$r {
2706
+ export { type index$r_BaseEvent as BaseEvent, type index$r_CreateEventBody as CreateEventBody, type index$r_CreateEventEvent as CreateEventEvent, type index$r_CreateGenerationBody as CreateGenerationBody, type index$r_CreateGenerationEvent as CreateGenerationEvent, type index$r_CreateObservationEvent as CreateObservationEvent, type index$r_CreateSpanBody as CreateSpanBody, type index$r_CreateSpanEvent as CreateSpanEvent, type index$r_IngestionError as IngestionError, index$r_IngestionEvent as IngestionEvent, type index$r_IngestionRequest as IngestionRequest, type index$r_IngestionResponse as IngestionResponse, type index$r_IngestionSuccess as IngestionSuccess, type index$r_IngestionUsage as IngestionUsage, type index$r_ObservationBody as ObservationBody, index$r_ObservationType as ObservationType, type index$r_OpenAiCompletionUsageSchema as OpenAiCompletionUsageSchema, type index$r_OpenAiResponseUsageSchema as OpenAiResponseUsageSchema, type index$r_OpenAiUsage as OpenAiUsage, type index$r_OptionalObservationBody as OptionalObservationBody, type index$r_ScoreBody as ScoreBody, type index$r_ScoreEvent as ScoreEvent, type index$r_SdkLogBody as SdkLogBody, type index$r_SdkLogEvent as SdkLogEvent, type index$r_TraceBody as TraceBody, type index$r_TraceEvent as TraceEvent, type index$r_UpdateEventBody as UpdateEventBody, type index$r_UpdateGenerationBody as UpdateGenerationBody, type index$r_UpdateGenerationEvent as UpdateGenerationEvent, type index$r_UpdateObservationEvent as UpdateObservationEvent, type index$r_UpdateSpanBody as UpdateSpanBody, type index$r_UpdateSpanEvent as UpdateSpanEvent, type index$r_UsageDetails as UsageDetails };
2640
2707
  }
2641
2708
 
2642
2709
  /**
@@ -2707,10 +2774,10 @@ interface GetMetricsRequest {
2707
2774
  query: string;
2708
2775
  }
2709
2776
 
2710
- type index$k_GetMetricsRequest = GetMetricsRequest;
2711
- type index$k_MetricsResponse = MetricsResponse;
2712
- declare namespace index$k {
2713
- export type { index$k_GetMetricsRequest as GetMetricsRequest, index$k_MetricsResponse as MetricsResponse };
2777
+ type index$q_GetMetricsRequest = GetMetricsRequest;
2778
+ type index$q_MetricsResponse = MetricsResponse;
2779
+ declare namespace index$q {
2780
+ export type { index$q_GetMetricsRequest as GetMetricsRequest, index$q_MetricsResponse as MetricsResponse };
2714
2781
  }
2715
2782
 
2716
2783
  /**
@@ -2857,10 +2924,10 @@ interface GetObservationsRequest {
2857
2924
  filter?: string;
2858
2925
  }
2859
2926
 
2860
- type index$j_GetObservationsRequest = GetObservationsRequest;
2861
- type index$j_ObservationsViews = ObservationsViews;
2862
- declare namespace index$j {
2863
- export type { index$j_GetObservationsRequest as GetObservationsRequest, Observations$1 as Observations, index$j_ObservationsViews as ObservationsViews };
2927
+ type index$p_GetObservationsRequest = GetObservationsRequest;
2928
+ type index$p_ObservationsViews = ObservationsViews;
2929
+ declare namespace index$p {
2930
+ export type { index$p_GetObservationsRequest as GetObservationsRequest, Observations$1 as Observations, index$p_ObservationsViews as ObservationsViews };
2864
2931
  }
2865
2932
 
2866
2933
  /**
@@ -2934,6 +3001,17 @@ declare namespace index$j {
2934
3001
  * dataType: LangfuseAPI.ScoreDataType.Text,
2935
3002
  * traceId: "cdef-1234-5678-90ab"
2936
3003
  * }
3004
+ *
3005
+ * @example
3006
+ * {
3007
+ * name: "accuracy",
3008
+ * value: 0.9,
3009
+ * dataType: LangfuseAPI.ScoreDataType.Numeric,
3010
+ * configId: "9203-4567-89ab-cdef",
3011
+ * traceId: "cdef-1234-5678-90ab",
3012
+ * source: LangfuseAPI.legacy.CreateScoreSource.Annotation,
3013
+ * queueId: "aq-1234-5678-90ab-cdef"
3014
+ * }
2937
3015
  */
2938
3016
  interface CreateScoreRequest {
2939
3017
  id?: string;
@@ -2954,8 +3032,24 @@ interface CreateScoreRequest {
2954
3032
  dataType?: ScoreDataType;
2955
3033
  /** Reference a score config on a score. The unique langfuse identifier of a score config. When passing this field, the dataType and stringValue fields are automatically populated. */
2956
3034
  configId?: string;
3035
+ /** The source of the score. Defaults to API. Set to ANNOTATION to prefill scores (e.g. from an LLM) for a human reviewer to verify in an annotation queue. When source is ANNOTATION, a configId is required unless dataType is CORRECTION. EVAL is reserved for internal evaluator outputs and is not accepted on this endpoint. */
3036
+ source?: CreateScoreSource;
2957
3037
  }
2958
3038
 
3039
+ /**
3040
+ * This file was auto-generated by Fern from our API Definition.
3041
+ */
3042
+ /**
3043
+ * Source values accepted when creating a score via the public REST API.
3044
+ * EVAL is reserved for internal evaluator outputs and is intentionally not
3045
+ * exposed here — use commons.ScoreSource when reading scores.
3046
+ */
3047
+ type CreateScoreSource = "API" | "ANNOTATION";
3048
+ declare const CreateScoreSource: {
3049
+ readonly Api: "API";
3050
+ readonly Annotation: "ANNOTATION";
3051
+ };
3052
+
2959
3053
  /**
2960
3054
  * This file was auto-generated by Fern from our API Definition.
2961
3055
  */
@@ -2964,20 +3058,22 @@ interface CreateScoreResponse {
2964
3058
  id: string;
2965
3059
  }
2966
3060
 
2967
- type index$i_CreateScoreRequest = CreateScoreRequest;
2968
- type index$i_CreateScoreResponse = CreateScoreResponse;
2969
- declare namespace index$i {
2970
- export type { index$i_CreateScoreRequest as CreateScoreRequest, index$i_CreateScoreResponse as CreateScoreResponse };
3061
+ type index$o_CreateScoreRequest = CreateScoreRequest;
3062
+ type index$o_CreateScoreResponse = CreateScoreResponse;
3063
+ declare const index$o_CreateScoreSource: typeof CreateScoreSource;
3064
+ declare namespace index$o {
3065
+ export { type index$o_CreateScoreRequest as CreateScoreRequest, type index$o_CreateScoreResponse as CreateScoreResponse, index$o_CreateScoreSource as CreateScoreSource };
2971
3066
  }
2972
3067
 
2973
- type index$h_CreateScoreRequest = CreateScoreRequest;
2974
- type index$h_CreateScoreResponse = CreateScoreResponse;
2975
- type index$h_GetMetricsRequest = GetMetricsRequest;
2976
- type index$h_GetObservationsRequest = GetObservationsRequest;
2977
- type index$h_MetricsResponse = MetricsResponse;
2978
- type index$h_ObservationsViews = ObservationsViews;
2979
- declare namespace index$h {
2980
- export { type index$h_CreateScoreRequest as CreateScoreRequest, type index$h_CreateScoreResponse as CreateScoreResponse, type index$h_GetMetricsRequest as GetMetricsRequest, type index$h_GetObservationsRequest as GetObservationsRequest, type index$h_MetricsResponse as MetricsResponse, type Observations$1 as Observations, type index$h_ObservationsViews as ObservationsViews, index$k as metricsV1, index$j as observationsV1, index$i as scoreV1 };
3068
+ type index$n_CreateScoreRequest = CreateScoreRequest;
3069
+ type index$n_CreateScoreResponse = CreateScoreResponse;
3070
+ declare const index$n_CreateScoreSource: typeof CreateScoreSource;
3071
+ type index$n_GetMetricsRequest = GetMetricsRequest;
3072
+ type index$n_GetObservationsRequest = GetObservationsRequest;
3073
+ type index$n_MetricsResponse = MetricsResponse;
3074
+ type index$n_ObservationsViews = ObservationsViews;
3075
+ declare namespace index$n {
3076
+ export { type index$n_CreateScoreRequest as CreateScoreRequest, type index$n_CreateScoreResponse as CreateScoreResponse, index$n_CreateScoreSource as CreateScoreSource, type index$n_GetMetricsRequest as GetMetricsRequest, type index$n_GetObservationsRequest as GetObservationsRequest, type index$n_MetricsResponse as MetricsResponse, type Observations$1 as Observations, type index$n_ObservationsViews as ObservationsViews, index$q as metricsV1, index$p as observationsV1, index$o as scoreV1 };
2981
3077
  }
2982
3078
 
2983
3079
  /**
@@ -3002,7 +3098,7 @@ interface LlmConnection {
3002
3098
  withDefaultModels: boolean;
3003
3099
  /** Keys of extra headers sent with requests (values excluded for security) */
3004
3100
  extraHeaderKeys: string[];
3005
- /** Adapter-specific configuration. Required for Bedrock (`{"region":"us-east-1"}`), optional for VertexAI (`{"location":"us-central1"}`), not used by other adapters. */
3101
+ /** Adapter-specific configuration. Required for Bedrock (`{"region":"us-east-1"}`), optional for OpenAI (`{"useResponsesApi":true}`), optional for VertexAI (`{"location":"us-central1"}`), not used by other adapters. */
3006
3102
  config?: Record<string, unknown>;
3007
3103
  createdAt: string;
3008
3104
  updatedAt: string;
@@ -3039,10 +3135,17 @@ interface UpsertLlmConnectionRequest {
3039
3135
  withDefaultModels?: boolean;
3040
3136
  /** Extra headers to send with requests */
3041
3137
  extraHeaders?: Record<string, string>;
3042
- /** Adapter-specific configuration. Validation rules: - **Bedrock**: Required. Must be `{"region": "<aws-region>"}` (e.g., `{"region":"us-east-1"}`) - **VertexAI**: Optional. If provided, must be `{"location": "<gcp-location>"}` (e.g., `{"location":"us-central1"}`) - **Other adapters**: Not supported. Omit this field or set to null. */
3138
+ /** Adapter-specific configuration. Validation rules: - **Bedrock**: Required. Must be `{"region": "<aws-region>"}` (e.g., `{"region":"us-east-1"}`) - **OpenAI**: Optional. If provided, must be `{"useResponsesApi": <boolean>}` to control whether Langfuse routes calls through OpenAI's Responses API. - **VertexAI**: Optional. If provided, must be `{"location": "<gcp-location>"}` (e.g., `{"location":"us-central1"}`) - **Other adapters**: Not supported. Omit this field or set to null. */
3043
3139
  config?: Record<string, unknown>;
3044
3140
  }
3045
3141
 
3142
+ /**
3143
+ * This file was auto-generated by Fern from our API Definition.
3144
+ */
3145
+ interface DeleteLlmConnectionResponse {
3146
+ message: string;
3147
+ }
3148
+
3046
3149
  /**
3047
3150
  * This file was auto-generated by Fern from our API Definition.
3048
3151
  */
@@ -3070,13 +3173,14 @@ interface GetLlmConnectionsRequest {
3070
3173
  limit?: number;
3071
3174
  }
3072
3175
 
3073
- type index$g_GetLlmConnectionsRequest = GetLlmConnectionsRequest;
3074
- declare const index$g_LlmAdapter: typeof LlmAdapter;
3075
- type index$g_LlmConnection = LlmConnection;
3076
- type index$g_PaginatedLlmConnections = PaginatedLlmConnections;
3077
- type index$g_UpsertLlmConnectionRequest = UpsertLlmConnectionRequest;
3078
- declare namespace index$g {
3079
- export { type index$g_GetLlmConnectionsRequest as GetLlmConnectionsRequest, index$g_LlmAdapter as LlmAdapter, type index$g_LlmConnection as LlmConnection, type index$g_PaginatedLlmConnections as PaginatedLlmConnections, type index$g_UpsertLlmConnectionRequest as UpsertLlmConnectionRequest };
3176
+ type index$m_DeleteLlmConnectionResponse = DeleteLlmConnectionResponse;
3177
+ type index$m_GetLlmConnectionsRequest = GetLlmConnectionsRequest;
3178
+ declare const index$m_LlmAdapter: typeof LlmAdapter;
3179
+ type index$m_LlmConnection = LlmConnection;
3180
+ type index$m_PaginatedLlmConnections = PaginatedLlmConnections;
3181
+ type index$m_UpsertLlmConnectionRequest = UpsertLlmConnectionRequest;
3182
+ declare namespace index$m {
3183
+ export { type index$m_DeleteLlmConnectionResponse as DeleteLlmConnectionResponse, type index$m_GetLlmConnectionsRequest as GetLlmConnectionsRequest, index$m_LlmAdapter as LlmAdapter, type index$m_LlmConnection as LlmConnection, type index$m_PaginatedLlmConnections as PaginatedLlmConnections, type index$m_UpsertLlmConnectionRequest as UpsertLlmConnectionRequest };
3080
3184
  }
3081
3185
 
3082
3186
  /**
@@ -3201,13 +3305,13 @@ declare const MediaContentType: {
3201
3305
  readonly ApplicationX7ZCompressed: "application/x-7z-compressed";
3202
3306
  };
3203
3307
 
3204
- type index$f_GetMediaResponse = GetMediaResponse;
3205
- type index$f_GetMediaUploadUrlRequest = GetMediaUploadUrlRequest;
3206
- type index$f_GetMediaUploadUrlResponse = GetMediaUploadUrlResponse;
3207
- declare const index$f_MediaContentType: typeof MediaContentType;
3208
- type index$f_PatchMediaBody = PatchMediaBody;
3209
- declare namespace index$f {
3210
- export { type index$f_GetMediaResponse as GetMediaResponse, type index$f_GetMediaUploadUrlRequest as GetMediaUploadUrlRequest, type index$f_GetMediaUploadUrlResponse as GetMediaUploadUrlResponse, index$f_MediaContentType as MediaContentType, type index$f_PatchMediaBody as PatchMediaBody };
3308
+ type index$l_GetMediaResponse = GetMediaResponse;
3309
+ type index$l_GetMediaUploadUrlRequest = GetMediaUploadUrlRequest;
3310
+ type index$l_GetMediaUploadUrlResponse = GetMediaUploadUrlResponse;
3311
+ declare const index$l_MediaContentType: typeof MediaContentType;
3312
+ type index$l_PatchMediaBody = PatchMediaBody;
3313
+ declare namespace index$l {
3314
+ export { type index$l_GetMediaResponse as GetMediaResponse, type index$l_GetMediaUploadUrlRequest as GetMediaUploadUrlRequest, type index$l_GetMediaUploadUrlResponse as GetMediaUploadUrlResponse, index$l_MediaContentType as MediaContentType, type index$l_PatchMediaBody as PatchMediaBody };
3211
3315
  }
3212
3316
 
3213
3317
  /**
@@ -3286,10 +3390,10 @@ interface GetMetricsV2Request {
3286
3390
  query: string;
3287
3391
  }
3288
3392
 
3289
- type index$e_GetMetricsV2Request = GetMetricsV2Request;
3290
- type index$e_MetricsV2Response = MetricsV2Response;
3291
- declare namespace index$e {
3292
- export type { index$e_GetMetricsV2Request as GetMetricsV2Request, index$e_MetricsV2Response as MetricsV2Response };
3393
+ type index$k_GetMetricsV2Request = GetMetricsV2Request;
3394
+ type index$k_MetricsV2Response = MetricsV2Response;
3395
+ declare namespace index$k {
3396
+ export type { index$k_GetMetricsV2Request as GetMetricsV2Request, index$k_MetricsV2Response as MetricsV2Response };
3293
3397
  }
3294
3398
 
3295
3399
  /**
@@ -3361,11 +3465,11 @@ interface GetModelsRequest {
3361
3465
  limit?: number;
3362
3466
  }
3363
3467
 
3364
- type index$d_CreateModelRequest = CreateModelRequest;
3365
- type index$d_GetModelsRequest = GetModelsRequest;
3366
- type index$d_PaginatedModels = PaginatedModels;
3367
- declare namespace index$d {
3368
- export type { index$d_CreateModelRequest as CreateModelRequest, index$d_GetModelsRequest as GetModelsRequest, index$d_PaginatedModels as PaginatedModels };
3468
+ type index$j_CreateModelRequest = CreateModelRequest;
3469
+ type index$j_GetModelsRequest = GetModelsRequest;
3470
+ type index$j_PaginatedModels = PaginatedModels;
3471
+ declare namespace index$j {
3472
+ export type { index$j_CreateModelRequest as CreateModelRequest, index$j_GetModelsRequest as GetModelsRequest, index$j_PaginatedModels as PaginatedModels };
3369
3473
  }
3370
3474
 
3371
3475
  /**
@@ -3406,7 +3510,7 @@ interface ObservationsV2Meta {
3406
3510
  interface GetObservationsV2Request {
3407
3511
  /**
3408
3512
  * Comma-separated list of field groups to include in the response.
3409
- * Available groups: core, basic, time, io, metadata, model, usage, prompt, metrics.
3513
+ * Available groups: core, basic, time, io, metadata, model, usage, prompt, metrics, trace_context.
3410
3514
  * If not specified, `core` and `basic` field groups are returned.
3411
3515
  * Example: "basic,usage,model"
3412
3516
  */
@@ -3456,12 +3560,12 @@ interface GetObservationsV2Request {
3456
3560
  * "column": string, // Required. Column to filter on (see available columns below)
3457
3561
  * "operator": string, // Required. Operator based on type:
3458
3562
  * // - datetime: ">", "<", ">=", "<="
3459
- * // - string: "=", "contains", "does not contain", "starts with", "ends with"
3563
+ * // - string: "=", "contains", "does not contain", "starts with", "ends with", "matches"
3460
3564
  * // - stringOptions: "any of", "none of"
3461
3565
  * // - categoryOptions: "any of", "none of"
3462
3566
  * // - arrayOptions: "any of", "none of", "all of"
3463
3567
  * // - number: "=", ">", "<", ">=", "<="
3464
- * // - stringObject: "=", "contains", "does not contain", "starts with", "ends with"
3568
+ * // - stringObject: "=", "contains", "does not contain", "starts with", "ends with", "matches"
3465
3569
  * // - numberObject: "=", ">", "<", ">=", "<="
3466
3570
  * // - boolean: "=", "<>"
3467
3571
  * // - null: "is null", "is not null"
@@ -3513,8 +3617,12 @@ interface GetObservationsV2Request {
3513
3617
  * - `promptVersion` (number) - Associated prompt version
3514
3618
  *
3515
3619
  * ### Structured Data
3620
+ * - `input` (string) - Observation input. Supports accelerated indexed literal search with the `matches` operator.
3621
+ * - `output` (string) - Observation output. Supports accelerated indexed literal search with the `matches` operator.
3516
3622
  * - `metadata` (stringObject/numberObject/categoryOptions) - Metadata key-value pairs. Use `key` parameter to filter on specific metadata keys.
3517
3623
  *
3624
+ * The `matches` operator is only supported for `input`, `output`, and stringObject `metadata` filters. It performs indexed literal search with token-boundary pruning using the events table text indexes. Case sensitivity differs by target: `input` and `output` matches are case-insensitive, while metadata value matches are case-sensitive. Unlike SQL `LIKE`, `%` and `_` are treated as literal characters. Use `contains` for legacy substring semantics where the API allows it. Any v2 `input` or `output` filter must be accompanied by at least one `=` or `matches` filter on `input` or `output`; standalone `contains`, `starts with`, `ends with`, and `does not contain` filters on these columns are rejected.
3625
+ *
3518
3626
  * ## Filter Examples
3519
3627
  * ```json
3520
3628
  * [
@@ -3536,6 +3644,12 @@ interface GetObservationsV2Request {
3536
3644
  * "key": "environment",
3537
3645
  * "operator": "=",
3538
3646
  * "value": "production"
3647
+ * },
3648
+ * {
3649
+ * "type": "string",
3650
+ * "column": "output",
3651
+ * "operator": "matches",
3652
+ * "value": "needle"
3539
3653
  * }
3540
3654
  * ]
3541
3655
  * ```
@@ -3543,11 +3657,11 @@ interface GetObservationsV2Request {
3543
3657
  filter?: string;
3544
3658
  }
3545
3659
 
3546
- type index$c_GetObservationsV2Request = GetObservationsV2Request;
3547
- type index$c_ObservationsV2Meta = ObservationsV2Meta;
3548
- type index$c_ObservationsV2Response = ObservationsV2Response;
3549
- declare namespace index$c {
3550
- export type { index$c_GetObservationsV2Request as GetObservationsV2Request, index$c_ObservationsV2Meta as ObservationsV2Meta, index$c_ObservationsV2Response as ObservationsV2Response };
3660
+ type index$i_GetObservationsV2Request = GetObservationsV2Request;
3661
+ type index$i_ObservationsV2Meta = ObservationsV2Meta;
3662
+ type index$i_ObservationsV2Response = ObservationsV2Response;
3663
+ declare namespace index$i {
3664
+ export type { index$i_GetObservationsV2Request as GetObservationsV2Request, index$i_ObservationsV2Meta as ObservationsV2Meta, index$i_ObservationsV2Response as ObservationsV2Response };
3551
3665
  }
3552
3666
 
3553
3667
  /**
@@ -3724,17 +3838,17 @@ interface OtelTraceRequest {
3724
3838
  resourceSpans: OtelResourceSpan[];
3725
3839
  }
3726
3840
 
3727
- type index$b_OtelAttribute = OtelAttribute;
3728
- type index$b_OtelAttributeValue = OtelAttributeValue;
3729
- type index$b_OtelResource = OtelResource;
3730
- type index$b_OtelResourceSpan = OtelResourceSpan;
3731
- type index$b_OtelScope = OtelScope;
3732
- type index$b_OtelScopeSpan = OtelScopeSpan;
3733
- type index$b_OtelSpan = OtelSpan;
3734
- type index$b_OtelTraceRequest = OtelTraceRequest;
3735
- type index$b_OtelTraceResponse = OtelTraceResponse;
3736
- declare namespace index$b {
3737
- export type { index$b_OtelAttribute as OtelAttribute, index$b_OtelAttributeValue as OtelAttributeValue, index$b_OtelResource as OtelResource, index$b_OtelResourceSpan as OtelResourceSpan, index$b_OtelScope as OtelScope, index$b_OtelScopeSpan as OtelScopeSpan, index$b_OtelSpan as OtelSpan, index$b_OtelTraceRequest as OtelTraceRequest, index$b_OtelTraceResponse as OtelTraceResponse };
3841
+ type index$h_OtelAttribute = OtelAttribute;
3842
+ type index$h_OtelAttributeValue = OtelAttributeValue;
3843
+ type index$h_OtelResource = OtelResource;
3844
+ type index$h_OtelResourceSpan = OtelResourceSpan;
3845
+ type index$h_OtelScope = OtelScope;
3846
+ type index$h_OtelScopeSpan = OtelScopeSpan;
3847
+ type index$h_OtelSpan = OtelSpan;
3848
+ type index$h_OtelTraceRequest = OtelTraceRequest;
3849
+ type index$h_OtelTraceResponse = OtelTraceResponse;
3850
+ declare namespace index$h {
3851
+ export type { index$h_OtelAttribute as OtelAttribute, index$h_OtelAttributeValue as OtelAttributeValue, index$h_OtelResource as OtelResource, index$h_OtelResourceSpan as OtelResourceSpan, index$h_OtelScope as OtelScope, index$h_OtelScopeSpan as OtelScopeSpan, index$h_OtelSpan as OtelSpan, index$h_OtelTraceRequest as OtelTraceRequest, index$h_OtelTraceResponse as OtelTraceResponse };
3738
3852
  }
3739
3853
 
3740
3854
  /**
@@ -3831,18 +3945,18 @@ interface OrganizationApiKeysResponse {
3831
3945
  apiKeys: OrganizationApiKey[];
3832
3946
  }
3833
3947
 
3834
- type index$a_DeleteMembershipRequest = DeleteMembershipRequest;
3835
- type index$a_MembershipDeletionResponse = MembershipDeletionResponse;
3836
- type index$a_MembershipRequest = MembershipRequest;
3837
- type index$a_MembershipResponse = MembershipResponse;
3838
- declare const index$a_MembershipRole: typeof MembershipRole;
3839
- type index$a_MembershipsResponse = MembershipsResponse;
3840
- type index$a_OrganizationApiKey = OrganizationApiKey;
3841
- type index$a_OrganizationApiKeysResponse = OrganizationApiKeysResponse;
3842
- type index$a_OrganizationProject = OrganizationProject;
3843
- type index$a_OrganizationProjectsResponse = OrganizationProjectsResponse;
3844
- declare namespace index$a {
3845
- export { type index$a_DeleteMembershipRequest as DeleteMembershipRequest, type index$a_MembershipDeletionResponse as MembershipDeletionResponse, type index$a_MembershipRequest as MembershipRequest, type index$a_MembershipResponse as MembershipResponse, index$a_MembershipRole as MembershipRole, type index$a_MembershipsResponse as MembershipsResponse, type index$a_OrganizationApiKey as OrganizationApiKey, type index$a_OrganizationApiKeysResponse as OrganizationApiKeysResponse, type index$a_OrganizationProject as OrganizationProject, type index$a_OrganizationProjectsResponse as OrganizationProjectsResponse };
3948
+ type index$g_DeleteMembershipRequest = DeleteMembershipRequest;
3949
+ type index$g_MembershipDeletionResponse = MembershipDeletionResponse;
3950
+ type index$g_MembershipRequest = MembershipRequest;
3951
+ type index$g_MembershipResponse = MembershipResponse;
3952
+ declare const index$g_MembershipRole: typeof MembershipRole;
3953
+ type index$g_MembershipsResponse = MembershipsResponse;
3954
+ type index$g_OrganizationApiKey = OrganizationApiKey;
3955
+ type index$g_OrganizationApiKeysResponse = OrganizationApiKeysResponse;
3956
+ type index$g_OrganizationProject = OrganizationProject;
3957
+ type index$g_OrganizationProjectsResponse = OrganizationProjectsResponse;
3958
+ declare namespace index$g {
3959
+ export { type index$g_DeleteMembershipRequest as DeleteMembershipRequest, type index$g_MembershipDeletionResponse as MembershipDeletionResponse, type index$g_MembershipRequest as MembershipRequest, type index$g_MembershipResponse as MembershipResponse, index$g_MembershipRole as MembershipRole, type index$g_MembershipsResponse as MembershipsResponse, type index$g_OrganizationApiKey as OrganizationApiKey, type index$g_OrganizationApiKeysResponse as OrganizationApiKeysResponse, type index$g_OrganizationProject as OrganizationProject, type index$g_OrganizationProjectsResponse as OrganizationProjectsResponse };
3846
3960
  }
3847
3961
 
3848
3962
  /**
@@ -4001,18 +4115,18 @@ interface CreateApiKeyRequest {
4001
4115
  secretKey?: string;
4002
4116
  }
4003
4117
 
4004
- type index$9_ApiKeyDeletionResponse = ApiKeyDeletionResponse;
4005
- type index$9_ApiKeyList = ApiKeyList;
4006
- type index$9_ApiKeyResponse = ApiKeyResponse;
4007
- type index$9_ApiKeySummary = ApiKeySummary;
4008
- type index$9_CreateApiKeyRequest = CreateApiKeyRequest;
4009
- type index$9_CreateProjectRequest = CreateProjectRequest;
4010
- type index$9_Organization = Organization;
4011
- type index$9_Project = Project;
4012
- type index$9_ProjectDeletionResponse = ProjectDeletionResponse;
4013
- type index$9_UpdateProjectRequest = UpdateProjectRequest;
4014
- declare namespace index$9 {
4015
- export type { index$9_ApiKeyDeletionResponse as ApiKeyDeletionResponse, index$9_ApiKeyList as ApiKeyList, index$9_ApiKeyResponse as ApiKeyResponse, index$9_ApiKeySummary as ApiKeySummary, index$9_CreateApiKeyRequest as CreateApiKeyRequest, index$9_CreateProjectRequest as CreateProjectRequest, index$9_Organization as Organization, index$9_Project as Project, index$9_ProjectDeletionResponse as ProjectDeletionResponse, Projects$1 as Projects, index$9_UpdateProjectRequest as UpdateProjectRequest };
4118
+ type index$f_ApiKeyDeletionResponse = ApiKeyDeletionResponse;
4119
+ type index$f_ApiKeyList = ApiKeyList;
4120
+ type index$f_ApiKeyResponse = ApiKeyResponse;
4121
+ type index$f_ApiKeySummary = ApiKeySummary;
4122
+ type index$f_CreateApiKeyRequest = CreateApiKeyRequest;
4123
+ type index$f_CreateProjectRequest = CreateProjectRequest;
4124
+ type index$f_Organization = Organization;
4125
+ type index$f_Project = Project;
4126
+ type index$f_ProjectDeletionResponse = ProjectDeletionResponse;
4127
+ type index$f_UpdateProjectRequest = UpdateProjectRequest;
4128
+ declare namespace index$f {
4129
+ export type { index$f_ApiKeyDeletionResponse as ApiKeyDeletionResponse, index$f_ApiKeyList as ApiKeyList, index$f_ApiKeyResponse as ApiKeyResponse, index$f_ApiKeySummary as ApiKeySummary, index$f_CreateApiKeyRequest as CreateApiKeyRequest, index$f_CreateProjectRequest as CreateProjectRequest, index$f_Organization as Organization, index$f_Project as Project, index$f_ProjectDeletionResponse as ProjectDeletionResponse, Projects$1 as Projects, index$f_UpdateProjectRequest as UpdateProjectRequest };
4016
4130
  }
4017
4131
 
4018
4132
  /**
@@ -4244,28 +4358,28 @@ interface DeletePromptRequest {
4244
4358
  version?: number;
4245
4359
  }
4246
4360
 
4247
- type index$8_BasePrompt = BasePrompt;
4248
- type index$8_ChatMessage = ChatMessage;
4249
- declare const index$8_ChatMessageType: typeof ChatMessageType;
4250
- type index$8_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
4251
- type index$8_ChatPrompt = ChatPrompt;
4252
- type index$8_CreateChatPromptRequest = CreateChatPromptRequest;
4253
- declare const index$8_CreateChatPromptType: typeof CreateChatPromptType;
4254
- type index$8_CreatePromptRequest = CreatePromptRequest;
4255
- type index$8_CreateTextPromptRequest = CreateTextPromptRequest;
4256
- declare const index$8_CreateTextPromptType: typeof CreateTextPromptType;
4257
- type index$8_DeletePromptRequest = DeletePromptRequest;
4258
- type index$8_GetPromptRequest = GetPromptRequest;
4259
- type index$8_ListPromptsMetaRequest = ListPromptsMetaRequest;
4260
- type index$8_PlaceholderMessage = PlaceholderMessage;
4261
- declare const index$8_PlaceholderMessageType: typeof PlaceholderMessageType;
4262
- declare const index$8_Prompt: typeof Prompt;
4263
- type index$8_PromptMeta = PromptMeta;
4264
- type index$8_PromptMetaListResponse = PromptMetaListResponse;
4265
- declare const index$8_PromptType: typeof PromptType;
4266
- type index$8_TextPrompt = TextPrompt;
4267
- declare namespace index$8 {
4268
- export { type index$8_BasePrompt as BasePrompt, type index$8_ChatMessage as ChatMessage, index$8_ChatMessageType as ChatMessageType, type index$8_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$8_ChatPrompt as ChatPrompt, type index$8_CreateChatPromptRequest as CreateChatPromptRequest, index$8_CreateChatPromptType as CreateChatPromptType, type index$8_CreatePromptRequest as CreatePromptRequest, type index$8_CreateTextPromptRequest as CreateTextPromptRequest, index$8_CreateTextPromptType as CreateTextPromptType, type index$8_DeletePromptRequest as DeletePromptRequest, type index$8_GetPromptRequest as GetPromptRequest, type index$8_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$8_PlaceholderMessage as PlaceholderMessage, index$8_PlaceholderMessageType as PlaceholderMessageType, index$8_Prompt as Prompt, type index$8_PromptMeta as PromptMeta, type index$8_PromptMetaListResponse as PromptMetaListResponse, index$8_PromptType as PromptType, type index$8_TextPrompt as TextPrompt };
4361
+ type index$e_BasePrompt = BasePrompt;
4362
+ type index$e_ChatMessage = ChatMessage;
4363
+ declare const index$e_ChatMessageType: typeof ChatMessageType;
4364
+ type index$e_ChatMessageWithPlaceholders = ChatMessageWithPlaceholders;
4365
+ type index$e_ChatPrompt = ChatPrompt;
4366
+ type index$e_CreateChatPromptRequest = CreateChatPromptRequest;
4367
+ declare const index$e_CreateChatPromptType: typeof CreateChatPromptType;
4368
+ type index$e_CreatePromptRequest = CreatePromptRequest;
4369
+ type index$e_CreateTextPromptRequest = CreateTextPromptRequest;
4370
+ declare const index$e_CreateTextPromptType: typeof CreateTextPromptType;
4371
+ type index$e_DeletePromptRequest = DeletePromptRequest;
4372
+ type index$e_GetPromptRequest = GetPromptRequest;
4373
+ type index$e_ListPromptsMetaRequest = ListPromptsMetaRequest;
4374
+ type index$e_PlaceholderMessage = PlaceholderMessage;
4375
+ declare const index$e_PlaceholderMessageType: typeof PlaceholderMessageType;
4376
+ declare const index$e_Prompt: typeof Prompt;
4377
+ type index$e_PromptMeta = PromptMeta;
4378
+ type index$e_PromptMetaListResponse = PromptMetaListResponse;
4379
+ declare const index$e_PromptType: typeof PromptType;
4380
+ type index$e_TextPrompt = TextPrompt;
4381
+ declare namespace index$e {
4382
+ export { type index$e_BasePrompt as BasePrompt, type index$e_ChatMessage as ChatMessage, index$e_ChatMessageType as ChatMessageType, type index$e_ChatMessageWithPlaceholders as ChatMessageWithPlaceholders, type index$e_ChatPrompt as ChatPrompt, type index$e_CreateChatPromptRequest as CreateChatPromptRequest, index$e_CreateChatPromptType as CreateChatPromptType, type index$e_CreatePromptRequest as CreatePromptRequest, type index$e_CreateTextPromptRequest as CreateTextPromptRequest, index$e_CreateTextPromptType as CreateTextPromptType, type index$e_DeletePromptRequest as DeletePromptRequest, type index$e_GetPromptRequest as GetPromptRequest, type index$e_ListPromptsMetaRequest as ListPromptsMetaRequest, type index$e_PlaceholderMessage as PlaceholderMessage, index$e_PlaceholderMessageType as PlaceholderMessageType, index$e_Prompt as Prompt, type index$e_PromptMeta as PromptMeta, type index$e_PromptMetaListResponse as PromptMetaListResponse, index$e_PromptType as PromptType, type index$e_TextPrompt as TextPrompt };
4269
4383
  }
4270
4384
 
4271
4385
  /**
@@ -4487,27 +4601,27 @@ interface CreateUserRequest {
4487
4601
  password?: string;
4488
4602
  }
4489
4603
 
4490
- type index$7_AuthenticationScheme = AuthenticationScheme;
4491
- type index$7_BulkConfig = BulkConfig;
4492
- type index$7_CreateUserRequest = CreateUserRequest;
4493
- type index$7_EmptyResponse = EmptyResponse;
4494
- type index$7_FilterConfig = FilterConfig;
4495
- type index$7_ListUsersRequest = ListUsersRequest;
4496
- type index$7_ResourceMeta = ResourceMeta;
4497
- type index$7_ResourceType = ResourceType;
4498
- type index$7_ResourceTypesResponse = ResourceTypesResponse;
4499
- type index$7_SchemaExtension = SchemaExtension;
4500
- type index$7_SchemaResource = SchemaResource;
4501
- type index$7_SchemasResponse = SchemasResponse;
4502
- type index$7_ScimEmail = ScimEmail;
4503
- type index$7_ScimFeatureSupport = ScimFeatureSupport;
4504
- type index$7_ScimName = ScimName;
4505
- type index$7_ScimUser = ScimUser;
4506
- type index$7_ScimUsersListResponse = ScimUsersListResponse;
4507
- type index$7_ServiceProviderConfig = ServiceProviderConfig;
4508
- type index$7_UserMeta = UserMeta;
4509
- declare namespace index$7 {
4510
- export type { index$7_AuthenticationScheme as AuthenticationScheme, index$7_BulkConfig as BulkConfig, index$7_CreateUserRequest as CreateUserRequest, index$7_EmptyResponse as EmptyResponse, index$7_FilterConfig as FilterConfig, index$7_ListUsersRequest as ListUsersRequest, index$7_ResourceMeta as ResourceMeta, index$7_ResourceType as ResourceType, index$7_ResourceTypesResponse as ResourceTypesResponse, index$7_SchemaExtension as SchemaExtension, index$7_SchemaResource as SchemaResource, index$7_SchemasResponse as SchemasResponse, index$7_ScimEmail as ScimEmail, index$7_ScimFeatureSupport as ScimFeatureSupport, index$7_ScimName as ScimName, index$7_ScimUser as ScimUser, index$7_ScimUsersListResponse as ScimUsersListResponse, index$7_ServiceProviderConfig as ServiceProviderConfig, index$7_UserMeta as UserMeta };
4604
+ type index$d_AuthenticationScheme = AuthenticationScheme;
4605
+ type index$d_BulkConfig = BulkConfig;
4606
+ type index$d_CreateUserRequest = CreateUserRequest;
4607
+ type index$d_EmptyResponse = EmptyResponse;
4608
+ type index$d_FilterConfig = FilterConfig;
4609
+ type index$d_ListUsersRequest = ListUsersRequest;
4610
+ type index$d_ResourceMeta = ResourceMeta;
4611
+ type index$d_ResourceType = ResourceType;
4612
+ type index$d_ResourceTypesResponse = ResourceTypesResponse;
4613
+ type index$d_SchemaExtension = SchemaExtension;
4614
+ type index$d_SchemaResource = SchemaResource;
4615
+ type index$d_SchemasResponse = SchemasResponse;
4616
+ type index$d_ScimEmail = ScimEmail;
4617
+ type index$d_ScimFeatureSupport = ScimFeatureSupport;
4618
+ type index$d_ScimName = ScimName;
4619
+ type index$d_ScimUser = ScimUser;
4620
+ type index$d_ScimUsersListResponse = ScimUsersListResponse;
4621
+ type index$d_ServiceProviderConfig = ServiceProviderConfig;
4622
+ type index$d_UserMeta = UserMeta;
4623
+ declare namespace index$d {
4624
+ export type { index$d_AuthenticationScheme as AuthenticationScheme, index$d_BulkConfig as BulkConfig, index$d_CreateUserRequest as CreateUserRequest, index$d_EmptyResponse as EmptyResponse, index$d_FilterConfig as FilterConfig, index$d_ListUsersRequest as ListUsersRequest, index$d_ResourceMeta as ResourceMeta, index$d_ResourceType as ResourceType, index$d_ResourceTypesResponse as ResourceTypesResponse, index$d_SchemaExtension as SchemaExtension, index$d_SchemaResource as SchemaResource, index$d_SchemasResponse as SchemasResponse, index$d_ScimEmail as ScimEmail, index$d_ScimFeatureSupport as ScimFeatureSupport, index$d_ScimName as ScimName, index$d_ScimUser as ScimUser, index$d_ScimUsersListResponse as ScimUsersListResponse, index$d_ServiceProviderConfig as ServiceProviderConfig, index$d_UserMeta as UserMeta };
4511
4625
  }
4512
4626
 
4513
4627
  /**
@@ -4524,6 +4638,7 @@ interface ScoreConfigs$1 {
4524
4638
  */
4525
4639
 
4526
4640
  interface CreateScoreConfigRequest {
4641
+ /** Name of the score config. Max 35 characters. Only letters, numbers, underscores, spaces, periods, parentheses, and hyphens are allowed. */
4527
4642
  name: string;
4528
4643
  dataType: ScoreConfigDataType;
4529
4644
  /** Configure custom categories for categorical scores. Pass a list of objects with `label` and `value` properties. Categories are autogenerated for boolean configs and cannot be passed */
@@ -4543,7 +4658,7 @@ interface CreateScoreConfigRequest {
4543
4658
  interface UpdateScoreConfigRequest {
4544
4659
  /** The status of the score config showing if it is archived or not */
4545
4660
  isArchived?: boolean;
4546
- /** The name of the score config */
4661
+ /** Name of the score config. Max 35 characters. Only letters, numbers, underscores, spaces, periods, parentheses, and hyphens are allowed. */
4547
4662
  name?: string;
4548
4663
  /** Configure custom categories for categorical scores. Pass a list of objects with `label` and `value` properties. Categories are autogenerated for boolean configs and cannot be passed */
4549
4664
  categories?: ConfigCategory[];
@@ -4569,11 +4684,278 @@ interface GetScoreConfigsRequest {
4569
4684
  limit?: number;
4570
4685
  }
4571
4686
 
4572
- type index$6_CreateScoreConfigRequest = CreateScoreConfigRequest;
4573
- type index$6_GetScoreConfigsRequest = GetScoreConfigsRequest;
4574
- type index$6_UpdateScoreConfigRequest = UpdateScoreConfigRequest;
4575
- declare namespace index$6 {
4576
- export type { index$6_CreateScoreConfigRequest as CreateScoreConfigRequest, index$6_GetScoreConfigsRequest as GetScoreConfigsRequest, ScoreConfigs$1 as ScoreConfigs, index$6_UpdateScoreConfigRequest as UpdateScoreConfigRequest };
4687
+ type index$c_CreateScoreConfigRequest = CreateScoreConfigRequest;
4688
+ type index$c_GetScoreConfigsRequest = GetScoreConfigsRequest;
4689
+ type index$c_UpdateScoreConfigRequest = UpdateScoreConfigRequest;
4690
+ declare namespace index$c {
4691
+ export type { index$c_CreateScoreConfigRequest as CreateScoreConfigRequest, index$c_GetScoreConfigsRequest as GetScoreConfigsRequest, ScoreConfigs$1 as ScoreConfigs, index$c_UpdateScoreConfigRequest as UpdateScoreConfigRequest };
4692
+ }
4693
+
4694
+ /**
4695
+ * This file was auto-generated by Fern from our API Definition.
4696
+ */
4697
+ interface ScoreSubjectTraceV3 {
4698
+ /** The trace ID. */
4699
+ id: string;
4700
+ }
4701
+
4702
+ /**
4703
+ * This file was auto-generated by Fern from our API Definition.
4704
+ */
4705
+ interface ScoreSubjectObservationV3 {
4706
+ /** The observation ID. */
4707
+ id: string;
4708
+ /** The parent trace ID, if available. */
4709
+ traceId?: string;
4710
+ }
4711
+
4712
+ /**
4713
+ * This file was auto-generated by Fern from our API Definition.
4714
+ */
4715
+ interface ScoreSubjectSessionV3 {
4716
+ /** The session ID. */
4717
+ id: string;
4718
+ }
4719
+
4720
+ /**
4721
+ * This file was auto-generated by Fern from our API Definition.
4722
+ */
4723
+ interface ScoreSubjectExperimentV3 {
4724
+ /** The dataset run ID (experiment ID). */
4725
+ id: string;
4726
+ }
4727
+
4728
+ /**
4729
+ * This file was auto-generated by Fern from our API Definition.
4730
+ */
4731
+
4732
+ /**
4733
+ * A reference to the entity this score is attached to. Discriminated by "kind" — one of trace, observation, session, or experiment.
4734
+ */
4735
+ type ScoreSubjectV3 =
4736
+ /**
4737
+ * Subject is a trace-level score. */
4738
+ ScoreSubjectV3.Trace
4739
+ /**
4740
+ * Subject is an observation-level score scoped to a trace. */
4741
+ | ScoreSubjectV3.Observation
4742
+ /**
4743
+ * Subject is a session-level score. */
4744
+ | ScoreSubjectV3.Session
4745
+ /**
4746
+ * Subject is a dataset run (experiment) score. */
4747
+ | ScoreSubjectV3.Experiment;
4748
+ declare namespace ScoreSubjectV3 {
4749
+ interface Trace extends ScoreSubjectTraceV3 {
4750
+ kind: "trace";
4751
+ }
4752
+ interface Observation extends ScoreSubjectObservationV3 {
4753
+ kind: "observation";
4754
+ }
4755
+ interface Session extends ScoreSubjectSessionV3 {
4756
+ kind: "session";
4757
+ }
4758
+ interface Experiment extends ScoreSubjectExperimentV3 {
4759
+ kind: "experiment";
4760
+ }
4761
+ }
4762
+
4763
+ /**
4764
+ * This file was auto-generated by Fern from our API Definition.
4765
+ */
4766
+
4767
+ interface BaseScoreV3 {
4768
+ id: string;
4769
+ projectId: string;
4770
+ name: string;
4771
+ source: ScoreSource;
4772
+ timestamp: string;
4773
+ /** The environment from which this score originated. */
4774
+ environment: string;
4775
+ createdAt: string;
4776
+ updatedAt: string;
4777
+ /** Optional comment attached to the score. Present when "details" is included in the fields parameter. */
4778
+ comment?: string | null;
4779
+ /** The score config ID, if this score was created from a config. Present when "details" is included in the fields parameter. */
4780
+ configId?: string | null;
4781
+ /** Arbitrary metadata attached to the score. Present when "details" is included in the fields parameter. */
4782
+ metadata?: Record<string, unknown>;
4783
+ /** The user who created this score, if available. Present when "annotation" is included in the fields parameter. */
4784
+ authorUserId?: string | null;
4785
+ /** The annotation queue this score belongs to, if any. Present when "annotation" is included in the fields parameter. */
4786
+ queueId?: string | null;
4787
+ /** The entity this score is attached to (trace, observation, session, or experiment). Present when "subject" is included in the fields parameter. */
4788
+ subject?: ScoreSubjectV3;
4789
+ }
4790
+
4791
+ /**
4792
+ * This file was auto-generated by Fern from our API Definition.
4793
+ */
4794
+
4795
+ interface NumericScoreV3 extends BaseScoreV3 {
4796
+ /** The numeric value of the score. */
4797
+ value: number;
4798
+ }
4799
+
4800
+ /**
4801
+ * This file was auto-generated by Fern from our API Definition.
4802
+ */
4803
+
4804
+ interface BooleanScoreV3 extends BaseScoreV3 {
4805
+ /** The boolean value of the score. */
4806
+ value: boolean;
4807
+ }
4808
+
4809
+ /**
4810
+ * This file was auto-generated by Fern from our API Definition.
4811
+ */
4812
+
4813
+ interface CategoricalScoreV3 extends BaseScoreV3 {
4814
+ /** The string category value of the score. */
4815
+ value: string;
4816
+ }
4817
+
4818
+ /**
4819
+ * This file was auto-generated by Fern from our API Definition.
4820
+ */
4821
+
4822
+ interface TextScoreV3 extends BaseScoreV3 {
4823
+ /** The text content of the score. */
4824
+ value: string;
4825
+ }
4826
+
4827
+ /**
4828
+ * This file was auto-generated by Fern from our API Definition.
4829
+ */
4830
+
4831
+ interface CorrectionScoreV3 extends BaseScoreV3 {
4832
+ /** The correction content of the score. Empty string if not set. */
4833
+ value: string;
4834
+ }
4835
+
4836
+ /**
4837
+ * This file was auto-generated by Fern from our API Definition.
4838
+ */
4839
+
4840
+ type ScoreV3 =
4841
+ /**
4842
+ * Score with NUMERIC data type. Value is a number. */
4843
+ ScoreV3.Numeric
4844
+ /**
4845
+ * Score with BOOLEAN data type. Value is a boolean. */
4846
+ | ScoreV3.Boolean
4847
+ /**
4848
+ * Score with CATEGORICAL data type. Value is a string category. */
4849
+ | ScoreV3.Categorical
4850
+ /**
4851
+ * Score with TEXT data type. Value is a string. */
4852
+ | ScoreV3.Text
4853
+ /**
4854
+ * Score with CORRECTION data type. Value is the correction string. */
4855
+ | ScoreV3.Correction;
4856
+ declare namespace ScoreV3 {
4857
+ interface Numeric extends NumericScoreV3 {
4858
+ dataType: "NUMERIC";
4859
+ }
4860
+ interface Boolean extends BooleanScoreV3 {
4861
+ dataType: "BOOLEAN";
4862
+ }
4863
+ interface Categorical extends CategoricalScoreV3 {
4864
+ dataType: "CATEGORICAL";
4865
+ }
4866
+ interface Text extends TextScoreV3 {
4867
+ dataType: "TEXT";
4868
+ }
4869
+ interface Correction extends CorrectionScoreV3 {
4870
+ dataType: "CORRECTION";
4871
+ }
4872
+ }
4873
+
4874
+ /**
4875
+ * This file was auto-generated by Fern from our API Definition.
4876
+ */
4877
+ interface GetScoresV3Meta {
4878
+ limit: number;
4879
+ /** URL-safe base64 (base64url) cursor for the next page. Absent when there are no more results. */
4880
+ cursor?: string;
4881
+ }
4882
+
4883
+ /**
4884
+ * This file was auto-generated by Fern from our API Definition.
4885
+ */
4886
+
4887
+ interface GetScoresV3Response {
4888
+ data: ScoreV3[];
4889
+ meta: GetScoresV3Meta;
4890
+ }
4891
+
4892
+ /**
4893
+ * This file was auto-generated by Fern from our API Definition.
4894
+ */
4895
+ /**
4896
+ * @example
4897
+ * {}
4898
+ */
4899
+ interface GetScoresV3Request {
4900
+ /** Number of items per page. Maximum 100, default 50. Requests with a limit greater than 100 return HTTP 400. */
4901
+ limit?: number;
4902
+ /** URL-safe base64 (base64url) cursor for pagination. Use the cursor from the previous response to get the next page. Absent on the final page. */
4903
+ cursor?: string;
4904
+ /** Comma-separated field groups to include. Allowed: core, details, subject, annotation. Defaults to "core". Unknown names return HTTP 400. */
4905
+ fields?: string;
4906
+ /** Comma-separated list of score IDs to filter by (OR within, AND across filters). */
4907
+ id?: string;
4908
+ /** Comma-separated list of score names to filter by. */
4909
+ name?: string;
4910
+ /** Comma-separated list of score sources to filter by (e.g. API, ANNOTATION, EVAL). Case-insensitive — `api` and `API` are equivalent. */
4911
+ source?: string;
4912
+ /** Comma-separated list of data types to filter by (NUMERIC, BOOLEAN, CATEGORICAL, TEXT, CORRECTION). Case-insensitive — `numeric` and `NUMERIC` are equivalent. Must be a single value when used with value, valueMin, or valueMax; otherwise the request returns HTTP 400. Must be NUMERIC when used with valueMin or valueMax. */
4913
+ dataType?: string;
4914
+ /** Comma-separated list of environments to filter by. */
4915
+ environment?: string;
4916
+ /** Comma-separated list of score config IDs to filter by. */
4917
+ configId?: string;
4918
+ /** Comma-separated list of annotation queue IDs to filter by. */
4919
+ queueId?: string;
4920
+ /** Comma-separated list of author user IDs to filter by. */
4921
+ authorUserId?: string;
4922
+ /** Comma-separated list of exact values to filter by. Requires a single dataType from NUMERIC, BOOLEAN, or CATEGORICAL; any other dataType, multiple dataTypes, or omitting dataType returns HTTP 400. For BOOLEAN, each value must be "true" or "false"; for NUMERIC, each value must be a finite number. Otherwise the request returns HTTP 400. */
4923
+ value?: string;
4924
+ /** Inclusive lower bound on the numeric value. Requires dataType=NUMERIC as a single value; otherwise the request returns HTTP 400. */
4925
+ valueMin?: number;
4926
+ /** Inclusive upper bound on the numeric value. Requires dataType=NUMERIC as a single value; otherwise the request returns HTTP 400. */
4927
+ valueMax?: number;
4928
+ /** Comma-separated list of trace IDs to filter by. Mutually exclusive with sessionId, experimentId. May be combined with observationId to scope the observation lookup to a specific trace. */
4929
+ traceId?: string;
4930
+ /** Comma-separated list of session IDs to filter by. Mutually exclusive with traceId, observationId, experimentId. */
4931
+ sessionId?: string;
4932
+ /** Comma-separated list of observation IDs to filter by. Requires traceId to be specified, because observation IDs are scoped to a trace. Mutually exclusive with sessionId, experimentId. Returns HTTP 400 when used without traceId. */
4933
+ observationId?: string;
4934
+ /** Comma-separated list of dataset run IDs (experiment IDs) to filter by. Mutually exclusive with traceId, sessionId, observationId. */
4935
+ experimentId?: string;
4936
+ /** Inclusive lower bound on the score timestamp. */
4937
+ fromTimestamp?: string;
4938
+ /** Exclusive upper bound on the score timestamp. */
4939
+ toTimestamp?: string;
4940
+ }
4941
+
4942
+ type index$b_BaseScoreV3 = BaseScoreV3;
4943
+ type index$b_BooleanScoreV3 = BooleanScoreV3;
4944
+ type index$b_CategoricalScoreV3 = CategoricalScoreV3;
4945
+ type index$b_CorrectionScoreV3 = CorrectionScoreV3;
4946
+ type index$b_GetScoresV3Meta = GetScoresV3Meta;
4947
+ type index$b_GetScoresV3Request = GetScoresV3Request;
4948
+ type index$b_GetScoresV3Response = GetScoresV3Response;
4949
+ type index$b_NumericScoreV3 = NumericScoreV3;
4950
+ type index$b_ScoreSubjectExperimentV3 = ScoreSubjectExperimentV3;
4951
+ type index$b_ScoreSubjectObservationV3 = ScoreSubjectObservationV3;
4952
+ type index$b_ScoreSubjectSessionV3 = ScoreSubjectSessionV3;
4953
+ type index$b_ScoreSubjectTraceV3 = ScoreSubjectTraceV3;
4954
+ declare const index$b_ScoreSubjectV3: typeof ScoreSubjectV3;
4955
+ declare const index$b_ScoreV3: typeof ScoreV3;
4956
+ type index$b_TextScoreV3 = TextScoreV3;
4957
+ declare namespace index$b {
4958
+ export { type index$b_BaseScoreV3 as BaseScoreV3, type index$b_BooleanScoreV3 as BooleanScoreV3, type index$b_CategoricalScoreV3 as CategoricalScoreV3, type index$b_CorrectionScoreV3 as CorrectionScoreV3, type index$b_GetScoresV3Meta as GetScoresV3Meta, type index$b_GetScoresV3Request as GetScoresV3Request, type index$b_GetScoresV3Response as GetScoresV3Response, type index$b_NumericScoreV3 as NumericScoreV3, type index$b_ScoreSubjectExperimentV3 as ScoreSubjectExperimentV3, type index$b_ScoreSubjectObservationV3 as ScoreSubjectObservationV3, type index$b_ScoreSubjectSessionV3 as ScoreSubjectSessionV3, type index$b_ScoreSubjectTraceV3 as ScoreSubjectTraceV3, index$b_ScoreSubjectV3 as ScoreSubjectV3, index$b_ScoreV3 as ScoreV3, type index$b_TextScoreV3 as TextScoreV3 };
4577
4959
  }
4578
4960
 
4579
4961
  /**
@@ -4673,7 +5055,7 @@ interface GetScoresResponse {
4673
5055
  interface GetScoresRequest {
4674
5056
  /** Page number, starts at 1. */
4675
5057
  page?: number;
4676
- /** Limit of items per page. If you encounter api issues due to too large page sizes, try to reduce the limit. */
5058
+ /** Limit of items per page. Maximum 100. Defaults to 50. Requests with a limit greater than 100 return HTTP 400. If you encounter api issues due to too large page sizes, try to reduce the limit. */
4677
5059
  limit?: number;
4678
5060
  /** Retrieve only scores with this userId associated to the trace. */
4679
5061
  userId?: string;
@@ -4715,17 +5097,17 @@ interface GetScoresRequest {
4715
5097
  filter?: string;
4716
5098
  }
4717
5099
 
4718
- type index$5_GetScoresRequest = GetScoresRequest;
4719
- type index$5_GetScoresResponse = GetScoresResponse;
4720
- declare const index$5_GetScoresResponseData: typeof GetScoresResponseData;
4721
- type index$5_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
4722
- type index$5_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
4723
- type index$5_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
4724
- type index$5_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
4725
- type index$5_GetScoresResponseDataText = GetScoresResponseDataText;
4726
- type index$5_GetScoresResponseTraceData = GetScoresResponseTraceData;
4727
- declare namespace index$5 {
4728
- export { type index$5_GetScoresRequest as GetScoresRequest, type index$5_GetScoresResponse as GetScoresResponse, index$5_GetScoresResponseData as GetScoresResponseData, type index$5_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$5_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$5_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$5_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$5_GetScoresResponseDataText as GetScoresResponseDataText, type index$5_GetScoresResponseTraceData as GetScoresResponseTraceData };
5100
+ type index$a_GetScoresRequest = GetScoresRequest;
5101
+ type index$a_GetScoresResponse = GetScoresResponse;
5102
+ declare const index$a_GetScoresResponseData: typeof GetScoresResponseData;
5103
+ type index$a_GetScoresResponseDataBoolean = GetScoresResponseDataBoolean;
5104
+ type index$a_GetScoresResponseDataCategorical = GetScoresResponseDataCategorical;
5105
+ type index$a_GetScoresResponseDataCorrection = GetScoresResponseDataCorrection;
5106
+ type index$a_GetScoresResponseDataNumeric = GetScoresResponseDataNumeric;
5107
+ type index$a_GetScoresResponseDataText = GetScoresResponseDataText;
5108
+ type index$a_GetScoresResponseTraceData = GetScoresResponseTraceData;
5109
+ declare namespace index$a {
5110
+ export { type index$a_GetScoresRequest as GetScoresRequest, type index$a_GetScoresResponse as GetScoresResponse, index$a_GetScoresResponseData as GetScoresResponseData, type index$a_GetScoresResponseDataBoolean as GetScoresResponseDataBoolean, type index$a_GetScoresResponseDataCategorical as GetScoresResponseDataCategorical, type index$a_GetScoresResponseDataCorrection as GetScoresResponseDataCorrection, type index$a_GetScoresResponseDataNumeric as GetScoresResponseDataNumeric, type index$a_GetScoresResponseDataText as GetScoresResponseDataText, type index$a_GetScoresResponseTraceData as GetScoresResponseTraceData };
4729
5111
  }
4730
5112
 
4731
5113
  /**
@@ -4757,10 +5139,10 @@ interface GetSessionsRequest {
4757
5139
  environment?: string | string[];
4758
5140
  }
4759
5141
 
4760
- type index$4_GetSessionsRequest = GetSessionsRequest;
4761
- type index$4_PaginatedSessions = PaginatedSessions;
4762
- declare namespace index$4 {
4763
- export type { index$4_GetSessionsRequest as GetSessionsRequest, index$4_PaginatedSessions as PaginatedSessions };
5142
+ type index$9_GetSessionsRequest = GetSessionsRequest;
5143
+ type index$9_PaginatedSessions = PaginatedSessions;
5144
+ declare namespace index$9 {
5145
+ export type { index$9_GetSessionsRequest as GetSessionsRequest, index$9_PaginatedSessions as PaginatedSessions };
4764
5146
  }
4765
5147
 
4766
5148
  /**
@@ -4953,14 +5335,1661 @@ interface DeleteTracesRequest {
4953
5335
  traceIds: string[];
4954
5336
  }
4955
5337
 
4956
- type index$3_DeleteTraceResponse = DeleteTraceResponse;
4957
- type index$3_DeleteTracesRequest = DeleteTracesRequest;
4958
- type index$3_GetTraceRequest = GetTraceRequest;
4959
- type index$3_GetTracesRequest = GetTracesRequest;
4960
- type index$3_Sort = Sort;
4961
- type index$3_Traces = Traces;
5338
+ type index$8_DeleteTraceResponse = DeleteTraceResponse;
5339
+ type index$8_DeleteTracesRequest = DeleteTracesRequest;
5340
+ type index$8_GetTraceRequest = GetTraceRequest;
5341
+ type index$8_GetTracesRequest = GetTracesRequest;
5342
+ type index$8_Sort = Sort;
5343
+ type index$8_Traces = Traces;
5344
+ declare namespace index$8 {
5345
+ export type { index$8_DeleteTraceResponse as DeleteTraceResponse, index$8_DeleteTracesRequest as DeleteTracesRequest, index$8_GetTraceRequest as GetTraceRequest, index$8_GetTracesRequest as GetTracesRequest, index$8_Sort as Sort, index$8_Traces as Traces };
5346
+ }
5347
+
5348
+ /**
5349
+ * This file was auto-generated by Fern from our API Definition.
5350
+ */
5351
+ /**
5352
+ * The evaluator engine type.
5353
+ *
5354
+ * The unstable public API supports LLM-as-a-judge and code evaluators.
5355
+ */
5356
+ type EvaluatorType = "llm_as_judge" | "code";
5357
+ declare const EvaluatorType: {
5358
+ readonly LlmAsJudge: "llm_as_judge";
5359
+ readonly Code: "code";
5360
+ };
5361
+
5362
+ /**
5363
+ * This file was auto-generated by Fern from our API Definition.
5364
+ */
5365
+ /**
5366
+ * Code evaluator runtime language.
5367
+ */
5368
+ type CodeEvaluatorSourceCodeLanguage = "PYTHON" | "TYPESCRIPT";
5369
+ declare const CodeEvaluatorSourceCodeLanguage: {
5370
+ readonly Python: "PYTHON";
5371
+ readonly Typescript: "TYPESCRIPT";
5372
+ };
5373
+
5374
+ /**
5375
+ * This file was auto-generated by Fern from our API Definition.
5376
+ */
5377
+ /**
5378
+ * Where an evaluator comes from.
5379
+ *
5380
+ * - `project`: created in your project
5381
+ * - `managed`: provided by Langfuse
5382
+ */
5383
+ type EvaluatorScope = "project" | "managed";
5384
+ declare const EvaluatorScope: {
5385
+ readonly Project: "project";
5386
+ readonly Managed: "managed";
5387
+ };
5388
+
5389
+ /**
5390
+ * This file was auto-generated by Fern from our API Definition.
5391
+ */
5392
+ /**
5393
+ * The ingestion object type that should trigger evaluation runs.
5394
+ *
5395
+ * Choose the target first, because it changes both the valid filter columns and the valid variable-mapping sources:
5396
+ * - `observation` evaluates live-ingested observations such as generations, spans, and events.
5397
+ * It supports mapping from `input`, `output`, and `metadata`.
5398
+ * - `experiment` evaluates live experiment executions and can additionally map `expected_output` and `experiment_item_metadata`.
5399
+ * It currently supports filtering by `datasetId`.
5400
+ * Discover valid dataset IDs with `GET /api/public/v2/datasets`, then use the returned dataset `id` values in your filter.
5401
+ */
5402
+ type EvaluationRuleTarget = "observation" | "experiment";
5403
+ declare const EvaluationRuleTarget: {
5404
+ readonly Observation: "observation";
5405
+ readonly Experiment: "experiment";
5406
+ };
5407
+
5408
+ /**
5409
+ * This file was auto-generated by Fern from our API Definition.
5410
+ */
5411
+ /**
5412
+ * Effective runtime status of the evaluation rule.
5413
+ *
5414
+ * - `active`: enabled and currently runnable.
5415
+ * - `inactive`: disabled by configuration.
5416
+ * - `paused`: enabled, but Langfuse has blocked execution until the underlying issue is resolved.
5417
+ */
5418
+ type EvaluationRuleStatus = "active" | "inactive" | "paused";
5419
+ declare const EvaluationRuleStatus: {
5420
+ readonly Active: "active";
5421
+ readonly Inactive: "inactive";
5422
+ readonly Paused: "paused";
5423
+ };
5424
+
5425
+ /**
5426
+ * This file was auto-generated by Fern from our API Definition.
5427
+ */
5428
+ /**
5429
+ * Source field used to populate a prompt variable.
5430
+ *
5431
+ * Use these values when mapping evaluator prompt variables to live data.
5432
+ *
5433
+ * Target-specific rules:
5434
+ * - `target=observation` supports `input`, `output`, and `metadata`
5435
+ * - `target=experiment` supports `input`, `output`, `metadata`, `expected_output`, and `experiment_item_metadata`
5436
+ *
5437
+ * Source semantics:
5438
+ * - `input`: the observation or experiment input payload
5439
+ * - `output`: the observation or experiment output payload
5440
+ * - `metadata`: the metadata object for the target. Combine with `jsonPath` when you need one nested field instead of the whole object.
5441
+ * - `expected_output`: the experiment item's expected output. Only valid for `target=experiment`.
5442
+ * - `experiment_item_metadata`: the experiment item's metadata object. Only valid for `target=experiment`.
5443
+ */
5444
+ type EvaluationRuleMappingSource = "input" | "output" | "metadata" | "expected_output" | "experiment_item_metadata";
5445
+ declare const EvaluationRuleMappingSource: {
5446
+ readonly Input: "input";
5447
+ readonly Output: "output";
5448
+ readonly Metadata: "metadata";
5449
+ readonly ExpectedOutput: "expected_output";
5450
+ readonly ExperimentItemMetadata: "experiment_item_metadata";
5451
+ };
5452
+
5453
+ /**
5454
+ * This file was auto-generated by Fern from our API Definition.
5455
+ */
5456
+ /**
5457
+ * Optional explicit model configuration for an evaluator.
5458
+ *
5459
+ * If omitted, Langfuse uses the project's default evaluation model.
5460
+ * If provided, the model must be available to the project when the evaluator or evaluation rule is enabled.
5461
+ *
5462
+ * To discover valid configured `provider` values for a project, call `GET /api/public/llm-connections` and read the `provider` field from the returned connections.
5463
+ * Use a `provider` value that matches one of the connections already configured in the same project.
5464
+ *
5465
+ * Recovery guidance:
5466
+ * - If evaluator creation returns `422` with `code=evaluator_preflight_failed`, either provide a valid explicit `modelConfig` here or configure the project's default evaluation model, then retry the same request.
5467
+ *
5468
+ * @example
5469
+ * {
5470
+ * provider: "openai",
5471
+ * model: "gpt-4.1-mini"
5472
+ * }
5473
+ */
5474
+ interface EvaluatorModelConfig {
5475
+ /**
5476
+ * Provider identifier to use for this evaluator, for example `openai` or `anthropic`.
5477
+ *
5478
+ * To discover valid values for the current project, call `GET /api/public/llm-connections` and use one of the returned `provider` values.
5479
+ */
5480
+ provider: string;
5481
+ /** Model identifier exposed by the provider, for example `gpt-4.1-mini`. */
5482
+ model: string;
5483
+ }
5484
+
5485
+ /**
5486
+ * This file was auto-generated by Fern from our API Definition.
5487
+ */
5488
+ /**
5489
+ * Structured score type returned by an evaluator.
5490
+ *
5491
+ * This controls the type of score value Langfuse stores for evaluation results:
5492
+ * - `NUMERIC`: a numeric score such as `0.82`
5493
+ * - `BOOLEAN`: a boolean score such as `true`
5494
+ * - `CATEGORICAL`: one or more category labels from a fixed list
5495
+ */
5496
+ type EvaluatorOutputDataType = "NUMERIC" | "BOOLEAN" | "CATEGORICAL";
5497
+ declare const EvaluatorOutputDataType: {
5498
+ readonly Numeric: "NUMERIC";
5499
+ readonly Boolean: "BOOLEAN";
5500
+ readonly Categorical: "CATEGORICAL";
5501
+ };
5502
+
5503
+ /**
5504
+ * This file was auto-generated by Fern from our API Definition.
5505
+ */
5506
+ interface EvaluatorOutputFieldDefinition {
5507
+ /** Human-readable instructions for what the evaluator should return in this field. */
5508
+ description: string;
5509
+ }
5510
+
5511
+ /**
5512
+ * This file was auto-generated by Fern from our API Definition.
5513
+ */
5514
+
5515
+ /**
5516
+ * Structured output definition to send when creating an evaluator.
5517
+ *
5518
+ * Agent guidance:
5519
+ * - `dataType` is required.
5520
+ * - Do not send `version`; that is an internal storage detail and is not part of the public request contract.
5521
+ * - For `NUMERIC` and `BOOLEAN`, provide `reasoning.description` and `score.description`.
5522
+ * - For `CATEGORICAL`, also provide `score.categories` and `score.shouldAllowMultipleMatches`.
5523
+ *
5524
+ * @example
5525
+ * {
5526
+ * dataType: "NUMERIC",
5527
+ * dataType: LangfuseAPI.unstable.EvaluatorOutputDataType.Numeric,
5528
+ * reasoning: {
5529
+ * description: "Explain why the answer is correct or incorrect."
5530
+ * },
5531
+ * score: {
5532
+ * description: "Return a score between 0 and 1."
5533
+ * }
5534
+ * }
5535
+ *
5536
+ * @example
5537
+ * {
5538
+ * dataType: "BOOLEAN",
5539
+ * dataType: LangfuseAPI.unstable.EvaluatorOutputDataType.Boolean,
5540
+ * reasoning: {
5541
+ * description: "Explain why the output satisfies the requirement."
5542
+ * },
5543
+ * score: {
5544
+ * description: "Return true if the output satisfies the requirement, otherwise false."
5545
+ * }
5546
+ * }
5547
+ *
5548
+ * @example
5549
+ * {
5550
+ * dataType: "CATEGORICAL",
5551
+ * dataType: LangfuseAPI.unstable.EvaluatorOutputDataType.Categorical,
5552
+ * reasoning: {
5553
+ * description: "Explain which category best fits the output."
5554
+ * },
5555
+ * score: {
5556
+ * description: "Choose the best category.",
5557
+ * categories: ["correct", "partially_correct", "incorrect"],
5558
+ * shouldAllowMultipleMatches: false
5559
+ * }
5560
+ * }
5561
+ */
5562
+ type EvaluatorOutputDefinition = EvaluatorOutputDefinition.Numeric | EvaluatorOutputDefinition.Boolean | EvaluatorOutputDefinition.Categorical;
5563
+ declare namespace EvaluatorOutputDefinition {
5564
+ interface Numeric extends PublicNumericEvaluatorOutputDefinition {
5565
+ dataType: "NUMERIC";
5566
+ }
5567
+ interface Boolean extends PublicBooleanEvaluatorOutputDefinition {
5568
+ dataType: "BOOLEAN";
5569
+ }
5570
+ interface Categorical extends PublicCategoricalEvaluatorOutputDefinition {
5571
+ dataType: "CATEGORICAL";
5572
+ }
5573
+ }
5574
+
5575
+ /**
5576
+ * This file was auto-generated by Fern from our API Definition.
5577
+ */
5578
+
5579
+ interface PublicNumericEvaluatorOutputDefinition {
5580
+ /** Always `NUMERIC`. */
5581
+ dataType: EvaluatorOutputDataType;
5582
+ reasoning: EvaluatorOutputFieldDefinition;
5583
+ score: EvaluatorOutputFieldDefinition;
5584
+ }
5585
+
5586
+ /**
5587
+ * This file was auto-generated by Fern from our API Definition.
5588
+ */
5589
+
5590
+ interface PublicBooleanEvaluatorOutputDefinition {
5591
+ /** Always `BOOLEAN`. */
5592
+ dataType: EvaluatorOutputDataType;
5593
+ reasoning: EvaluatorOutputFieldDefinition;
5594
+ score: EvaluatorOutputFieldDefinition;
5595
+ }
5596
+
5597
+ /**
5598
+ * This file was auto-generated by Fern from our API Definition.
5599
+ */
5600
+ interface PublicCategoricalEvaluatorOutputScoreDefinition {
5601
+ description: string;
5602
+ categories: string[];
5603
+ shouldAllowMultipleMatches: boolean;
5604
+ }
5605
+
5606
+ /**
5607
+ * This file was auto-generated by Fern from our API Definition.
5608
+ */
5609
+
5610
+ interface PublicCategoricalEvaluatorOutputDefinition {
5611
+ /** Always `CATEGORICAL`. */
5612
+ dataType: EvaluatorOutputDataType;
5613
+ reasoning: EvaluatorOutputFieldDefinition;
5614
+ score: PublicCategoricalEvaluatorOutputScoreDefinition;
5615
+ }
5616
+
5617
+ /**
5618
+ * This file was auto-generated by Fern from our API Definition.
5619
+ */
5620
+
5621
+ /**
5622
+ * Evaluator output definition returned by the public API.
5623
+ *
5624
+ * This response always includes `dataType` and never includes an internal output-definition `version`.
5625
+ * Legacy stored evaluator definitions are normalized into this shape before they are returned.
5626
+ *
5627
+ * Use this response shape when deciding how to interpret future evaluation scores:
5628
+ * - `NUMERIC`: expect numeric score values
5629
+ * - `BOOLEAN`: expect `true` / `false`
5630
+ * - `CATEGORICAL`: expect one or more values from `score.categories`
5631
+ *
5632
+ * @example
5633
+ * {
5634
+ * dataType: "NUMERIC",
5635
+ * dataType: LangfuseAPI.unstable.EvaluatorOutputDataType.Numeric,
5636
+ * reasoning: {
5637
+ * description: "Explain why the answer is correct or incorrect."
5638
+ * },
5639
+ * score: {
5640
+ * description: "Return a score between 0 and 1."
5641
+ * }
5642
+ * }
5643
+ *
5644
+ * @example
5645
+ * {
5646
+ * dataType: "CATEGORICAL",
5647
+ * dataType: LangfuseAPI.unstable.EvaluatorOutputDataType.Categorical,
5648
+ * reasoning: {
5649
+ * description: "Explain which label best fits the output."
5650
+ * },
5651
+ * score: {
5652
+ * description: "Choose the best label.",
5653
+ * categories: ["correct", "partially_correct", "incorrect"],
5654
+ * shouldAllowMultipleMatches: false
5655
+ * }
5656
+ * }
5657
+ */
5658
+ type PublicEvaluatorOutputDefinition = PublicEvaluatorOutputDefinition.Numeric | PublicEvaluatorOutputDefinition.Boolean | PublicEvaluatorOutputDefinition.Categorical;
5659
+ declare namespace PublicEvaluatorOutputDefinition {
5660
+ interface Numeric extends PublicNumericEvaluatorOutputDefinition {
5661
+ dataType: "NUMERIC";
5662
+ }
5663
+ interface Boolean extends PublicBooleanEvaluatorOutputDefinition {
5664
+ dataType: "BOOLEAN";
5665
+ }
5666
+ interface Categorical extends PublicCategoricalEvaluatorOutputDefinition {
5667
+ dataType: "CATEGORICAL";
5668
+ }
5669
+ }
5670
+
5671
+ /**
5672
+ * This file was auto-generated by Fern from our API Definition.
5673
+ */
5674
+ type EvaluationRuleStringFilterOperator = "=" | "contains" | "does not contain" | "starts with" | "ends with";
5675
+ declare const EvaluationRuleStringFilterOperator: {
5676
+ readonly Equals: "=";
5677
+ readonly Contains: "contains";
5678
+ readonly DoesNotContain: "does not contain";
5679
+ readonly StartsWith: "starts with";
5680
+ readonly EndsWith: "ends with";
5681
+ };
5682
+
5683
+ /**
5684
+ * This file was auto-generated by Fern from our API Definition.
5685
+ */
5686
+ type EvaluationRuleNumberFilterOperator = "=" | ">" | "<" | ">=" | "<=";
5687
+ declare const EvaluationRuleNumberFilterOperator: {
5688
+ readonly Equals: "=";
5689
+ readonly GreaterThan: ">";
5690
+ readonly LessThan: "<";
5691
+ readonly GreaterThanOrEqual: ">=";
5692
+ readonly LessThanOrEqual: "<=";
5693
+ };
5694
+
5695
+ /**
5696
+ * This file was auto-generated by Fern from our API Definition.
5697
+ */
5698
+ type EvaluationRuleOptionsFilterOperator = "any of" | "none of";
5699
+ declare const EvaluationRuleOptionsFilterOperator: {
5700
+ readonly AnyOf: "any of";
5701
+ readonly NoneOf: "none of";
5702
+ };
5703
+
5704
+ /**
5705
+ * This file was auto-generated by Fern from our API Definition.
5706
+ */
5707
+ type EvaluationRuleArrayOptionsFilterOperator = "any of" | "none of" | "all of";
5708
+ declare const EvaluationRuleArrayOptionsFilterOperator: {
5709
+ readonly AnyOf: "any of";
5710
+ readonly NoneOf: "none of";
5711
+ readonly AllOf: "all of";
5712
+ };
5713
+
5714
+ /**
5715
+ * This file was auto-generated by Fern from our API Definition.
5716
+ */
5717
+ type EvaluationRuleBooleanFilterOperator = "=" | "<>";
5718
+ declare const EvaluationRuleBooleanFilterOperator: {
5719
+ readonly Equals: "=";
5720
+ readonly NotEquals: "<>";
5721
+ };
5722
+
5723
+ /**
5724
+ * This file was auto-generated by Fern from our API Definition.
5725
+ */
5726
+ type EvaluationRuleNullFilterOperator = "is null" | "is not null";
5727
+ declare const EvaluationRuleNullFilterOperator: {
5728
+ readonly IsNull: "is null";
5729
+ readonly IsNotNull: "is not null";
5730
+ };
5731
+
5732
+ /**
5733
+ * This file was auto-generated by Fern from our API Definition.
5734
+ */
5735
+
5736
+ interface DateTimeEvaluationRuleFilter {
5737
+ /** Column to filter on. */
5738
+ column: string;
5739
+ /** Comparison operator for datetime values. */
5740
+ operator: EvaluationRuleNumberFilterOperator;
5741
+ /** Datetime value to compare against. */
5742
+ value: string;
5743
+ }
5744
+
5745
+ /**
5746
+ * This file was auto-generated by Fern from our API Definition.
5747
+ */
5748
+
5749
+ interface StringEvaluationRuleFilter {
5750
+ /** Column to filter on. */
5751
+ column: string;
5752
+ operator: EvaluationRuleStringFilterOperator;
5753
+ value: string;
5754
+ }
5755
+
5756
+ /**
5757
+ * This file was auto-generated by Fern from our API Definition.
5758
+ */
5759
+
5760
+ interface NumberEvaluationRuleFilter {
5761
+ /** Column to filter on. */
5762
+ column: string;
5763
+ operator: EvaluationRuleNumberFilterOperator;
5764
+ value: number;
5765
+ }
5766
+
5767
+ /**
5768
+ * This file was auto-generated by Fern from our API Definition.
5769
+ */
5770
+
5771
+ interface StringOptionsEvaluationRuleFilter {
5772
+ /** Column to filter on. */
5773
+ column: string;
5774
+ operator: EvaluationRuleOptionsFilterOperator;
5775
+ /** One or more allowed string values. */
5776
+ value: string[];
5777
+ }
5778
+
5779
+ /**
5780
+ * This file was auto-generated by Fern from our API Definition.
5781
+ */
5782
+
5783
+ interface ArrayOptionsEvaluationRuleFilter {
5784
+ /** Column to filter on. */
5785
+ column: string;
5786
+ operator: EvaluationRuleArrayOptionsFilterOperator;
5787
+ /** One or more array elements to match. */
5788
+ value: string[];
5789
+ }
5790
+
5791
+ /**
5792
+ * This file was auto-generated by Fern from our API Definition.
5793
+ */
5794
+
5795
+ interface StringObjectEvaluationRuleFilter {
5796
+ /** Object-valued column to filter on. In the unstable public API this is currently `metadata`. */
5797
+ column: string;
5798
+ /** Top-level key inside the object-valued column to filter on. */
5799
+ key: string;
5800
+ operator: EvaluationRuleStringFilterOperator;
5801
+ value: string;
5802
+ }
5803
+
5804
+ /**
5805
+ * This file was auto-generated by Fern from our API Definition.
5806
+ */
5807
+
5808
+ interface NumberObjectEvaluationRuleFilter {
5809
+ /** Object-valued column to filter on. */
5810
+ column: string;
5811
+ /** Key inside the object-valued column to filter on. */
5812
+ key: string;
5813
+ operator: EvaluationRuleNumberFilterOperator;
5814
+ value: number;
5815
+ }
5816
+
5817
+ /**
5818
+ * This file was auto-generated by Fern from our API Definition.
5819
+ */
5820
+
5821
+ interface CategoryOptionsEvaluationRuleFilter {
5822
+ /** Object-valued column to filter on. */
5823
+ column: string;
5824
+ /** Key inside the object-valued column to filter on. */
5825
+ key: string;
5826
+ operator: EvaluationRuleOptionsFilterOperator;
5827
+ value: string[];
5828
+ }
5829
+
5830
+ /**
5831
+ * This file was auto-generated by Fern from our API Definition.
5832
+ */
5833
+
5834
+ interface BooleanEvaluationRuleFilter {
5835
+ /** Column to filter on. */
5836
+ column: string;
5837
+ operator: EvaluationRuleBooleanFilterOperator;
5838
+ value: boolean;
5839
+ }
5840
+
5841
+ /**
5842
+ * This file was auto-generated by Fern from our API Definition.
5843
+ */
5844
+
5845
+ interface NullEvaluationRuleFilter {
5846
+ /** Column to filter on. In the unstable public API this is currently `parentObservationId`. */
5847
+ column: string;
5848
+ operator: EvaluationRuleNullFilterOperator;
5849
+ /** Ignored placeholder value. Clients may omit it or send an empty string. */
5850
+ value?: string;
5851
+ }
5852
+
5853
+ /**
5854
+ * This file was auto-generated by Fern from our API Definition.
5855
+ */
5856
+
5857
+ /**
5858
+ * Maps one evaluator variable to one source field from the target object.
5859
+ *
5860
+ * Manual mappings are used for `llm_as_judge` evaluators. `code` evaluators use a fixed runtime mapping managed by Langfuse.
5861
+ *
5862
+ * How to build a valid mapping list:
5863
+ * 1. Create the evaluator or fetch it with `GET /evaluators/{id}`.
5864
+ * 2. Read the evaluator `variables` array.
5865
+ * 3. Add exactly one mapping object for each variable in that array.
5866
+ * 4. Use the variable name exactly as returned, without braces such as `{{` or `}}`.
5867
+ * 5. Choose a `source` that is valid for the selected `target`.
5868
+ *
5869
+ * `jsonPath` is optional. Use it only when the selected source is a JSON object and you want to extract one nested field before inserting it into the evaluator prompt.
5870
+ *
5871
+ * Recovery guidance:
5872
+ * - `invalid_variable_mapping`: the variable name is unknown for this evaluator, or the selected `source` is not valid for the chosen `target`
5873
+ * - `missing_variable_mapping`: one or more LLM-as-judge evaluator variables are not mapped yet
5874
+ * - `duplicate_variable_mapping`: the same evaluator variable appears more than once
5875
+ * - `invalid_json_path`: the JSONPath expression is malformed. Remove it or correct it.
5876
+ *
5877
+ * @example
5878
+ * {
5879
+ * variable: "input",
5880
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Input
5881
+ * }
5882
+ *
5883
+ * @example
5884
+ * {
5885
+ * variable: "customer_tier",
5886
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Metadata,
5887
+ * jsonPath: "$.customer.tier"
5888
+ * }
5889
+ *
5890
+ * @example
5891
+ * {
5892
+ * variable: "expected_output",
5893
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.ExpectedOutput
5894
+ * }
5895
+ */
5896
+ interface EvaluationRuleMapping {
5897
+ /**
5898
+ * Prompt variable name without braces.
5899
+ *
5900
+ * Example: for the prompt `Judge {{input}} against {{output}}`, use `input` and `output`.
5901
+ */
5902
+ variable: string;
5903
+ /**
5904
+ * Source field that should populate the prompt variable.
5905
+ *
5906
+ * Quick reference:
5907
+ * - `target=observation`: `input`, `output`, `metadata`
5908
+ * - `target=experiment`: `input`, `output`, `metadata`, `expected_output`, `experiment_item_metadata`
5909
+ */
5910
+ source: EvaluationRuleMappingSource;
5911
+ /**
5912
+ * Optional JSONPath selector applied to the selected source before it is passed to the evaluator prompt.
5913
+ *
5914
+ * Requirements:
5915
+ * - Must start with `$`
5916
+ * - Must be a syntactically valid JSONPath expression
5917
+ * - Most useful with `source=metadata`
5918
+ */
5919
+ jsonPath?: string;
5920
+ }
5921
+
5922
+ /**
5923
+ * This file was auto-generated by Fern from our API Definition.
5924
+ */
5925
+
5926
+ /**
5927
+ * One filter condition used to decide whether a live-ingested target should be evaluated.
5928
+ *
5929
+ * An evaluation rule can include zero or more filter objects. All filters must be satisfied for the target to run.
5930
+ *
5931
+ * How to build a valid filter object:
5932
+ * - Pick the `target` first, because it changes the supported columns.
5933
+ * - Pick the filter `type`. That determines which fields are required.
5934
+ * - Use `key` only for object filters such as `metadata`.
5935
+ * - Use the correct `value` shape for the chosen filter `type`.
5936
+ *
5937
+ * Operator quick reference by filter `type`:
5938
+ * - `string`: `"="`, `contains`, `does not contain`, `starts with`, `ends with`
5939
+ * - `number`: `"="`, `">"`, `"<"`, `">="`, `"<="`
5940
+ * - `datetime`: `"="`, `">"`, `"<"`, `">="`, `"<="`
5941
+ * - `stringOptions`: `any of`, `none of`
5942
+ * - `arrayOptions`: `any of`, `none of`, `all of`
5943
+ * - `stringObject`: same operators as `string`
5944
+ * - `null`: `is null`, `is not null`
5945
+ *
5946
+ * Supported columns by target:
5947
+ * - `target=observation`
5948
+ * - `type`: `stringOptions`, operators `any of` / `none of`, values `GENERATION`, `SPAN`, `EVENT`
5949
+ * - `name`: `stringOptions`, operators `any of` / `none of`
5950
+ * - `environment`: `stringOptions`, operators `any of` / `none of`
5951
+ * - `level`: `stringOptions`, operators `any of` / `none of`, values `DEBUG`, `DEFAULT`, `WARNING`, `ERROR`
5952
+ * - `version`: `string`
5953
+ * - `traceName`: `stringOptions`, operators `any of` / `none of`
5954
+ * - `userId`: `string`
5955
+ * - `sessionId`: `string`
5956
+ * - `tags`: `arrayOptions`, operators `any of` / `none of` / `all of`
5957
+ * - `metadata`: `stringObject` with `key`
5958
+ * - `parentObservationId`: `null`, operators `is null` / `is not null`
5959
+ * - `calledToolNames`: `arrayOptions`, operators `any of` / `none of` / `all of`
5960
+ * - `toolCalls`: `number`
5961
+ * - `target=experiment`
5962
+ * - `datasetId`: `stringOptions`, operators `any of` / `none of`
5963
+ * Use dataset `id` values from `GET /api/public/v2/datasets`, not dataset names.
5964
+ *
5965
+ * Recovery guidance:
5966
+ * - `invalid_filter_value` with `details.column` but no `invalidValues`: the selected `column` is not supported for the chosen `target`
5967
+ * - `invalid_filter_value` with `details.invalidValues`: the selected values are not allowed for that column. Replace them with one of `details.allowedValues` when provided.
5968
+ * - `invalid_filter_value` for `column=datasetId`: call `GET /api/public/v2/datasets`, then retry with dataset `id` values from that response.
5969
+ *
5970
+ * @example
5971
+ * {
5972
+ * type: "stringOptions",
5973
+ * column: "type",
5974
+ * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
5975
+ * value: ["GENERATION"]
5976
+ * }
5977
+ *
5978
+ * @example
5979
+ * {
5980
+ * type: "stringObject",
5981
+ * column: "metadata",
5982
+ * key: "customerTier",
5983
+ * operator: LangfuseAPI.unstable.EvaluationRuleStringFilterOperator.Equals,
5984
+ * value: "enterprise"
5985
+ * }
5986
+ *
5987
+ * @example
5988
+ * {
5989
+ * type: "null",
5990
+ * column: "parentObservationId",
5991
+ * operator: LangfuseAPI.unstable.EvaluationRuleNullFilterOperator.IsNull
5992
+ * }
5993
+ *
5994
+ * @example
5995
+ * {
5996
+ * type: "arrayOptions",
5997
+ * column: "tags",
5998
+ * operator: LangfuseAPI.unstable.EvaluationRuleArrayOptionsFilterOperator.AnyOf,
5999
+ * value: ["production"]
6000
+ * }
6001
+ *
6002
+ * @example
6003
+ * {
6004
+ * type: "stringOptions",
6005
+ * column: "datasetId",
6006
+ * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
6007
+ * value: ["550e8400-e29b-41d4-a716-446655440000"]
6008
+ * }
6009
+ */
6010
+ type EvaluationRuleFilter = EvaluationRuleFilter.Datetime | EvaluationRuleFilter.String | EvaluationRuleFilter.Number | EvaluationRuleFilter.StringOptions | EvaluationRuleFilter.CategoryOptions | EvaluationRuleFilter.ArrayOptions | EvaluationRuleFilter.StringObject | EvaluationRuleFilter.NumberObject | EvaluationRuleFilter.Boolean | EvaluationRuleFilter.Null;
6011
+ declare namespace EvaluationRuleFilter {
6012
+ interface Datetime extends DateTimeEvaluationRuleFilter {
6013
+ type: "datetime";
6014
+ }
6015
+ interface String extends StringEvaluationRuleFilter {
6016
+ type: "string";
6017
+ }
6018
+ interface Number extends NumberEvaluationRuleFilter {
6019
+ type: "number";
6020
+ }
6021
+ interface StringOptions extends StringOptionsEvaluationRuleFilter {
6022
+ type: "stringOptions";
6023
+ }
6024
+ interface CategoryOptions extends CategoryOptionsEvaluationRuleFilter {
6025
+ type: "categoryOptions";
6026
+ }
6027
+ interface ArrayOptions extends ArrayOptionsEvaluationRuleFilter {
6028
+ type: "arrayOptions";
6029
+ }
6030
+ interface StringObject extends StringObjectEvaluationRuleFilter {
6031
+ type: "stringObject";
6032
+ }
6033
+ interface NumberObject extends NumberObjectEvaluationRuleFilter {
6034
+ type: "numberObject";
6035
+ }
6036
+ interface Boolean extends BooleanEvaluationRuleFilter {
6037
+ type: "boolean";
6038
+ }
6039
+ interface Null extends NullEvaluationRuleFilter {
6040
+ type: "null";
6041
+ }
6042
+ }
6043
+
6044
+ type index$7_ArrayOptionsEvaluationRuleFilter = ArrayOptionsEvaluationRuleFilter;
6045
+ type index$7_BooleanEvaluationRuleFilter = BooleanEvaluationRuleFilter;
6046
+ type index$7_CategoryOptionsEvaluationRuleFilter = CategoryOptionsEvaluationRuleFilter;
6047
+ declare const index$7_CodeEvaluatorSourceCodeLanguage: typeof CodeEvaluatorSourceCodeLanguage;
6048
+ type index$7_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
6049
+ declare const index$7_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
6050
+ declare const index$7_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
6051
+ declare const index$7_EvaluationRuleFilter: typeof EvaluationRuleFilter;
6052
+ type index$7_EvaluationRuleMapping = EvaluationRuleMapping;
6053
+ declare const index$7_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
6054
+ declare const index$7_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
6055
+ declare const index$7_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
6056
+ declare const index$7_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
6057
+ declare const index$7_EvaluationRuleStatus: typeof EvaluationRuleStatus;
6058
+ declare const index$7_EvaluationRuleStringFilterOperator: typeof EvaluationRuleStringFilterOperator;
6059
+ declare const index$7_EvaluationRuleTarget: typeof EvaluationRuleTarget;
6060
+ type index$7_EvaluatorModelConfig = EvaluatorModelConfig;
6061
+ declare const index$7_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
6062
+ declare const index$7_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
6063
+ type index$7_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
6064
+ declare const index$7_EvaluatorScope: typeof EvaluatorScope;
6065
+ declare const index$7_EvaluatorType: typeof EvaluatorType;
6066
+ type index$7_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
6067
+ type index$7_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
6068
+ type index$7_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
6069
+ type index$7_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
6070
+ type index$7_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
6071
+ type index$7_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
6072
+ declare const index$7_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
6073
+ type index$7_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
6074
+ type index$7_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
6075
+ type index$7_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
6076
+ type index$7_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
6077
+ declare namespace index$7 {
6078
+ export { type index$7_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, type index$7_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$7_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, index$7_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, type index$7_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, index$7_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$7_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, index$7_EvaluationRuleFilter as EvaluationRuleFilter, type index$7_EvaluationRuleMapping as EvaluationRuleMapping, index$7_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$7_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$7_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$7_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$7_EvaluationRuleStatus as EvaluationRuleStatus, index$7_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$7_EvaluationRuleTarget as EvaluationRuleTarget, type index$7_EvaluatorModelConfig as EvaluatorModelConfig, index$7_EvaluatorOutputDataType as EvaluatorOutputDataType, index$7_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$7_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$7_EvaluatorScope as EvaluatorScope, index$7_EvaluatorType as EvaluatorType, type index$7_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$7_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$7_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$7_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$7_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$7_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$7_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$7_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$7_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$7_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$7_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter };
6079
+ }
6080
+
6081
+ /**
6082
+ * This file was auto-generated by Fern from our API Definition.
6083
+ */
6084
+ /**
6085
+ * Machine-readable error code returned by the unstable evaluators API.
6086
+ *
6087
+ * SDKs, CLIs, and agents should branch on `code` rather than parsing the human-readable `message`.
6088
+ * The HTTP status still indicates the broad error class, while `code` gives the specific failure reason.
6089
+ */
6090
+ type PublicApiErrorCode = "authentication_failed" | "access_denied" | "invalid_request" | "invalid_query" | "invalid_body" | "invalid_filter_value" | "invalid_json_path" | "invalid_variable_mapping" | "missing_variable_mapping" | "duplicate_variable_mapping" | "resource_not_found" | "name_conflict" | "evaluator_preflight_failed" | "conflict" | "unprocessable_content" | "rate_limited" | "method_not_allowed" | "internal_error";
6091
+ declare const PublicApiErrorCode: {
6092
+ readonly AuthenticationFailed: "authentication_failed";
6093
+ readonly AccessDenied: "access_denied";
6094
+ readonly InvalidRequest: "invalid_request";
6095
+ readonly InvalidQuery: "invalid_query";
6096
+ readonly InvalidBody: "invalid_body";
6097
+ readonly InvalidFilterValue: "invalid_filter_value";
6098
+ readonly InvalidJsonPath: "invalid_json_path";
6099
+ readonly InvalidVariableMapping: "invalid_variable_mapping";
6100
+ readonly MissingVariableMapping: "missing_variable_mapping";
6101
+ readonly DuplicateVariableMapping: "duplicate_variable_mapping";
6102
+ readonly ResourceNotFound: "resource_not_found";
6103
+ readonly NameConflict: "name_conflict";
6104
+ readonly EvaluatorPreflightFailed: "evaluator_preflight_failed";
6105
+ readonly Conflict: "conflict";
6106
+ readonly UnprocessableContent: "unprocessable_content";
6107
+ readonly RateLimited: "rate_limited";
6108
+ readonly MethodNotAllowed: "method_not_allowed";
6109
+ readonly InternalError: "internal_error";
6110
+ };
6111
+
6112
+ /**
6113
+ * This file was auto-generated by Fern from our API Definition.
6114
+ */
6115
+ /**
6116
+ * One validation issue returned for malformed request bodies or query parameters.
6117
+ *
6118
+ * This mirrors the most important parts of a Zod issue: a machine-readable `code`,
6119
+ * a human-readable `message`, and a structured `path`.
6120
+ */
6121
+ interface PublicApiValidationIssue {
6122
+ /** Machine-readable validation issue code emitted by the server validator. */
6123
+ code: string;
6124
+ /** Human-readable explanation of the validation failure. */
6125
+ message: string;
6126
+ /** Path to the invalid field, for example `["mapping", 0, "jsonPath"]`. */
6127
+ path: unknown[];
6128
+ }
6129
+
6130
+ /**
6131
+ * This file was auto-generated by Fern from our API Definition.
6132
+ */
6133
+
6134
+ /**
6135
+ * Optional structured context attached to an unstable-evals error.
6136
+ *
6137
+ * The populated fields depend on the error `code`:
6138
+ * - request parsing failures populate `issues`
6139
+ * - filter validation failures populate `field`, `column`, `invalidValues`, and `allowedValues`
6140
+ * - variable mapping failures populate `field`, `variable`, or `variables`
6141
+ * - JSONPath validation failures populate `field`, `variable`, and `value`
6142
+ * - evaluator preflight failures populate `evaluatorName`, `provider`, and `model`
6143
+ * - rate limiting populates `retryAfterSeconds`, `limit`, `remaining`, and `resetAt`
6144
+ */
6145
+ interface PublicApiErrorDetails {
6146
+ /** Validation issues for malformed request bodies or query parameters. */
6147
+ issues?: PublicApiValidationIssue[];
6148
+ /** Path-like reference to the failing field, for example `mapping[1].jsonPath`. */
6149
+ field?: string;
6150
+ /** Filter column that failed validation. */
6151
+ column?: string;
6152
+ /** Unsupported values supplied by the caller. */
6153
+ invalidValues?: string[];
6154
+ /** Allowed values for the failing filter column. */
6155
+ allowedValues?: string[];
6156
+ /** Evaluator variable involved in the failure. */
6157
+ variable?: string;
6158
+ /** Multiple evaluator variables involved in the failure, for example missing mappings. */
6159
+ variables?: string[];
6160
+ /** Raw invalid value supplied by the caller. */
6161
+ value?: string;
6162
+ /** Evaluator name used during preflight validation. */
6163
+ evaluatorName?: string;
6164
+ /** Provider resolved during evaluator preflight, if any. */
6165
+ provider?: string | null;
6166
+ /** Model resolved during evaluator preflight, if any. */
6167
+ model?: string | null;
6168
+ /** Suggested retry delay for rate-limited requests. */
6169
+ retryAfterSeconds?: number;
6170
+ /** Numeric limit associated with the failure, for example the active evaluation-rule cap or the current rate-limit window. */
6171
+ limit?: number;
6172
+ /** Remaining requests in the current rate-limit window. */
6173
+ remaining?: number;
6174
+ /** ISO-8601 timestamp when the current rate-limit window resets. */
6175
+ resetAt?: string;
6176
+ }
6177
+
6178
+ /**
6179
+ * This file was auto-generated by Fern from our API Definition.
6180
+ */
6181
+
6182
+ /**
6183
+ * Standard error envelope for the unstable evaluators API.
6184
+ *
6185
+ * Response handling guidance:
6186
+ * - Use the HTTP status code for the broad class of failure.
6187
+ * - Use `code` for precise branching in SDKs, CLIs, or agents.
6188
+ * - Inspect `details` for field-level validation context such as invalid filter values, malformed JSONPath expressions, or missing variable mappings.
6189
+ * - Retry only after fixing the specific issue described by `code` and `details`.
6190
+ *
6191
+ * @example
6192
+ * {
6193
+ * message: "Filter column \"type\" contains unsupported value(s): INVALID",
6194
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidFilterValue,
6195
+ * details: {
6196
+ * field: "filter[0].value",
6197
+ * column: "type",
6198
+ * invalidValues: ["INVALID"],
6199
+ * allowedValues: ["GENERATION", "SPAN", "EVENT"]
6200
+ * }
6201
+ * }
6202
+ *
6203
+ * @example
6204
+ * {
6205
+ * message: "Filter column \"datasetId\" contains dataset id(s) that do not exist in this project: dataset-prod",
6206
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidFilterValue,
6207
+ * details: {
6208
+ * field: "filter[0].value",
6209
+ * column: "datasetId",
6210
+ * invalidValues: ["dataset-prod"]
6211
+ * }
6212
+ * }
6213
+ *
6214
+ * @example
6215
+ * {
6216
+ * message: "No valid LLM model found for evaluator \"answer-correctness\". No default model or custom model configured for project project_123",
6217
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.EvaluatorPreflightFailed,
6218
+ * details: {
6219
+ * evaluatorName: "answer-correctness",
6220
+ * provider: undefined,
6221
+ * model: undefined
6222
+ * }
6223
+ * }
6224
+ *
6225
+ * @example
6226
+ * {
6227
+ * message: "Missing mappings for evaluator variable(s): output",
6228
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.MissingVariableMapping,
6229
+ * details: {
6230
+ * field: "mapping",
6231
+ * variables: ["output"]
6232
+ * }
6233
+ * }
6234
+ *
6235
+ * @example
6236
+ * {
6237
+ * message: "Mapping for variable \"customer_tier\" has an invalid jsonPath \"$[\". JSONPath expressions must use balanced quotes, brackets, and parentheses.",
6238
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.InvalidJsonPath,
6239
+ * details: {
6240
+ * field: "mapping[0].jsonPath",
6241
+ * variable: "customer_tier",
6242
+ * value: "$["
6243
+ * }
6244
+ * }
6245
+ *
6246
+ * @example
6247
+ * {
6248
+ * message: "An evaluation rule named \"answer-quality-live\" already exists in this project. Use PATCH /api/public/unstable/evaluation-rules/erule_123 to update it instead of creating a duplicate.",
6249
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.NameConflict,
6250
+ * details: {
6251
+ * field: "name"
6252
+ * }
6253
+ * }
6254
+ *
6255
+ * @example
6256
+ * {
6257
+ * message: "This project already has the maximum number of active evaluation rules (50). Disable an existing active evaluation rule before enabling another one.",
6258
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.Conflict,
6259
+ * details: {
6260
+ * limit: 50
6261
+ * }
6262
+ * }
6263
+ *
6264
+ * @example
6265
+ * {
6266
+ * message: "Rate limit exceeded",
6267
+ * code: LangfuseAPI.unstable.PublicApiErrorCode.RateLimited,
6268
+ * details: {
6269
+ * retryAfterSeconds: 60,
6270
+ * limit: 1000,
6271
+ * remaining: 0,
6272
+ * resetAt: "2026-03-30T10:00:00.000Z"
6273
+ * }
6274
+ * }
6275
+ */
6276
+ interface PublicApiError {
6277
+ /** Human-readable description of the failure. */
6278
+ message: string;
6279
+ /** Stable machine-readable error code. */
6280
+ code: PublicApiErrorCode;
6281
+ /** Optional structured error context. Inspect the populated fields based on `code`. */
6282
+ details?: PublicApiErrorDetails;
6283
+ }
6284
+
6285
+ /**
6286
+ * This file was auto-generated by Fern from our API Definition.
6287
+ */
6288
+
6289
+ declare class BadRequestError extends LangfuseAPIError {
6290
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6291
+ }
6292
+
6293
+ /**
6294
+ * This file was auto-generated by Fern from our API Definition.
6295
+ */
6296
+
6297
+ declare class UnauthorizedError extends LangfuseAPIError {
6298
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6299
+ }
6300
+
6301
+ /**
6302
+ * This file was auto-generated by Fern from our API Definition.
6303
+ */
6304
+
6305
+ declare class AccessDeniedError extends LangfuseAPIError {
6306
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6307
+ }
6308
+
6309
+ /**
6310
+ * This file was auto-generated by Fern from our API Definition.
6311
+ */
6312
+
6313
+ declare class NotFoundError extends LangfuseAPIError {
6314
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6315
+ }
6316
+
6317
+ /**
6318
+ * This file was auto-generated by Fern from our API Definition.
6319
+ */
6320
+
6321
+ declare class MethodNotAllowedError extends LangfuseAPIError {
6322
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6323
+ }
6324
+
6325
+ /**
6326
+ * This file was auto-generated by Fern from our API Definition.
6327
+ */
6328
+
6329
+ declare class ConflictError extends LangfuseAPIError {
6330
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6331
+ }
6332
+
6333
+ /**
6334
+ * This file was auto-generated by Fern from our API Definition.
6335
+ */
6336
+
6337
+ declare class UnprocessableContentError extends LangfuseAPIError {
6338
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6339
+ }
6340
+
6341
+ /**
6342
+ * This file was auto-generated by Fern from our API Definition.
6343
+ */
6344
+
6345
+ declare class TooManyRequestsError extends LangfuseAPIError {
6346
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6347
+ }
6348
+
6349
+ /**
6350
+ * This file was auto-generated by Fern from our API Definition.
6351
+ */
6352
+
6353
+ declare class InternalServerError extends LangfuseAPIError {
6354
+ constructor(body: PublicApiError, rawResponse?: RawResponse);
6355
+ }
6356
+
6357
+ type index$6_AccessDeniedError = AccessDeniedError;
6358
+ declare const index$6_AccessDeniedError: typeof AccessDeniedError;
6359
+ type index$6_BadRequestError = BadRequestError;
6360
+ declare const index$6_BadRequestError: typeof BadRequestError;
6361
+ type index$6_ConflictError = ConflictError;
6362
+ declare const index$6_ConflictError: typeof ConflictError;
6363
+ type index$6_InternalServerError = InternalServerError;
6364
+ declare const index$6_InternalServerError: typeof InternalServerError;
6365
+ type index$6_MethodNotAllowedError = MethodNotAllowedError;
6366
+ declare const index$6_MethodNotAllowedError: typeof MethodNotAllowedError;
6367
+ type index$6_NotFoundError = NotFoundError;
6368
+ declare const index$6_NotFoundError: typeof NotFoundError;
6369
+ type index$6_PublicApiError = PublicApiError;
6370
+ declare const index$6_PublicApiErrorCode: typeof PublicApiErrorCode;
6371
+ type index$6_PublicApiErrorDetails = PublicApiErrorDetails;
6372
+ type index$6_PublicApiValidationIssue = PublicApiValidationIssue;
6373
+ type index$6_TooManyRequestsError = TooManyRequestsError;
6374
+ declare const index$6_TooManyRequestsError: typeof TooManyRequestsError;
6375
+ type index$6_UnauthorizedError = UnauthorizedError;
6376
+ declare const index$6_UnauthorizedError: typeof UnauthorizedError;
6377
+ type index$6_UnprocessableContentError = UnprocessableContentError;
6378
+ declare const index$6_UnprocessableContentError: typeof UnprocessableContentError;
6379
+ declare namespace index$6 {
6380
+ export { index$6_AccessDeniedError as AccessDeniedError, index$6_BadRequestError as BadRequestError, index$6_ConflictError as ConflictError, index$6_InternalServerError as InternalServerError, index$6_MethodNotAllowedError as MethodNotAllowedError, index$6_NotFoundError as NotFoundError, type index$6_PublicApiError as PublicApiError, index$6_PublicApiErrorCode as PublicApiErrorCode, type index$6_PublicApiErrorDetails as PublicApiErrorDetails, type index$6_PublicApiValidationIssue as PublicApiValidationIssue, index$6_TooManyRequestsError as TooManyRequestsError, index$6_UnauthorizedError as UnauthorizedError, index$6_UnprocessableContentError as UnprocessableContentError };
6381
+ }
6382
+
6383
+ /**
6384
+ * This file was auto-generated by Fern from our API Definition.
6385
+ */
6386
+
6387
+ /**
6388
+ * Live evaluation rule for incoming data.
6389
+ *
6390
+ * An evaluation rule answers:
6391
+ * - which evaluator should be used
6392
+ * - which target objects should trigger scoring
6393
+ * - how often scoring should run
6394
+ * - which target fields should populate each evaluator variable
6395
+ * - whether the deployment is active, inactive, or paused
6396
+ *
6397
+ * Important status semantics:
6398
+ * - `enabled` is the desired on/off setting from the client
6399
+ * - `status` is the effective runtime state after Langfuse applies validation and blocking rules
6400
+ * - `enabled=true` with `status=paused` means the rule should run, but Langfuse has paused it until the underlying problem is fixed
6401
+ *
6402
+ * @example
6403
+ * {
6404
+ * id: "erule_123",
6405
+ * name: "answer-correctness-live",
6406
+ * evaluator: {
6407
+ * id: "evaltmpl_123",
6408
+ * name: "answer-correctness",
6409
+ * scope: LangfuseAPI.unstable.EvaluatorScope.Project,
6410
+ * type: LangfuseAPI.unstable.EvaluatorType.LlmAsJudge
6411
+ * },
6412
+ * target: LangfuseAPI.unstable.EvaluationRuleTarget.Observation,
6413
+ * enabled: true,
6414
+ * status: LangfuseAPI.unstable.EvaluationRuleStatus.Active,
6415
+ * pausedReason: null,
6416
+ * pausedMessage: null,
6417
+ * sampling: 1,
6418
+ * filter: [{
6419
+ * type: "stringOptions",
6420
+ * column: "type",
6421
+ * operator: LangfuseAPI.unstable.EvaluationRuleOptionsFilterOperator.AnyOf,
6422
+ * value: ["GENERATION"]
6423
+ * }],
6424
+ * mapping: [{
6425
+ * variable: "input",
6426
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Input
6427
+ * }, {
6428
+ * variable: "output",
6429
+ * source: LangfuseAPI.unstable.EvaluationRuleMappingSource.Output
6430
+ * }],
6431
+ * createdAt: "2026-03-30T09:20:00.000Z",
6432
+ * updatedAt: "2026-03-30T09:20:00.000Z"
6433
+ * }
6434
+ */
6435
+ interface EvaluationRule {
6436
+ /** Stable evaluation rule identifier. */
6437
+ id: string;
6438
+ /** Human-readable deployment name. This is independent from the evaluator name. */
6439
+ name: string;
6440
+ /**
6441
+ * Evaluator currently used by this rule.
6442
+ *
6443
+ * `name` and `scope` identify the evaluator family conceptually.
6444
+ * `id` is the currently active evaluator version in that family.
6445
+ * If you create a newer project version with the same evaluator name later, existing evaluation rules are moved to it automatically.
6446
+ */
6447
+ evaluator: EvaluationRuleEvaluator;
6448
+ /** Target object type that should trigger scoring. */
6449
+ target: EvaluationRuleTarget;
6450
+ /** Desired enabled state configured by the client. */
6451
+ enabled: boolean;
6452
+ /** Effective runtime status after Langfuse applies validation and blocking rules. */
6453
+ status: EvaluationRuleStatus;
6454
+ /** Machine-readable reason when `status=paused`, otherwise `null`. */
6455
+ pausedReason: string | null;
6456
+ /** Human-readable explanation when `status=paused`, otherwise `null`. */
6457
+ pausedMessage: string | null;
6458
+ /**
6459
+ * Fraction of matching target objects that should be evaluated.
6460
+ *
6461
+ * Must be greater than `0` and less than or equal to `1`.
6462
+ * - `1` means evaluate every matching target.
6463
+ * - `0.25` means evaluate approximately 25% of matching targets.
6464
+ */
6465
+ sampling: number;
6466
+ /** List of filter conditions used to decide whether a target should be evaluated. */
6467
+ filter: EvaluationRuleFilter[];
6468
+ /** Variable mappings used to populate evaluator runtime variables from the live target object. */
6469
+ mapping: EvaluationRuleMapping[];
6470
+ /** Timestamp when the evaluation rule was created. */
6471
+ createdAt: string;
6472
+ /** Timestamp when the evaluation rule was last updated. */
6473
+ updatedAt: string;
6474
+ }
6475
+
6476
+ /**
6477
+ * This file was auto-generated by Fern from our API Definition.
6478
+ */
6479
+
6480
+ /**
6481
+ * Paginated list of evaluation rules.
6482
+ */
6483
+ interface EvaluationRules$1 {
6484
+ /** Evaluation rules in the current page. */
6485
+ data: EvaluationRule[];
6486
+ /** Standard pagination metadata. */
6487
+ meta: MetaResponse;
6488
+ }
6489
+
6490
+ /**
6491
+ * This file was auto-generated by Fern from our API Definition.
6492
+ */
6493
+
6494
+ /**
6495
+ * Request body for creating an evaluation rule.
6496
+ *
6497
+ * Checklist for agents and SDK clients:
6498
+ * - reference an existing evaluator family by `evaluator.name` and `evaluator.scope`
6499
+ * - choose `target=observation` or `target=experiment`
6500
+ * - if `target=experiment` and you want a dataset filter, call `GET /api/public/v2/datasets` first and use dataset `id` values in `filter[].value`
6501
+ * - for `llm_as_judge`, fetch or inspect the evaluator first and provide a complete variable mapping for every evaluator variable
6502
+ * - for `code`, do not send variables or mappings; Langfuse stores the fixed code runtime mapping automatically
6503
+ * - optionally narrow execution with `filter`
6504
+ * - set `enabled=true` only when you want live execution immediately
6505
+ */
6506
+ type CreateEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest | CreateCodeEvaluationRuleRequest;
6507
+
6508
+ /**
6509
+ * This file was auto-generated by Fern from our API Definition.
6510
+ */
6511
+
6512
+ interface CreateLlmAsJudgeEvaluationRuleRequest {
6513
+ /** Human-readable deployment name. */
6514
+ name: string;
6515
+ /**
6516
+ * LLM-as-judge evaluator family to use.
6517
+ *
6518
+ * Use `name`, `scope`, and `type` from the evaluator endpoints. If `type` is omitted, Langfuse defaults it to `llm_as_judge` for backwards compatibility.
6519
+ * Langfuse resolves that family to its latest version before saving the rule.
6520
+ */
6521
+ evaluator: LlmAsJudgeEvaluationRuleEvaluatorReference;
6522
+ /** Target object type to evaluate. */
6523
+ target: EvaluationRuleTarget;
6524
+ /** Whether the deployment should be active immediately after creation. */
6525
+ enabled: boolean;
6526
+ /** Optional sampling fraction. Defaults to `1`. */
6527
+ sampling?: number;
6528
+ /**
6529
+ * Optional filter list.
6530
+ *
6531
+ * Omit or pass an empty list to evaluate all matching targets for the selected `target`.
6532
+ * Each filter object must use a column that is valid for that `target`.
6533
+ * For `target=experiment`, `column=datasetId` expects dataset `id` values from `GET /api/public/v2/datasets`, not dataset names.
6534
+ */
6535
+ filter?: EvaluationRuleFilter[];
6536
+ /**
6537
+ * LLM-as-judge variable mappings.
6538
+ *
6539
+ * Every evaluator variable must appear exactly once.
6540
+ * Build this list from the evaluator `variables` array returned by the evaluator endpoints.
6541
+ */
6542
+ mapping: EvaluationRuleMapping[];
6543
+ }
6544
+
6545
+ /**
6546
+ * This file was auto-generated by Fern from our API Definition.
6547
+ */
6548
+
6549
+ interface CreateCodeEvaluationRuleRequest {
6550
+ /** Human-readable deployment name. */
6551
+ name: string;
6552
+ /**
6553
+ * Code evaluator family to use.
6554
+ *
6555
+ * Use `name`, `scope`, and `type` from the evaluator endpoints.
6556
+ * Langfuse resolves that family to its latest version before saving the rule.
6557
+ */
6558
+ evaluator: CodeEvaluationRuleEvaluatorReference;
6559
+ /** Target object type to evaluate. */
6560
+ target: EvaluationRuleTarget;
6561
+ /** Whether the deployment should be active immediately after creation. */
6562
+ enabled: boolean;
6563
+ /** Optional sampling fraction. Defaults to `1`. */
6564
+ sampling?: number;
6565
+ /**
6566
+ * Optional filter list.
6567
+ *
6568
+ * Omit or pass an empty list to evaluate all matching targets for the selected `target`.
6569
+ * Each filter object must use a column that is valid for that `target`.
6570
+ * For `target=experiment`, `column=datasetId` expects dataset `id` values from `GET /api/public/v2/datasets`, not dataset names.
6571
+ */
6572
+ filter?: EvaluationRuleFilter[];
6573
+ }
6574
+
6575
+ /**
6576
+ * This file was auto-generated by Fern from our API Definition.
6577
+ */
6578
+
6579
+ /**
6580
+ * Partial update body for an evaluation rule.
6581
+ *
6582
+ * Provide only the fields you want to change.
6583
+ * An empty body is rejected.
6584
+ *
6585
+ * Practical guidance:
6586
+ * - If you only want to rename the rule or change sampling, send just those fields.
6587
+ * - If you change to an LLM-as-judge `evaluator`, send a fresh `mapping` unless you are certain the existing mapping still matches the evaluator variables.
6588
+ * - If you change `target` for an LLM-as-judge rule, usually send both `filter` and `mapping` in the same request.
6589
+ * - For code evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically.
6590
+ * - If you change an experiment `datasetId` filter, call `GET /api/public/v2/datasets` and use dataset `id` values from that response.
6591
+ */
6592
+ interface UpdateEvaluationRuleRequest {
6593
+ /** Updated deployment name. */
6594
+ name?: string;
6595
+ /**
6596
+ * Updated evaluator family.
6597
+ *
6598
+ * Langfuse resolves the provided evaluator family to its latest version before saving the rule.
6599
+ * A rule's evaluator type cannot be changed: provide `name` and `scope` for an evaluator family of the rule's current type. To use a different evaluator type, create a new rule.
6600
+ */
6601
+ evaluator?: EvaluationRuleEvaluatorReference;
6602
+ /** Updated target object type. */
6603
+ target?: EvaluationRuleTarget;
6604
+ /** Updated desired enabled state. */
6605
+ enabled?: boolean;
6606
+ /** Updated sampling fraction. */
6607
+ sampling?: number;
6608
+ /**
6609
+ * Updated filter list.
6610
+ *
6611
+ * For `target=experiment`, `column=datasetId` expects dataset `id` values from `GET /api/public/v2/datasets`, not dataset names.
6612
+ */
6613
+ filter?: EvaluationRuleFilter[];
6614
+ /**
6615
+ * Updated LLM-as-judge variable mappings.
6616
+ *
6617
+ * Do not send this field for code evaluator rules. Langfuse stores the fixed code runtime mapping automatically and returns it in the response.
6618
+ */
6619
+ mapping?: EvaluationRuleMapping[];
6620
+ }
6621
+
6622
+ /**
6623
+ * This file was auto-generated by Fern from our API Definition.
6624
+ */
6625
+ /**
6626
+ * Confirmation response returned after successful deletion.
6627
+ */
6628
+ interface DeleteEvaluationRuleResponse {
6629
+ /** Always `Evaluation rule successfully deleted`. */
6630
+ message: string;
6631
+ }
6632
+
6633
+ /**
6634
+ * This file was auto-generated by Fern from our API Definition.
6635
+ */
6636
+
6637
+ /**
6638
+ * Evaluator family reference used when updating an evaluation rule.
6639
+ *
6640
+ * `name` and `scope` identify the evaluator family in the authenticated project context.
6641
+ * A rule's evaluator type cannot be changed, so this reference does not accept a `type`; the family must match the rule's current evaluator type.
6642
+ */
6643
+ interface EvaluationRuleEvaluatorReference {
6644
+ /** Evaluator family name. */
6645
+ name: string;
6646
+ /** Whether the evaluator family is project-owned or Langfuse-managed. */
6647
+ scope: EvaluatorScope;
6648
+ }
6649
+
6650
+ /**
6651
+ * This file was auto-generated by Fern from our API Definition.
6652
+ */
6653
+
6654
+ /**
6655
+ * LLM-as-judge evaluator family reference used when creating an evaluation rule.
6656
+ */
6657
+ interface LlmAsJudgeEvaluationRuleEvaluatorReference {
6658
+ /** Evaluator family name. */
6659
+ name: string;
6660
+ /** Whether the evaluator family is project-owned or Langfuse-managed. */
6661
+ scope: EvaluatorScope;
6662
+ /** Evaluator engine type. Defaults to `llm_as_judge` when omitted. */
6663
+ type?: LlmAsJudgeEvaluatorType;
6664
+ }
6665
+
6666
+ /**
6667
+ * This file was auto-generated by Fern from our API Definition.
6668
+ */
6669
+
6670
+ /**
6671
+ * Code evaluator family reference used when creating an evaluation rule.
6672
+ */
6673
+ interface CodeEvaluationRuleEvaluatorReference {
6674
+ /** Evaluator family name. */
6675
+ name: string;
6676
+ /** Whether the evaluator family is project-owned or Langfuse-managed. */
6677
+ scope: EvaluatorScope;
6678
+ /** Must be `code`. */
6679
+ type: "code";
6680
+ }
6681
+
6682
+ /**
6683
+ * This file was auto-generated by Fern from our API Definition.
6684
+ */
6685
+ type LlmAsJudgeEvaluatorType = "llm_as_judge";
6686
+ declare const LlmAsJudgeEvaluatorType: {
6687
+ readonly LlmAsJudge: "llm_as_judge";
6688
+ };
6689
+
6690
+ /**
6691
+ * This file was auto-generated by Fern from our API Definition.
6692
+ */
6693
+
6694
+ /**
6695
+ * Resolved evaluator currently used by the evaluation rule.
6696
+ *
6697
+ * `id` is the exact active evaluator version.
6698
+ * `name`, `scope`, and `type` identify the evaluator family conceptually.
6699
+ */
6700
+ interface EvaluationRuleEvaluator {
6701
+ /** Identifier of the exact evaluator version currently used by the rule. */
6702
+ id: string;
6703
+ /** Evaluator family name. */
6704
+ name: string;
6705
+ /** Whether the evaluator family is project-owned or Langfuse-managed. */
6706
+ scope: EvaluatorScope;
6707
+ /** Evaluator engine type. */
6708
+ type: EvaluatorType;
6709
+ }
6710
+
6711
+ /**
6712
+ * This file was auto-generated by Fern from our API Definition.
6713
+ */
6714
+ /**
6715
+ * @example
6716
+ * {}
6717
+ */
6718
+ interface ListEvaluationRulesRequest {
6719
+ /** 1-based page number. Defaults to `1`. */
6720
+ page?: number;
6721
+ /** Maximum number of items per page. Defaults to `50`. */
6722
+ limit?: number;
6723
+ }
6724
+
6725
+ type index$5_CodeEvaluationRuleEvaluatorReference = CodeEvaluationRuleEvaluatorReference;
6726
+ type index$5_CreateCodeEvaluationRuleRequest = CreateCodeEvaluationRuleRequest;
6727
+ type index$5_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
6728
+ type index$5_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
6729
+ type index$5_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
6730
+ type index$5_EvaluationRule = EvaluationRule;
6731
+ type index$5_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
6732
+ type index$5_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
6733
+ type index$5_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
6734
+ type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
6735
+ declare const index$5_LlmAsJudgeEvaluatorType: typeof LlmAsJudgeEvaluatorType;
6736
+ type index$5_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
6737
+ declare namespace index$5 {
6738
+ export { type index$5_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$5_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$5_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, type index$5_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$5_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$5_EvaluationRule as EvaluationRule, type index$5_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$5_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, type EvaluationRules$1 as EvaluationRules, type index$5_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$5_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, index$5_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, type index$5_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest };
6739
+ }
6740
+
6741
+ /**
6742
+ * This file was auto-generated by Fern from our API Definition.
6743
+ */
6744
+
6745
+ /**
6746
+ * One evaluator that can be used for scoring.
6747
+ *
6748
+ * An evaluator describes **how** to score data.
6749
+ *
6750
+ * It does not define **which** live objects are evaluated. That is the job of `evaluation-rules`.
6751
+ *
6752
+ * For agent clients, the most important fields are:
6753
+ * - `type`: determines which evaluator fields are present
6754
+ * - `variables`: for LLM evaluators, use these exact names when building the evaluation-rule `mapping` array. LLM evaluators require every variable to be mapped. Code evaluators always expose the fixed runtime payload fields and Langfuse maps them automatically.
6755
+ *
6756
+ * Versioning behavior:
6757
+ * - `GET /evaluators` returns the latest version of each available evaluator.
6758
+ * - `GET /evaluators/{id}` can return an older version.
6759
+ * - Evaluation rules always run against the latest version for the selected evaluator name within the same source (`project` or `managed`).
6760
+ */
6761
+ type Evaluator = Evaluator.LlmAsJudge | Evaluator.Code;
6762
+ declare namespace Evaluator {
6763
+ interface LlmAsJudge extends LlmAsJudgeEvaluator {
6764
+ type: "llm_as_judge";
6765
+ }
6766
+ interface Code extends CodeEvaluator {
6767
+ type: "code";
6768
+ }
6769
+ }
6770
+
6771
+ /**
6772
+ * This file was auto-generated by Fern from our API Definition.
6773
+ */
6774
+
6775
+ interface EvaluatorBase {
6776
+ /** Identifier of this evaluator. */
6777
+ id: string;
6778
+ /** Evaluator name. */
6779
+ name: string;
6780
+ /** Version number of this evaluator. */
6781
+ version: number;
6782
+ /** Where this evaluator comes from: your project or Langfuse-managed defaults. */
6783
+ scope: EvaluatorScope;
6784
+ /**
6785
+ * Variables that can be mapped when creating an evaluation rule.
6786
+ *
6787
+ * LLM evaluators require every variable to be mapped exactly once. Code evaluators always expose the fixed runtime payload fields and Langfuse maps them automatically.
6788
+ */
6789
+ variables: string[];
6790
+ /** Number of evaluation rules in the project that currently use this evaluator version. */
6791
+ evaluationRuleCount: number;
6792
+ /** Timestamp when this evaluator was created. */
6793
+ createdAt: string;
6794
+ /** Timestamp when this evaluator was last updated. */
6795
+ updatedAt: string;
6796
+ }
6797
+
6798
+ /**
6799
+ * This file was auto-generated by Fern from our API Definition.
6800
+ */
6801
+
6802
+ interface LlmAsJudgeEvaluator extends EvaluatorBase {
6803
+ /** Prompt template used during evaluation. */
6804
+ prompt: string;
6805
+ /**
6806
+ * Structured output schema returned by this evaluator.
6807
+ *
6808
+ * Responses always include `dataType` and omit the internal output-definition `version`.
6809
+ * Use `dataType` to decide how future scores should be interpreted.
6810
+ */
6811
+ outputDefinition: PublicEvaluatorOutputDefinition;
6812
+ /** Explicit model configuration, or `null` when the project default evaluation model is used. */
6813
+ modelConfig: EvaluatorModelConfig | null;
6814
+ }
6815
+
6816
+ /**
6817
+ * This file was auto-generated by Fern from our API Definition.
6818
+ */
6819
+
6820
+ interface CodeEvaluator extends EvaluatorBase {
6821
+ /** Source code executed for each matched observation. */
6822
+ sourceCode: string;
6823
+ /** Runtime language for `sourceCode`. */
6824
+ sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage;
6825
+ }
6826
+
6827
+ /**
6828
+ * This file was auto-generated by Fern from our API Definition.
6829
+ */
6830
+
6831
+ interface Evaluators$1 {
6832
+ data: Evaluator[];
6833
+ meta: MetaResponse;
6834
+ }
6835
+
6836
+ /**
6837
+ * This file was auto-generated by Fern from our API Definition.
6838
+ */
6839
+
6840
+ /**
6841
+ * Request body for creating an evaluator.
6842
+ *
6843
+ * If the same `name` already exists in your project, Langfuse creates the next version and returns it.
6844
+ * Existing evaluation rules in the same project are then moved to that new latest version automatically.
6845
+ * If `type` is omitted, Langfuse defaults it to `llm_as_judge` for backwards compatibility.
6846
+ */
6847
+ type CreateEvaluatorRequest = CreateEvaluatorRequest.LlmAsJudge | CreateEvaluatorRequest.Code;
6848
+ declare namespace CreateEvaluatorRequest {
6849
+ interface LlmAsJudge extends CreateLlmAsJudgeEvaluatorRequest {
6850
+ type: "llm_as_judge";
6851
+ }
6852
+ interface Code extends CreateCodeEvaluatorRequest {
6853
+ type: "code";
6854
+ }
6855
+ }
6856
+
6857
+ /**
6858
+ * This file was auto-generated by Fern from our API Definition.
6859
+ */
6860
+
6861
+ interface CreateLlmAsJudgeEvaluatorRequest {
6862
+ /** Evaluator name within the authenticated project. */
6863
+ name: string;
6864
+ /** Prompt template used by the evaluator. */
6865
+ prompt: string;
6866
+ /**
6867
+ * Structured output schema the evaluator must return.
6868
+ *
6869
+ * Always send `dataType`.
6870
+ * Do not send `version`; it is an internal storage detail and not part of the public request contract.
6871
+ */
6872
+ outputDefinition: EvaluatorOutputDefinition;
6873
+ /** Optional explicit model configuration. Omit or set to `null` to use the project default evaluation model. */
6874
+ modelConfig?: EvaluatorModelConfig | null;
6875
+ }
6876
+
6877
+ /**
6878
+ * This file was auto-generated by Fern from our API Definition.
6879
+ */
6880
+
6881
+ interface CreateCodeEvaluatorRequest {
6882
+ /** Evaluator name within the authenticated project. */
6883
+ name: string;
6884
+ /** Code executed for each matched observation. */
6885
+ sourceCode: string;
6886
+ /** Runtime language for `sourceCode`. */
6887
+ sourceCodeLanguage: CodeEvaluatorSourceCodeLanguage;
6888
+ }
6889
+
6890
+ /**
6891
+ * This file was auto-generated by Fern from our API Definition.
6892
+ */
6893
+ /**
6894
+ * @example
6895
+ * {}
6896
+ */
6897
+ interface ListEvaluatorsRequest {
6898
+ /** 1-based page number. Defaults to `1`. */
6899
+ page?: number;
6900
+ /** Maximum number of items per page. Defaults to `50`. */
6901
+ limit?: number;
6902
+ }
6903
+
6904
+ type index$4_CodeEvaluator = CodeEvaluator;
6905
+ type index$4_CreateCodeEvaluatorRequest = CreateCodeEvaluatorRequest;
6906
+ declare const index$4_CreateEvaluatorRequest: typeof CreateEvaluatorRequest;
6907
+ type index$4_CreateLlmAsJudgeEvaluatorRequest = CreateLlmAsJudgeEvaluatorRequest;
6908
+ declare const index$4_Evaluator: typeof Evaluator;
6909
+ type index$4_EvaluatorBase = EvaluatorBase;
6910
+ type index$4_ListEvaluatorsRequest = ListEvaluatorsRequest;
6911
+ type index$4_LlmAsJudgeEvaluator = LlmAsJudgeEvaluator;
6912
+ declare namespace index$4 {
6913
+ export { type index$4_CodeEvaluator as CodeEvaluator, type index$4_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, index$4_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$4_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, index$4_Evaluator as Evaluator, type index$4_EvaluatorBase as EvaluatorBase, type Evaluators$1 as Evaluators, type index$4_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$4_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator };
6914
+ }
6915
+
6916
+ type index$3_AccessDeniedError = AccessDeniedError;
6917
+ declare const index$3_AccessDeniedError: typeof AccessDeniedError;
6918
+ type index$3_ArrayOptionsEvaluationRuleFilter = ArrayOptionsEvaluationRuleFilter;
6919
+ type index$3_BadRequestError = BadRequestError;
6920
+ declare const index$3_BadRequestError: typeof BadRequestError;
6921
+ type index$3_BooleanEvaluationRuleFilter = BooleanEvaluationRuleFilter;
6922
+ type index$3_CategoryOptionsEvaluationRuleFilter = CategoryOptionsEvaluationRuleFilter;
6923
+ type index$3_CodeEvaluationRuleEvaluatorReference = CodeEvaluationRuleEvaluatorReference;
6924
+ type index$3_CodeEvaluator = CodeEvaluator;
6925
+ declare const index$3_CodeEvaluatorSourceCodeLanguage: typeof CodeEvaluatorSourceCodeLanguage;
6926
+ type index$3_ConflictError = ConflictError;
6927
+ declare const index$3_ConflictError: typeof ConflictError;
6928
+ type index$3_CreateCodeEvaluationRuleRequest = CreateCodeEvaluationRuleRequest;
6929
+ type index$3_CreateCodeEvaluatorRequest = CreateCodeEvaluatorRequest;
6930
+ type index$3_CreateEvaluationRuleRequest = CreateEvaluationRuleRequest;
6931
+ declare const index$3_CreateEvaluatorRequest: typeof CreateEvaluatorRequest;
6932
+ type index$3_CreateLlmAsJudgeEvaluationRuleRequest = CreateLlmAsJudgeEvaluationRuleRequest;
6933
+ type index$3_CreateLlmAsJudgeEvaluatorRequest = CreateLlmAsJudgeEvaluatorRequest;
6934
+ type index$3_DateTimeEvaluationRuleFilter = DateTimeEvaluationRuleFilter;
6935
+ type index$3_DeleteEvaluationRuleResponse = DeleteEvaluationRuleResponse;
6936
+ type index$3_EvaluationRule = EvaluationRule;
6937
+ declare const index$3_EvaluationRuleArrayOptionsFilterOperator: typeof EvaluationRuleArrayOptionsFilterOperator;
6938
+ declare const index$3_EvaluationRuleBooleanFilterOperator: typeof EvaluationRuleBooleanFilterOperator;
6939
+ type index$3_EvaluationRuleEvaluator = EvaluationRuleEvaluator;
6940
+ type index$3_EvaluationRuleEvaluatorReference = EvaluationRuleEvaluatorReference;
6941
+ declare const index$3_EvaluationRuleFilter: typeof EvaluationRuleFilter;
6942
+ type index$3_EvaluationRuleMapping = EvaluationRuleMapping;
6943
+ declare const index$3_EvaluationRuleMappingSource: typeof EvaluationRuleMappingSource;
6944
+ declare const index$3_EvaluationRuleNullFilterOperator: typeof EvaluationRuleNullFilterOperator;
6945
+ declare const index$3_EvaluationRuleNumberFilterOperator: typeof EvaluationRuleNumberFilterOperator;
6946
+ declare const index$3_EvaluationRuleOptionsFilterOperator: typeof EvaluationRuleOptionsFilterOperator;
6947
+ declare const index$3_EvaluationRuleStatus: typeof EvaluationRuleStatus;
6948
+ declare const index$3_EvaluationRuleStringFilterOperator: typeof EvaluationRuleStringFilterOperator;
6949
+ declare const index$3_EvaluationRuleTarget: typeof EvaluationRuleTarget;
6950
+ declare const index$3_Evaluator: typeof Evaluator;
6951
+ type index$3_EvaluatorBase = EvaluatorBase;
6952
+ type index$3_EvaluatorModelConfig = EvaluatorModelConfig;
6953
+ declare const index$3_EvaluatorOutputDataType: typeof EvaluatorOutputDataType;
6954
+ declare const index$3_EvaluatorOutputDefinition: typeof EvaluatorOutputDefinition;
6955
+ type index$3_EvaluatorOutputFieldDefinition = EvaluatorOutputFieldDefinition;
6956
+ declare const index$3_EvaluatorScope: typeof EvaluatorScope;
6957
+ declare const index$3_EvaluatorType: typeof EvaluatorType;
6958
+ type index$3_InternalServerError = InternalServerError;
6959
+ declare const index$3_InternalServerError: typeof InternalServerError;
6960
+ type index$3_ListEvaluationRulesRequest = ListEvaluationRulesRequest;
6961
+ type index$3_ListEvaluatorsRequest = ListEvaluatorsRequest;
6962
+ type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference = LlmAsJudgeEvaluationRuleEvaluatorReference;
6963
+ type index$3_LlmAsJudgeEvaluator = LlmAsJudgeEvaluator;
6964
+ declare const index$3_LlmAsJudgeEvaluatorType: typeof LlmAsJudgeEvaluatorType;
6965
+ type index$3_MethodNotAllowedError = MethodNotAllowedError;
6966
+ declare const index$3_MethodNotAllowedError: typeof MethodNotAllowedError;
6967
+ type index$3_NotFoundError = NotFoundError;
6968
+ declare const index$3_NotFoundError: typeof NotFoundError;
6969
+ type index$3_NullEvaluationRuleFilter = NullEvaluationRuleFilter;
6970
+ type index$3_NumberEvaluationRuleFilter = NumberEvaluationRuleFilter;
6971
+ type index$3_NumberObjectEvaluationRuleFilter = NumberObjectEvaluationRuleFilter;
6972
+ type index$3_PublicApiError = PublicApiError;
6973
+ declare const index$3_PublicApiErrorCode: typeof PublicApiErrorCode;
6974
+ type index$3_PublicApiErrorDetails = PublicApiErrorDetails;
6975
+ type index$3_PublicApiValidationIssue = PublicApiValidationIssue;
6976
+ type index$3_PublicBooleanEvaluatorOutputDefinition = PublicBooleanEvaluatorOutputDefinition;
6977
+ type index$3_PublicCategoricalEvaluatorOutputDefinition = PublicCategoricalEvaluatorOutputDefinition;
6978
+ type index$3_PublicCategoricalEvaluatorOutputScoreDefinition = PublicCategoricalEvaluatorOutputScoreDefinition;
6979
+ declare const index$3_PublicEvaluatorOutputDefinition: typeof PublicEvaluatorOutputDefinition;
6980
+ type index$3_PublicNumericEvaluatorOutputDefinition = PublicNumericEvaluatorOutputDefinition;
6981
+ type index$3_StringEvaluationRuleFilter = StringEvaluationRuleFilter;
6982
+ type index$3_StringObjectEvaluationRuleFilter = StringObjectEvaluationRuleFilter;
6983
+ type index$3_StringOptionsEvaluationRuleFilter = StringOptionsEvaluationRuleFilter;
6984
+ type index$3_TooManyRequestsError = TooManyRequestsError;
6985
+ declare const index$3_TooManyRequestsError: typeof TooManyRequestsError;
6986
+ type index$3_UnauthorizedError = UnauthorizedError;
6987
+ declare const index$3_UnauthorizedError: typeof UnauthorizedError;
6988
+ type index$3_UnprocessableContentError = UnprocessableContentError;
6989
+ declare const index$3_UnprocessableContentError: typeof UnprocessableContentError;
6990
+ type index$3_UpdateEvaluationRuleRequest = UpdateEvaluationRuleRequest;
4962
6991
  declare namespace index$3 {
4963
- export type { index$3_DeleteTraceResponse as DeleteTraceResponse, index$3_DeleteTracesRequest as DeleteTracesRequest, index$3_GetTraceRequest as GetTraceRequest, index$3_GetTracesRequest as GetTracesRequest, index$3_Sort as Sort, index$3_Traces as Traces };
6992
+ export { index$3_AccessDeniedError as AccessDeniedError, type index$3_ArrayOptionsEvaluationRuleFilter as ArrayOptionsEvaluationRuleFilter, index$3_BadRequestError as BadRequestError, type index$3_BooleanEvaluationRuleFilter as BooleanEvaluationRuleFilter, type index$3_CategoryOptionsEvaluationRuleFilter as CategoryOptionsEvaluationRuleFilter, type index$3_CodeEvaluationRuleEvaluatorReference as CodeEvaluationRuleEvaluatorReference, type index$3_CodeEvaluator as CodeEvaluator, index$3_CodeEvaluatorSourceCodeLanguage as CodeEvaluatorSourceCodeLanguage, index$3_ConflictError as ConflictError, type index$3_CreateCodeEvaluationRuleRequest as CreateCodeEvaluationRuleRequest, type index$3_CreateCodeEvaluatorRequest as CreateCodeEvaluatorRequest, type index$3_CreateEvaluationRuleRequest as CreateEvaluationRuleRequest, index$3_CreateEvaluatorRequest as CreateEvaluatorRequest, type index$3_CreateLlmAsJudgeEvaluationRuleRequest as CreateLlmAsJudgeEvaluationRuleRequest, type index$3_CreateLlmAsJudgeEvaluatorRequest as CreateLlmAsJudgeEvaluatorRequest, type index$3_DateTimeEvaluationRuleFilter as DateTimeEvaluationRuleFilter, type index$3_DeleteEvaluationRuleResponse as DeleteEvaluationRuleResponse, type index$3_EvaluationRule as EvaluationRule, index$3_EvaluationRuleArrayOptionsFilterOperator as EvaluationRuleArrayOptionsFilterOperator, index$3_EvaluationRuleBooleanFilterOperator as EvaluationRuleBooleanFilterOperator, type index$3_EvaluationRuleEvaluator as EvaluationRuleEvaluator, type index$3_EvaluationRuleEvaluatorReference as EvaluationRuleEvaluatorReference, index$3_EvaluationRuleFilter as EvaluationRuleFilter, type index$3_EvaluationRuleMapping as EvaluationRuleMapping, index$3_EvaluationRuleMappingSource as EvaluationRuleMappingSource, index$3_EvaluationRuleNullFilterOperator as EvaluationRuleNullFilterOperator, index$3_EvaluationRuleNumberFilterOperator as EvaluationRuleNumberFilterOperator, index$3_EvaluationRuleOptionsFilterOperator as EvaluationRuleOptionsFilterOperator, index$3_EvaluationRuleStatus as EvaluationRuleStatus, index$3_EvaluationRuleStringFilterOperator as EvaluationRuleStringFilterOperator, index$3_EvaluationRuleTarget as EvaluationRuleTarget, type EvaluationRules$1 as EvaluationRules, index$3_Evaluator as Evaluator, type index$3_EvaluatorBase as EvaluatorBase, type index$3_EvaluatorModelConfig as EvaluatorModelConfig, index$3_EvaluatorOutputDataType as EvaluatorOutputDataType, index$3_EvaluatorOutputDefinition as EvaluatorOutputDefinition, type index$3_EvaluatorOutputFieldDefinition as EvaluatorOutputFieldDefinition, index$3_EvaluatorScope as EvaluatorScope, index$3_EvaluatorType as EvaluatorType, type Evaluators$1 as Evaluators, index$3_InternalServerError as InternalServerError, type index$3_ListEvaluationRulesRequest as ListEvaluationRulesRequest, type index$3_ListEvaluatorsRequest as ListEvaluatorsRequest, type index$3_LlmAsJudgeEvaluationRuleEvaluatorReference as LlmAsJudgeEvaluationRuleEvaluatorReference, type index$3_LlmAsJudgeEvaluator as LlmAsJudgeEvaluator, index$3_LlmAsJudgeEvaluatorType as LlmAsJudgeEvaluatorType, index$3_MethodNotAllowedError as MethodNotAllowedError, index$3_NotFoundError as NotFoundError, type index$3_NullEvaluationRuleFilter as NullEvaluationRuleFilter, type index$3_NumberEvaluationRuleFilter as NumberEvaluationRuleFilter, type index$3_NumberObjectEvaluationRuleFilter as NumberObjectEvaluationRuleFilter, type index$3_PublicApiError as PublicApiError, index$3_PublicApiErrorCode as PublicApiErrorCode, type index$3_PublicApiErrorDetails as PublicApiErrorDetails, type index$3_PublicApiValidationIssue as PublicApiValidationIssue, type index$3_PublicBooleanEvaluatorOutputDefinition as PublicBooleanEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputDefinition as PublicCategoricalEvaluatorOutputDefinition, type index$3_PublicCategoricalEvaluatorOutputScoreDefinition as PublicCategoricalEvaluatorOutputScoreDefinition, index$3_PublicEvaluatorOutputDefinition as PublicEvaluatorOutputDefinition, type index$3_PublicNumericEvaluatorOutputDefinition as PublicNumericEvaluatorOutputDefinition, type index$3_StringEvaluationRuleFilter as StringEvaluationRuleFilter, type index$3_StringObjectEvaluationRuleFilter as StringObjectEvaluationRuleFilter, type index$3_StringOptionsEvaluationRuleFilter as StringOptionsEvaluationRuleFilter, index$3_TooManyRequestsError as TooManyRequestsError, index$3_UnauthorizedError as UnauthorizedError, index$3_UnprocessableContentError as UnprocessableContentError, type index$3_UpdateEvaluationRuleRequest as UpdateEvaluationRuleRequest, index$7 as commons, index$6 as errors, index$5 as evaluationRules, index$4 as evaluators };
4964
6993
  }
4965
6994
 
4966
6995
  /**
@@ -5323,13 +7352,15 @@ declare class BlobStorageIntegrations {
5323
7352
  * accessKeyId: undefined,
5324
7353
  * secretAccessKey: undefined,
5325
7354
  * prefix: undefined,
5326
- * exportFrequency: "hourly",
7355
+ * exportFrequency: "every_20_minutes",
5327
7356
  * enabled: true,
5328
7357
  * forcePathStyle: true,
5329
7358
  * fileType: "JSON",
5330
7359
  * exportMode: "FULL_HISTORY",
5331
7360
  * exportStartDate: undefined,
5332
- * compressed: undefined
7361
+ * compressed: undefined,
7362
+ * exportSource: undefined,
7363
+ * exportFieldGroups: undefined
5333
7364
  * })
5334
7365
  */
5335
7366
  upsertBlobStorageIntegration(request: CreateBlobStorageIntegrationRequest, requestOptions?: BlobStorageIntegrations.RequestOptions): HttpResponsePromise<BlobStorageIntegrationResponse>;
@@ -6250,7 +8281,8 @@ declare class ScoreV1 {
6250
8281
  * environment: undefined,
6251
8282
  * queueId: undefined,
6252
8283
  * dataType: undefined,
6253
- * configId: undefined
8284
+ * configId: undefined,
8285
+ * source: undefined
6254
8286
  * })
6255
8287
  */
6256
8288
  create(request: CreateScoreRequest, requestOptions?: ScoreV1.RequestOptions): HttpResponsePromise<CreateScoreResponse>;
@@ -6392,6 +8424,23 @@ declare class LlmConnections {
6392
8424
  */
6393
8425
  upsert(request: UpsertLlmConnectionRequest, requestOptions?: LlmConnections.RequestOptions): HttpResponsePromise<LlmConnection>;
6394
8426
  private __upsert;
8427
+ /**
8428
+ * Delete an LLM connection by id. Evaluators that depend on the deleted connection are automatically paused.
8429
+ *
8430
+ * @param {string} id
8431
+ * @param {LlmConnections.RequestOptions} requestOptions - Request-specific configuration.
8432
+ *
8433
+ * @throws {@link LangfuseAPI.Error}
8434
+ * @throws {@link LangfuseAPI.UnauthorizedError}
8435
+ * @throws {@link LangfuseAPI.AccessDeniedError}
8436
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
8437
+ * @throws {@link LangfuseAPI.NotFoundError}
8438
+ *
8439
+ * @example
8440
+ * await client.llmConnections.delete("id")
8441
+ */
8442
+ delete(id: string, requestOptions?: LlmConnections.RequestOptions): HttpResponsePromise<DeleteLlmConnectionResponse>;
8443
+ private __delete;
6395
8444
  protected _getAuthorizationHeader(): Promise<string | undefined>;
6396
8445
  }
6397
8446
 
@@ -6850,9 +8899,10 @@ declare class Observations {
6850
8899
  * - `io` - input, output
6851
8900
  * - `metadata` - metadata (truncated to 200 chars by default, use `expandMetadata` to get full values)
6852
8901
  * - `model` - providedModelName, internalModelId, modelParameters
6853
- * - `usage` - usageDetails, costDetails, totalCost
8902
+ * - `usage` - usageDetails, costDetails, totalCost, usagePricingTierName
6854
8903
  * - `prompt` - promptId, promptName, promptVersion
6855
8904
  * - `metrics` - latency, timeToFirstToken
8905
+ * - `trace_context` - tags, release, traceName
6856
8906
  *
6857
8907
  * If not specified, `core` and `basic` field groups are returned.
6858
8908
  *
@@ -7811,28 +9861,107 @@ declare class ScoreConfigs {
7811
9861
  get(request?: GetScoreConfigsRequest, requestOptions?: ScoreConfigs.RequestOptions): HttpResponsePromise<ScoreConfigs$1>;
7812
9862
  private __get;
7813
9863
  /**
7814
- * Get a score config
9864
+ * Get a score config
9865
+ *
9866
+ * @param {string} configId - The unique langfuse identifier of a score config
9867
+ * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
9868
+ *
9869
+ * @throws {@link LangfuseAPI.Error}
9870
+ * @throws {@link LangfuseAPI.UnauthorizedError}
9871
+ * @throws {@link LangfuseAPI.AccessDeniedError}
9872
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
9873
+ * @throws {@link LangfuseAPI.NotFoundError}
9874
+ *
9875
+ * @example
9876
+ * await client.scoreConfigs.getById("configId")
9877
+ */
9878
+ getById(configId: string, requestOptions?: ScoreConfigs.RequestOptions): HttpResponsePromise<ScoreConfig>;
9879
+ private __getById;
9880
+ /**
9881
+ * Update a score config
9882
+ *
9883
+ * @param {string} configId - The unique langfuse identifier of a score config
9884
+ * @param {LangfuseAPI.UpdateScoreConfigRequest} request
9885
+ * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
9886
+ *
9887
+ * @throws {@link LangfuseAPI.Error}
9888
+ * @throws {@link LangfuseAPI.UnauthorizedError}
9889
+ * @throws {@link LangfuseAPI.AccessDeniedError}
9890
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
9891
+ * @throws {@link LangfuseAPI.NotFoundError}
9892
+ *
9893
+ * @example
9894
+ * await client.scoreConfigs.update("configId", {
9895
+ * isArchived: undefined,
9896
+ * name: undefined,
9897
+ * categories: undefined,
9898
+ * minValue: undefined,
9899
+ * maxValue: undefined,
9900
+ * description: undefined
9901
+ * })
9902
+ */
9903
+ update(configId: string, request: UpdateScoreConfigRequest, requestOptions?: ScoreConfigs.RequestOptions): HttpResponsePromise<ScoreConfig>;
9904
+ private __update;
9905
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
9906
+ }
9907
+
9908
+ /**
9909
+ * This file was auto-generated by Fern from our API Definition.
9910
+ */
9911
+
9912
+ declare namespace ScoresV3 {
9913
+ interface Options {
9914
+ environment: Supplier<string>;
9915
+ /** Specify a custom URL to connect the client to. */
9916
+ baseUrl?: Supplier<string>;
9917
+ username?: Supplier<string | undefined>;
9918
+ password?: Supplier<string | undefined>;
9919
+ /** Override the X-Langfuse-Sdk-Name header */
9920
+ xLangfuseSdkName?: Supplier<string | undefined>;
9921
+ /** Override the X-Langfuse-Sdk-Version header */
9922
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
9923
+ /** Override the X-Langfuse-Public-Key header */
9924
+ xLangfusePublicKey?: Supplier<string | undefined>;
9925
+ /** Additional headers to include in requests. */
9926
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
9927
+ }
9928
+ interface RequestOptions {
9929
+ /** The maximum time to wait for a response in seconds. */
9930
+ timeoutInSeconds?: number;
9931
+ /** The number of times to retry the request. Defaults to 2. */
9932
+ maxRetries?: number;
9933
+ /** A hook to abort the request. */
9934
+ abortSignal?: AbortSignal;
9935
+ /** Override the X-Langfuse-Sdk-Name header */
9936
+ xLangfuseSdkName?: string | undefined;
9937
+ /** Override the X-Langfuse-Sdk-Version header */
9938
+ xLangfuseSdkVersion?: string | undefined;
9939
+ /** Override the X-Langfuse-Public-Key header */
9940
+ xLangfusePublicKey?: string | undefined;
9941
+ /** Additional query string parameters to include in the request. */
9942
+ queryParams?: Record<string, unknown>;
9943
+ /** Additional headers to include in the request. */
9944
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
9945
+ }
9946
+ }
9947
+ declare class ScoresV3 {
9948
+ protected readonly _options: ScoresV3.Options;
9949
+ constructor(_options: ScoresV3.Options);
9950
+ /**
9951
+ * Get a list of scores with a polymorphic `value` field (v3).
7815
9952
  *
7816
- * @param {string} configId - The unique langfuse identifier of a score config
7817
- * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
9953
+ * This endpoint requires Langfuse v4 or later.
7818
9954
  *
7819
- * @throws {@link LangfuseAPI.Error}
7820
- * @throws {@link LangfuseAPI.UnauthorizedError}
7821
- * @throws {@link LangfuseAPI.AccessDeniedError}
7822
- * @throws {@link LangfuseAPI.MethodNotAllowedError}
7823
- * @throws {@link LangfuseAPI.NotFoundError}
9955
+ * The `value` field type depends on `dataType`:
9956
+ * - `NUMERIC` → number
9957
+ * - `BOOLEAN` → boolean
9958
+ * - `CATEGORICAL`, `TEXT`, `CORRECTION` → string
7824
9959
  *
7825
- * @example
7826
- * await client.scoreConfigs.getById("configId")
7827
- */
7828
- getById(configId: string, requestOptions?: ScoreConfigs.RequestOptions): HttpResponsePromise<ScoreConfig>;
7829
- private __getById;
7830
- /**
7831
- * Update a score config
9960
+ * Use the `fields` parameter to include optional field groups beyond the
9961
+ * default `core`. Unknown group names return HTTP 400.
7832
9962
  *
7833
- * @param {string} configId - The unique langfuse identifier of a score config
7834
- * @param {LangfuseAPI.UpdateScoreConfigRequest} request
7835
- * @param {ScoreConfigs.RequestOptions} requestOptions - Request-specific configuration.
9963
+ * @param {LangfuseAPI.GetScoresV3Request} request
9964
+ * @param {ScoresV3.RequestOptions} requestOptions - Request-specific configuration.
7836
9965
  *
7837
9966
  * @throws {@link LangfuseAPI.Error}
7838
9967
  * @throws {@link LangfuseAPI.UnauthorizedError}
@@ -7841,17 +9970,10 @@ declare class ScoreConfigs {
7841
9970
  * @throws {@link LangfuseAPI.NotFoundError}
7842
9971
  *
7843
9972
  * @example
7844
- * await client.scoreConfigs.update("configId", {
7845
- * isArchived: undefined,
7846
- * name: undefined,
7847
- * categories: undefined,
7848
- * minValue: undefined,
7849
- * maxValue: undefined,
7850
- * description: undefined
7851
- * })
9973
+ * await client.scoresV3.getManyV3()
7852
9974
  */
7853
- update(configId: string, request: UpdateScoreConfigRequest, requestOptions?: ScoreConfigs.RequestOptions): HttpResponsePromise<ScoreConfig>;
7854
- private __update;
9975
+ getManyV3(request?: GetScoresV3Request, requestOptions?: ScoresV3.RequestOptions): HttpResponsePromise<GetScoresV3Response>;
9976
+ private __getManyV3;
7855
9977
  protected _getAuthorizationHeader(): Promise<string | undefined>;
7856
9978
  }
7857
9979
 
@@ -8129,6 +10251,527 @@ declare class Trace {
8129
10251
  protected _getAuthorizationHeader(): Promise<string | undefined>;
8130
10252
  }
8131
10253
 
10254
+ /**
10255
+ * This file was auto-generated by Fern from our API Definition.
10256
+ */
10257
+
10258
+ declare namespace EvaluationRules {
10259
+ interface Options {
10260
+ environment: Supplier<string>;
10261
+ /** Specify a custom URL to connect the client to. */
10262
+ baseUrl?: Supplier<string>;
10263
+ username?: Supplier<string | undefined>;
10264
+ password?: Supplier<string | undefined>;
10265
+ /** Override the X-Langfuse-Sdk-Name header */
10266
+ xLangfuseSdkName?: Supplier<string | undefined>;
10267
+ /** Override the X-Langfuse-Sdk-Version header */
10268
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
10269
+ /** Override the X-Langfuse-Public-Key header */
10270
+ xLangfusePublicKey?: Supplier<string | undefined>;
10271
+ /** Additional headers to include in requests. */
10272
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10273
+ }
10274
+ interface RequestOptions {
10275
+ /** The maximum time to wait for a response in seconds. */
10276
+ timeoutInSeconds?: number;
10277
+ /** The number of times to retry the request. Defaults to 2. */
10278
+ maxRetries?: number;
10279
+ /** A hook to abort the request. */
10280
+ abortSignal?: AbortSignal;
10281
+ /** Override the X-Langfuse-Sdk-Name header */
10282
+ xLangfuseSdkName?: string | undefined;
10283
+ /** Override the X-Langfuse-Sdk-Version header */
10284
+ xLangfuseSdkVersion?: string | undefined;
10285
+ /** Override the X-Langfuse-Public-Key header */
10286
+ xLangfusePublicKey?: string | undefined;
10287
+ /** Additional query string parameters to include in the request. */
10288
+ queryParams?: Record<string, unknown>;
10289
+ /** Additional headers to include in the request. */
10290
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10291
+ }
10292
+ }
10293
+ declare class EvaluationRules {
10294
+ protected readonly _options: EvaluationRules.Options;
10295
+ constructor(_options: EvaluationRules.Options);
10296
+ /**
10297
+ * Create an evaluation rule.
10298
+ *
10299
+ * An evaluation rule defines **what** incoming data should be evaluated and **how prompt variables should be populated** from that data.
10300
+ *
10301
+ * Use this resource after choosing an evaluator from the evaluator endpoints.
10302
+ *
10303
+ * Key rules:
10304
+ * - `name` must be unique within the project for public evaluation rules
10305
+ * - `target` must be `observation` or `experiment`
10306
+ * - `evaluator.name` + `evaluator.scope` must identify an existing evaluator family returned by the evaluator endpoints
10307
+ * - Langfuse resolves that family to its latest version before saving the evaluation rule
10308
+ * - for `target=experiment`, use dataset `id` values from `GET /api/public/v2/datasets` when filtering by `datasetId`
10309
+ * - for `llm_as_judge` evaluators, every evaluator prompt variable must be mapped exactly once
10310
+ * - for `code` evaluators, Langfuse uses the fixed code runtime mapping; omit `mapping` in create and update requests
10311
+ * - for user-provided `llm_as_judge` mappings, `expected_output` and `experiment_item_metadata` are only valid for `target=experiment`
10312
+ * - if `enabled=true`, Langfuse validates that the referenced evaluator can currently run
10313
+ * - at most 50 evaluation rules can be effectively active in one project at the same time
10314
+ *
10315
+ * If an evaluation rule with the same `name` already exists in the project, the API returns `409`.
10316
+ * In that case, update the existing resource with `PATCH /api/public/unstable/evaluation-rules/{evaluationRuleId}` instead of creating a second one.
10317
+ *
10318
+ * If enabling this resource would exceed the 50-active limit, the API also returns `409`.
10319
+ * In that case, disable or pause another active evaluation rule before enabling a new one.
10320
+ *
10321
+ * Current scope:
10322
+ * - evaluation rules are live-ingestion rules only
10323
+ * - they do not trigger historical backfills
10324
+ *
10325
+ * Recovery guidance:
10326
+ * - `400 invalid_filter_value`: fix the filter `column` or `value` using `details.column`, `details.invalidValues`, and `details.allowedValues`
10327
+ * - `400 invalid_filter_value` with `details.column=datasetId`: call `GET /api/public/v2/datasets`, then retry with dataset `id` values from that response
10328
+ * - `400 missing_variable_mapping`: for `llm_as_judge` evaluators, fetch the evaluator again and make sure every variable in `variables` appears exactly once in `mapping`
10329
+ * - `400 duplicate_variable_mapping`: remove repeated mappings for the same variable
10330
+ * - `400 invalid_variable_mapping`: for `llm_as_judge`, switch to a valid `source` for the selected `target`, or fix the variable name
10331
+ * - `400 invalid_json_path`: remove or correct the `jsonPath`
10332
+ * - `422 evaluator_preflight_failed`: the selected evaluator cannot run with the resolved model configuration. Fix the evaluator/default model setup, then retry the create request.
10333
+ *
10334
+ * @param {LangfuseAPI.unstable.CreateEvaluationRuleRequest} request
10335
+ * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
10336
+ *
10337
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10338
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10339
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10340
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
10341
+ * @throws {@link LangfuseAPI.unstable.ConflictError}
10342
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10343
+ * @throws {@link LangfuseAPI.unstable.UnprocessableContentError}
10344
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10345
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10346
+ * @throws {@link LangfuseAPI.Error}
10347
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10348
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10349
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10350
+ * @throws {@link LangfuseAPI.NotFoundError}
10351
+ *
10352
+ * @example
10353
+ * await client.unstable.evaluationRules.create({
10354
+ * name: "answer-correctness-live",
10355
+ * evaluator: {
10356
+ * name: "answer-correctness",
10357
+ * scope: "project",
10358
+ * type: "llm_as_judge"
10359
+ * },
10360
+ * target: "observation",
10361
+ * enabled: true,
10362
+ * sampling: 1,
10363
+ * filter: [{
10364
+ * type: "stringOptions",
10365
+ * column: "type",
10366
+ * operator: "any of",
10367
+ * value: ["GENERATION"]
10368
+ * }],
10369
+ * mapping: [{
10370
+ * variable: "input",
10371
+ * source: "input"
10372
+ * }, {
10373
+ * variable: "output",
10374
+ * source: "output"
10375
+ * }]
10376
+ * })
10377
+ *
10378
+ * @example
10379
+ * await client.unstable.evaluationRules.create({
10380
+ * name: "toxicity-code-live",
10381
+ * evaluator: {
10382
+ * name: "toxicity-detector",
10383
+ * scope: "project",
10384
+ * type: "code"
10385
+ * },
10386
+ * target: "observation",
10387
+ * enabled: true,
10388
+ * sampling: 1,
10389
+ * filter: [{
10390
+ * type: "stringOptions",
10391
+ * column: "type",
10392
+ * operator: "any of",
10393
+ * value: ["GENERATION"]
10394
+ * }]
10395
+ * })
10396
+ *
10397
+ * @example
10398
+ * await client.unstable.evaluationRules.create({
10399
+ * name: "experiment-expected-output-match",
10400
+ * evaluator: {
10401
+ * name: "expected-output-match",
10402
+ * scope: "project",
10403
+ * type: "llm_as_judge"
10404
+ * },
10405
+ * target: "experiment",
10406
+ * enabled: true,
10407
+ * sampling: 0.5,
10408
+ * filter: [{
10409
+ * type: "stringOptions",
10410
+ * column: "datasetId",
10411
+ * operator: "any of",
10412
+ * value: ["550e8400-e29b-41d4-a716-446655440000"]
10413
+ * }],
10414
+ * mapping: [{
10415
+ * variable: "output",
10416
+ * source: "output"
10417
+ * }, {
10418
+ * variable: "expected_output",
10419
+ * source: "expected_output"
10420
+ * }]
10421
+ * })
10422
+ */
10423
+ create(request: CreateEvaluationRuleRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRule>;
10424
+ private __create;
10425
+ /**
10426
+ * List evaluation rules in the authenticated project.
10427
+ *
10428
+ * Each item describes one live evaluation rule and its effective runtime status.
10429
+ *
10430
+ * @param {LangfuseAPI.unstable.ListEvaluationRulesRequest} request
10431
+ * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
10432
+ *
10433
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10434
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10435
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10436
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10437
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10438
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10439
+ * @throws {@link LangfuseAPI.Error}
10440
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10441
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10442
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10443
+ * @throws {@link LangfuseAPI.NotFoundError}
10444
+ *
10445
+ * @example
10446
+ * await client.unstable.evaluationRules.list()
10447
+ */
10448
+ list(request?: ListEvaluationRulesRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRules$1>;
10449
+ private __list;
10450
+ /**
10451
+ * Get one evaluation rule by its identifier.
10452
+ *
10453
+ * Use this endpoint to inspect the current evaluator, target, mapping, filters, and effective runtime status.
10454
+ *
10455
+ * @param {string} evaluationRuleId - Evaluation rule identifier returned by the evaluation rule endpoints.
10456
+ * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
10457
+ *
10458
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10459
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10460
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10461
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
10462
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10463
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10464
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10465
+ * @throws {@link LangfuseAPI.Error}
10466
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10467
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10468
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10469
+ * @throws {@link LangfuseAPI.NotFoundError}
10470
+ *
10471
+ * @example
10472
+ * await client.unstable.evaluationRules.get("evaluationRuleId")
10473
+ */
10474
+ get(evaluationRuleId: string, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRule>;
10475
+ private __get;
10476
+ /**
10477
+ * Update an evaluation rule.
10478
+ *
10479
+ * Typical uses:
10480
+ * - enable or disable live execution
10481
+ * - switch to another evaluator
10482
+ * - adjust sampling
10483
+ * - change filters
10484
+ * - update LLM-as-judge variable mappings
10485
+ *
10486
+ * Important behavior:
10487
+ * - provide only the fields you want to change
10488
+ * - if you provide `evaluator`, Langfuse resolves that evaluator family to its latest version before saving
10489
+ * - changing `target`, `filter`, or an LLM-as-judge `mapping` must still produce a valid target-specific configuration
10490
+ * - if you change `target` for an LLM-as-judge rule, also send a compatible `filter` and `mapping` in the same request unless the existing ones are still valid for the new target
10491
+ * - for `code` evaluator rules, omit `mapping`; Langfuse stores the fixed code runtime mapping automatically
10492
+ * - if the resulting config is enabled, Langfuse re-validates that the selected evaluator can run
10493
+ * - if the update would move a non-active evaluation rule into the active state and the project already has 50 active evaluation rules, the API returns `409`
10494
+ *
10495
+ * Recovery guidance:
10496
+ * - if an LLM-as-judge update fails with `missing_variable_mapping` or `invalid_variable_mapping` after changing `evaluator` or `target`, resend the request with a complete new `mapping`
10497
+ * - if the update fails with `invalid_filter_value` after changing `target`, resend the request with a target-compatible `filter`
10498
+ *
10499
+ * @param {string} evaluationRuleId - Evaluation rule identifier.
10500
+ * @param {LangfuseAPI.unstable.UpdateEvaluationRuleRequest} request
10501
+ * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
10502
+ *
10503
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10504
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10505
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10506
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
10507
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10508
+ * @throws {@link LangfuseAPI.unstable.UnprocessableContentError}
10509
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10510
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10511
+ * @throws {@link LangfuseAPI.Error}
10512
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10513
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10514
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10515
+ * @throws {@link LangfuseAPI.NotFoundError}
10516
+ *
10517
+ * @example
10518
+ * await client.unstable.evaluationRules.update("evaluationRuleId", {
10519
+ * name: undefined,
10520
+ * evaluator: undefined,
10521
+ * target: undefined,
10522
+ * enabled: undefined,
10523
+ * sampling: undefined,
10524
+ * filter: undefined,
10525
+ * mapping: undefined
10526
+ * })
10527
+ */
10528
+ update(evaluationRuleId: string, request: UpdateEvaluationRuleRequest, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<EvaluationRule>;
10529
+ private __update;
10530
+ /**
10531
+ * Delete an evaluation rule.
10532
+ *
10533
+ * This removes the live-ingestion rule only. It does not delete the referenced evaluator.
10534
+ *
10535
+ * @param {string} evaluationRuleId - Evaluation rule identifier.
10536
+ * @param {EvaluationRules.RequestOptions} requestOptions - Request-specific configuration.
10537
+ *
10538
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10539
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10540
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10541
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
10542
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10543
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10544
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10545
+ * @throws {@link LangfuseAPI.Error}
10546
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10547
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10548
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10549
+ * @throws {@link LangfuseAPI.NotFoundError}
10550
+ *
10551
+ * @example
10552
+ * await client.unstable.evaluationRules.delete("evaluationRuleId")
10553
+ */
10554
+ delete(evaluationRuleId: string, requestOptions?: EvaluationRules.RequestOptions): HttpResponsePromise<DeleteEvaluationRuleResponse>;
10555
+ private __delete;
10556
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
10557
+ }
10558
+
10559
+ /**
10560
+ * This file was auto-generated by Fern from our API Definition.
10561
+ */
10562
+
10563
+ declare namespace Evaluators {
10564
+ interface Options {
10565
+ environment: Supplier<string>;
10566
+ /** Specify a custom URL to connect the client to. */
10567
+ baseUrl?: Supplier<string>;
10568
+ username?: Supplier<string | undefined>;
10569
+ password?: Supplier<string | undefined>;
10570
+ /** Override the X-Langfuse-Sdk-Name header */
10571
+ xLangfuseSdkName?: Supplier<string | undefined>;
10572
+ /** Override the X-Langfuse-Sdk-Version header */
10573
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
10574
+ /** Override the X-Langfuse-Public-Key header */
10575
+ xLangfusePublicKey?: Supplier<string | undefined>;
10576
+ /** Additional headers to include in requests. */
10577
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10578
+ }
10579
+ interface RequestOptions {
10580
+ /** The maximum time to wait for a response in seconds. */
10581
+ timeoutInSeconds?: number;
10582
+ /** The number of times to retry the request. Defaults to 2. */
10583
+ maxRetries?: number;
10584
+ /** A hook to abort the request. */
10585
+ abortSignal?: AbortSignal;
10586
+ /** Override the X-Langfuse-Sdk-Name header */
10587
+ xLangfuseSdkName?: string | undefined;
10588
+ /** Override the X-Langfuse-Sdk-Version header */
10589
+ xLangfuseSdkVersion?: string | undefined;
10590
+ /** Override the X-Langfuse-Public-Key header */
10591
+ xLangfusePublicKey?: string | undefined;
10592
+ /** Additional query string parameters to include in the request. */
10593
+ queryParams?: Record<string, unknown>;
10594
+ /** Additional headers to include in the request. */
10595
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10596
+ }
10597
+ }
10598
+ declare class Evaluators {
10599
+ protected readonly _options: Evaluators.Options;
10600
+ constructor(_options: Evaluators.Options);
10601
+ /**
10602
+ * Create an evaluator in the authenticated project.
10603
+ *
10604
+ * Use evaluators to define **how** Langfuse should score data.
10605
+ * LLM-as-a-judge evaluators define a prompt, expected structured output, and optional model configuration.
10606
+ * Code evaluators define source code and a runtime language.
10607
+ *
10608
+ * Naming behavior:
10609
+ * - If this is a new evaluator name in your project, Langfuse creates version `1`.
10610
+ * - If the name already exists in your project, Langfuse creates the next version and returns it.
10611
+ * - When a new project version is created, existing evaluation rules in that project automatically move to the newest version for that evaluator name.
10612
+ *
10613
+ * Recommended workflow:
10614
+ * 1. Create the evaluator.
10615
+ * 2. Read the returned `variables` array.
10616
+ * 3. Read the returned `outputDefinition.dataType` so the client knows whether future scores will be numeric, boolean, or categorical.
10617
+ * 4. Create one or more evaluation rules that reference the returned evaluator family using `name` and `scope`.
10618
+ *
10619
+ * Code evaluator validation:
10620
+ * - At creation, Langfuse only validates the request shape
10621
+ * - The `sourceCode` itself is not executed here. It is first run (preflight-tested against a sample observation) when you link the evaluator to an evaluation rule, so runtime errors in the code surface at evaluation-rule creation, not at evaluator creation.
10622
+ *
10623
+ * Recovery guidance:
10624
+ * - `422` with `code=evaluator_preflight_failed`: the evaluator cannot run with the resolved model configuration. Add a valid explicit `modelConfig`, or configure the project's default evaluation model, then retry the same request.
10625
+ * - `400` with `code=invalid_body`: the request shape is malformed. Use the structured `details.issues` array to fix the specific fields and retry.
10626
+ * - `400` with `code=invalid_body` on `outputDefinition`: for `type=llm_as_judge`, send `dataType`, `reasoning.description`, and `score.description`. Do not send `version`; it is not part of the public request shape.
10627
+ * - If `type` is omitted, Langfuse treats the request as `type=llm_as_judge` for backwards compatibility. New clients should send `type` explicitly.
10628
+ *
10629
+ * Unstable API note:
10630
+ * - This surface may evolve while the underlying evaluation data model is being redesigned.
10631
+ *
10632
+ * @param {LangfuseAPI.unstable.CreateEvaluatorRequest} request
10633
+ * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
10634
+ *
10635
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10636
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10637
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10638
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10639
+ * @throws {@link LangfuseAPI.unstable.ConflictError}
10640
+ * @throws {@link LangfuseAPI.unstable.UnprocessableContentError}
10641
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10642
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10643
+ * @throws {@link LangfuseAPI.Error}
10644
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10645
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10646
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10647
+ * @throws {@link LangfuseAPI.NotFoundError}
10648
+ *
10649
+ * @example
10650
+ * await client.unstable.evaluators.create({
10651
+ * type: "llm_as_judge",
10652
+ * name: "answer-correctness",
10653
+ * prompt: "You are grading an answer.\n\nInput:\n{{input}}\n\nOutput:\n{{output}}\n\nReturn a score between 0 and 1.\n",
10654
+ * outputDefinition: {
10655
+ * dataType: "NUMERIC",
10656
+ * dataType: "NUMERIC",
10657
+ * reasoning: {
10658
+ * description: "Explain why the score was assigned."
10659
+ * },
10660
+ * score: {
10661
+ * description: "Correctness score between 0 and 1."
10662
+ * }
10663
+ * },
10664
+ * modelConfig: {
10665
+ * provider: "openai",
10666
+ * model: "gpt-4.1-mini"
10667
+ * }
10668
+ * })
10669
+ *
10670
+ * @example
10671
+ * await client.unstable.evaluators.create({
10672
+ * type: "code",
10673
+ * name: "exact-match",
10674
+ * sourceCode: "function evaluate(ctx: EvaluationContext): EvaluationResult {\n const input = ctx.observation.input;\n const matchesOutput =\n input !== undefined && ctx.observation.output === input;\n\n return {\n scores: [\n {\n name: \"Exact match\",\n value: matchesOutput,\n dataType: \"BOOLEAN\",\n comment: matchesOutput\n ? \"Output exactly matches the input.\"\n : \"Output does not match the input.\",\n },\n ],\n };\n}\n",
10675
+ * sourceCodeLanguage: "TYPESCRIPT"
10676
+ * })
10677
+ *
10678
+ * @example
10679
+ * await client.unstable.evaluators.create({
10680
+ * type: "code",
10681
+ * name: "exact-match",
10682
+ * sourceCode: "def evaluate(ctx: EvaluationContext) -> EvaluationResult:\n \"\"\"Evaluates one observation and returns one or more Langfuse scores.\"\"\"\n input = ctx.observation.input\n matches_output = input is not None and ctx.observation.output == input\n\n return EvaluationResult(\n scores=[\n Score(\n name=\"Exact match\",\n value=matches_output,\n data_type=\"BOOLEAN\",\n comment=(\n \"Output exactly matches the input.\"\n if matches_output\n else \"Output does not match the input.\"\n ),\n )\n ]\n )\n",
10683
+ * sourceCodeLanguage: "PYTHON"
10684
+ * })
10685
+ */
10686
+ create(request: CreateEvaluatorRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluator>;
10687
+ private __create;
10688
+ /**
10689
+ * List the evaluators available to the authenticated project.
10690
+ *
10691
+ * Important behavior:
10692
+ * - This endpoint returns the latest version of each available evaluator.
10693
+ * - Results can include evaluators from your project and Langfuse-managed evaluators.
10694
+ * - If the same evaluator name exists in both places, both are returned as separate items with different `scope` values.
10695
+ *
10696
+ * @param {LangfuseAPI.unstable.ListEvaluatorsRequest} request
10697
+ * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
10698
+ *
10699
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10700
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10701
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10702
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10703
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10704
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10705
+ * @throws {@link LangfuseAPI.Error}
10706
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10707
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10708
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10709
+ * @throws {@link LangfuseAPI.NotFoundError}
10710
+ *
10711
+ * @example
10712
+ * await client.unstable.evaluators.list()
10713
+ */
10714
+ list(request?: ListEvaluatorsRequest, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluators$1>;
10715
+ private __list;
10716
+ /**
10717
+ * Get one evaluator by `id`.
10718
+ *
10719
+ * Use this endpoint when you want the prompt, output definition, model configuration, and derived variables for the evaluator you plan to use in an evaluation rule.
10720
+ *
10721
+ * @param {string} evaluatorId - Evaluator identifier returned by the evaluator endpoints.
10722
+ * @param {Evaluators.RequestOptions} requestOptions - Request-specific configuration.
10723
+ *
10724
+ * @throws {@link LangfuseAPI.unstable.BadRequestError}
10725
+ * @throws {@link LangfuseAPI.unstable.UnauthorizedError}
10726
+ * @throws {@link LangfuseAPI.unstable.AccessDeniedError}
10727
+ * @throws {@link LangfuseAPI.unstable.NotFoundError}
10728
+ * @throws {@link LangfuseAPI.unstable.MethodNotAllowedError}
10729
+ * @throws {@link LangfuseAPI.unstable.TooManyRequestsError}
10730
+ * @throws {@link LangfuseAPI.unstable.InternalServerError}
10731
+ * @throws {@link LangfuseAPI.Error}
10732
+ * @throws {@link LangfuseAPI.UnauthorizedError}
10733
+ * @throws {@link LangfuseAPI.AccessDeniedError}
10734
+ * @throws {@link LangfuseAPI.MethodNotAllowedError}
10735
+ * @throws {@link LangfuseAPI.NotFoundError}
10736
+ *
10737
+ * @example
10738
+ * await client.unstable.evaluators.get("evaluatorId")
10739
+ */
10740
+ get(evaluatorId: string, requestOptions?: Evaluators.RequestOptions): HttpResponsePromise<Evaluator>;
10741
+ private __get;
10742
+ protected _getAuthorizationHeader(): Promise<string | undefined>;
10743
+ }
10744
+
10745
+ /**
10746
+ * This file was auto-generated by Fern from our API Definition.
10747
+ */
10748
+
10749
+ declare namespace Unstable {
10750
+ interface Options {
10751
+ environment: Supplier<string>;
10752
+ /** Specify a custom URL to connect the client to. */
10753
+ baseUrl?: Supplier<string>;
10754
+ username?: Supplier<string | undefined>;
10755
+ password?: Supplier<string | undefined>;
10756
+ /** Override the X-Langfuse-Sdk-Name header */
10757
+ xLangfuseSdkName?: Supplier<string | undefined>;
10758
+ /** Override the X-Langfuse-Sdk-Version header */
10759
+ xLangfuseSdkVersion?: Supplier<string | undefined>;
10760
+ /** Override the X-Langfuse-Public-Key header */
10761
+ xLangfusePublicKey?: Supplier<string | undefined>;
10762
+ /** Additional headers to include in requests. */
10763
+ headers?: Record<string, string | Supplier<string | null | undefined> | null | undefined>;
10764
+ }
10765
+ }
10766
+ declare class Unstable {
10767
+ protected readonly _options: Unstable.Options;
10768
+ protected _evaluationRules: EvaluationRules | undefined;
10769
+ protected _evaluators: Evaluators | undefined;
10770
+ constructor(_options: Unstable.Options);
10771
+ get evaluationRules(): EvaluationRules;
10772
+ get evaluators(): Evaluators;
10773
+ }
10774
+
8132
10775
  /**
8133
10776
  * This file was auto-generated by Fern from our API Definition.
8134
10777
  */
@@ -8191,9 +10834,11 @@ declare class LangfuseAPIClient {
8191
10834
  protected _prompts: Prompts | undefined;
8192
10835
  protected _scim: Scim | undefined;
8193
10836
  protected _scoreConfigs: ScoreConfigs | undefined;
10837
+ protected _scoresV3: ScoresV3 | undefined;
8194
10838
  protected _scores: Scores | undefined;
8195
10839
  protected _sessions: Sessions | undefined;
8196
10840
  protected _trace: Trace | undefined;
10841
+ protected _unstable: Unstable | undefined;
8197
10842
  constructor(_options: LangfuseAPIClient.Options);
8198
10843
  get annotationQueues(): AnnotationQueues;
8199
10844
  get blobStorageIntegrations(): BlobStorageIntegrations;
@@ -8216,9 +10861,11 @@ declare class LangfuseAPIClient {
8216
10861
  get prompts(): Prompts;
8217
10862
  get scim(): Scim;
8218
10863
  get scoreConfigs(): ScoreConfigs;
10864
+ get scoresV3(): ScoresV3;
8219
10865
  get scores(): Scores;
8220
10866
  get sessions(): Sessions;
8221
10867
  get trace(): Trace;
10868
+ get unstable(): Unstable;
8222
10869
  }
8223
10870
 
8224
10871
  type LangfuseEnvVar = "LANGFUSE_PUBLIC_KEY" | "LANGFUSE_SECRET_KEY" | "LANGFUSE_BASE_URL" | "LANGFUSE_BASEURL" | "LANGFUSE_TIMEOUT" | "LANGFUSE_FLUSH_AT" | "LANGFUSE_FLUSH_INTERVAL" | "LANGFUSE_LOG_LEVEL" | "LANGFUSE_DEBUG" | "LANGFUSE_RELEASE" | "LANGFUSE_TRACING_ENVIRONMENT";
@@ -8611,4 +11258,4 @@ interface PropagateAttributesParams {
8611
11258
  declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
8612
11259
  declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
8613
11260
 
8614
- export { AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, BlobStorageExportFrequency, BlobStorageExportMode, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1$1 as ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type TextScore, type TextScoreV1, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$t as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$s as blobStorageIntegrations, bytesToBase64, index$r as comments, index$q as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$p as datasetItems, index$o as datasetRunItems, index$n as datasets, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$m as health, index$l as ingestion, index$h as legacy, index$g as llmConnections, LoggerSingleton as logger, index$f as media, index$e as metrics, index$d as models, index$c as observations, index$b as opentelemetry, index$a as organizations, index$9 as projects, index as promptVersion, index$8 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$7 as scim, index$6 as scoreConfigs, index$5 as scores, serializeValue, index$4 as sessions, setLangfuseTraceIdInBaggage, index$3 as trace, index$1 as utils };
11261
+ export { AccessDeniedError$1 as AccessDeniedError, type AnnotationQueue, type AnnotationQueueAssignmentRequest, type AnnotationQueueItem, AnnotationQueueObjectType, AnnotationQueueStatus, type ApiKeyDeletionResponse, type ApiKeyList, type ApiKeyResponse, type ApiKeySummary, type AuthenticationScheme, type BaseEvent, type BasePrompt, type BaseScore, type BaseScoreV1, type BaseScoreV3, BlobStorageExportFieldGroup, BlobStorageExportFrequency, BlobStorageExportMode, BlobStorageExportSource, type BlobStorageIntegrationDeletionResponse, BlobStorageIntegrationFileType, type BlobStorageIntegrationResponse, type BlobStorageIntegrationStatusResponse, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, BlobStorageSyncStatus, type BooleanScore, type BooleanScoreV1, type BooleanScoreV3, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type CategoricalScoreV3, type ChatMessage, ChatMessageType, type ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CorrectionScore, type CorrectionScoreV3, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, CreateChatPromptType, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, type CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, CreateTextPromptType, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteLlmConnectionResponse, type DeleteMembershipRequest, type DeletePromptRequest, type DeleteTraceResponse, type DeleteTracesRequest, type EmptyResponse, Error$1 as Error, type FilterConfig, type GetAnnotationQueueItemsRequest, type GetAnnotationQueuesRequest, type GetCommentsRequest, type GetCommentsResponse, type GetDatasetItemsRequest, type GetDatasetRunsRequest, type GetDatasetsRequest, type GetLlmConnectionsRequest, type GetMediaResponse, type GetMediaUploadUrlRequest, type GetMediaUploadUrlResponse, type GetMetricsV2Request, type GetModelsRequest, type GetObservationsV2Request, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataCorrection, type GetScoresResponseDataNumeric, type GetScoresResponseDataText, type GetScoresResponseTraceData, type GetScoresV3Meta, type GetScoresV3Request, type GetScoresV3Response, type GetSessionsRequest, type GetTraceRequest, type GetTracesRequest, type HealthResponse, type IngestionError, IngestionEvent, type IngestionRequest, type IngestionResponse, type IngestionSuccess, type IngestionUsage, LANGFUSE_SDK_EXPERIMENT_ENVIRONMENT, LANGFUSE_SDK_NAME, LANGFUSE_SDK_VERSION, LANGFUSE_TRACER_NAME, LANGFUSE_TRACE_ID_BAGGAGE_KEY, LangfuseAPIClient, LangfuseAPIError, LangfuseAPITimeoutError, LangfuseMedia, type LangfuseMediaParams, LangfuseOtelContextKeys, LangfuseOtelSpanAttributes, type ListDatasetRunItemsRequest, type ListPromptsMetaRequest, type ListUsersRequest, LlmAdapter, type LlmConnection, LogLevel, Logger, type LoggerConfig, type MapValue, MediaContentType, type MembershipDeletionResponse, type MembershipRequest, type MembershipResponse, MembershipRole, type MembershipsResponse, MethodNotAllowedError$1 as MethodNotAllowedError, type MetricsV2Response, type Model, type ModelPrice, ModelUsageUnit, NotFoundError$1 as NotFoundError, type NumericScore, type NumericScoreV1, type NumericScoreV3, type Observation, type ObservationBody, ObservationLevel, ObservationType, type ObservationV2, type ObservationsV2Meta, type ObservationsV2Response, type ObservationsView, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, type Organization, type OrganizationApiKey, type OrganizationApiKeysResponse, type OrganizationProject, type OrganizationProjectsResponse, type OtelAttribute, type OtelAttributeValue, type OtelResource, type OtelResourceSpan, type OtelScope, type OtelScopeSpan, type OtelSpan, type OtelTraceRequest, type OtelTraceResponse, type PaginatedAnnotationQueueItems, type PaginatedAnnotationQueues, type PaginatedDatasetItems, type PaginatedDatasetRunItems, type PaginatedDatasetRuns, type PaginatedDatasets, type PaginatedLlmConnections, type PaginatedModels, type PaginatedSessions, type ParsedMediaReference, type PatchMediaBody, type PlaceholderMessage, PlaceholderMessageType, type PricingTier, type PricingTierCondition, type PricingTierInput, PricingTierOperator, type Project, type ProjectDeletionResponse, type Projects$1 as Projects, Prompt, type PromptMeta, type PromptMetaListResponse, PromptType, type PropagateAttributesParams, type ResourceMeta, type ResourceType, type ResourceTypesResponse, type SchemaExtension, type SchemaResource, type SchemasResponse, type ScimEmail, type ScimFeatureSupport, type ScimName, type ScimUser, type ScimUsersListResponse, Score, type ScoreBody, type ScoreConfig, ScoreConfigDataType, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, type ScoreSubjectExperimentV3, type ScoreSubjectObservationV3, type ScoreSubjectSessionV3, type ScoreSubjectTraceV3, ScoreSubjectV3, ScoreV1$1 as ScoreV1, ScoreV3, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, type TextScore, type TextScoreV1, type TextScoreV3, type Trace$1 as Trace, type TraceBody, type TraceEvent, type TraceWithDetails, type TraceWithFullDetails, type Traces, UnauthorizedError$1 as UnauthorizedError, type UpdateAnnotationQueueItemRequest, type UpdateEventBody, type UpdateGenerationBody, type UpdateGenerationEvent, type UpdateObservationEvent, type UpdateProjectRequest, type UpdatePromptRequest, type UpdateScoreConfigRequest, type UpdateSpanBody, type UpdateSpanEvent, type UpsertLlmConnectionRequest, type Usage, type UsageDetails, type UserMeta, index$z as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$y as blobStorageIntegrations, bytesToBase64, index$x as comments, index$w as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$v as datasetItems, index$u as datasetRunItems, index$t as datasets, generateUUID, getEnv, getGlobalLogger, getLangfuseTraceIdFromBaggage, getPropagatedAttributesFromContext, index$s as health, index$r as ingestion, index$n as legacy, index$m as llmConnections, LoggerSingleton as logger, index$l as media, index$k as metrics, index$j as models, index$i as observations, index$h as opentelemetry, index$g as organizations, index$f as projects, index as promptVersion, index$e as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$d as scim, index$c as scoreConfigs, index$a as scores, index$b as scoresV3, serializeValue, index$9 as sessions, setLangfuseTraceIdInBaggage, index$8 as trace, index$3 as unstable, index$1 as utils };