@langfuse/core 4.4.2 → 4.4.4

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
@@ -846,8 +846,8 @@ interface BooleanScoreV1 extends BaseScoreV1 {
846
846
  */
847
847
 
848
848
  interface CategoricalScoreV1 extends BaseScoreV1 {
849
- /** Only defined if a config is linked. Represents the numeric category mapping of the stringValue */
850
- value?: number;
849
+ /** Represents the numeric category mapping of the stringValue. If no config is linked, defaults to 0. */
850
+ value: number;
851
851
  /** The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category */
852
852
  stringValue: string;
853
853
  }
@@ -929,8 +929,8 @@ interface BooleanScore extends BaseScore {
929
929
  */
930
930
 
931
931
  interface CategoricalScore extends BaseScore {
932
- /** Only defined if a config is linked. Represents the numeric category mapping of the stringValue */
933
- value?: number;
932
+ /** Represents the numeric category mapping of the stringValue. If no config is linked, defaults to 0. */
933
+ value: number;
934
934
  /** The string representation of the score value. If no config is linked, can be any string. Otherwise, must map to a config category */
935
935
  stringValue: string;
936
936
  }
@@ -1069,6 +1069,14 @@ interface DatasetRunWithItems extends DatasetRun {
1069
1069
 
1070
1070
  /**
1071
1071
  * Model definition used for transforming usage into USD cost and/or tokenization.
1072
+ *
1073
+ * Models can have either simple flat pricing or tiered pricing:
1074
+ * - Flat pricing: Single price per usage type (legacy, but still supported)
1075
+ * - Tiered pricing: Multiple pricing tiers with conditional matching based on usage patterns
1076
+ *
1077
+ * The pricing tiers approach is recommended for models with usage-based pricing variations.
1078
+ * When using tiered pricing, the flat price fields (inputPrice, outputPrice, prices) are populated
1079
+ * from the default tier for backward compatibility.
1072
1080
  */
1073
1081
  interface Model {
1074
1082
  id: string;
@@ -1091,8 +1099,27 @@ interface Model {
1091
1099
  /** Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details. */
1092
1100
  tokenizerConfig?: unknown;
1093
1101
  isLangfuseManaged: boolean;
1094
- /** Price (USD) by usage type */
1102
+ /** Timestamp when the model was created */
1103
+ createdAt: string;
1104
+ /**
1105
+ * Deprecated. Use 'pricingTiers' instead for models with usage-based pricing variations.
1106
+ *
1107
+ * This field shows prices by usage type from the default pricing tier. Maintained for backward compatibility.
1108
+ * If the model uses tiered pricing, this field will be populated from the default tier's prices.
1109
+ */
1095
1110
  prices: Record<string, ModelPrice>;
1111
+ /**
1112
+ * Array of pricing tiers with conditional pricing based on usage thresholds.
1113
+ *
1114
+ * Pricing tiers enable accurate cost tracking for models that charge different rates based on usage patterns
1115
+ * (e.g., different rates for high-volume usage, large context windows, or cached tokens).
1116
+ *
1117
+ * Each model must have exactly one default tier (isDefault=true, priority=0) that serves as a fallback.
1118
+ * Additional conditional tiers can be defined with specific matching criteria.
1119
+ *
1120
+ * If this array is empty, the model uses legacy flat pricing from the inputPrice/outputPrice/totalPrice fields.
1121
+ */
1122
+ pricingTiers: PricingTier[];
1096
1123
  }
1097
1124
 
1098
1125
  /**
@@ -1102,6 +1129,201 @@ interface ModelPrice {
1102
1129
  price: number;
1103
1130
  }
1104
1131
 
1132
+ /**
1133
+ * This file was auto-generated by Fern from our API Definition.
1134
+ */
1135
+
1136
+ /**
1137
+ * Condition for matching a pricing tier based on usage details. Used to implement tiered pricing models where costs vary based on usage thresholds.
1138
+ *
1139
+ * How it works:
1140
+ * 1. The regex pattern matches against usage detail keys (e.g., "input_tokens", "input_cached")
1141
+ * 2. Values of all matching keys are summed together
1142
+ * 3. The sum is compared against the threshold value using the specified operator
1143
+ * 4. All conditions in a tier must be met (AND logic) for the tier to match
1144
+ *
1145
+ * Common use cases:
1146
+ * - Threshold-based pricing: Match when accumulated usage exceeds a certain amount
1147
+ * - Usage-type-specific pricing: Different rates for cached vs non-cached tokens, or input vs output
1148
+ * - Volume-based pricing: Different rates based on total request or token count
1149
+ */
1150
+ interface PricingTierCondition {
1151
+ /**
1152
+ * Regex pattern to match against usage detail keys. All matching keys' values are summed for threshold comparison.
1153
+ *
1154
+ * Examples:
1155
+ * - "^input" matches "input", "input_tokens", "input_cached", etc.
1156
+ * - "^(input|prompt)" matches both "input_tokens" and "prompt_tokens"
1157
+ * - "_cache$" matches "input_cache", "output_cache", etc.
1158
+ *
1159
+ * The pattern is case-insensitive by default. If no keys match, the sum is treated as zero.
1160
+ */
1161
+ usageDetailPattern: string;
1162
+ /**
1163
+ * Comparison operator to apply between the summed value and the threshold.
1164
+ *
1165
+ * - gt: greater than (sum > threshold)
1166
+ * - gte: greater than or equal (sum >= threshold)
1167
+ * - lt: less than (sum < threshold)
1168
+ * - lte: less than or equal (sum <= threshold)
1169
+ * - eq: equal (sum == threshold)
1170
+ * - neq: not equal (sum != threshold)
1171
+ */
1172
+ operator: PricingTierOperator;
1173
+ /** Threshold value for comparison. For token-based pricing, this is typically the token count threshold (e.g., 200000 for a 200K token threshold). */
1174
+ value: number;
1175
+ /** Whether the regex pattern matching is case-sensitive. Default is false (case-insensitive matching). */
1176
+ caseSensitive: boolean;
1177
+ }
1178
+
1179
+ /**
1180
+ * This file was auto-generated by Fern from our API Definition.
1181
+ */
1182
+
1183
+ /**
1184
+ * Pricing tier definition with conditional pricing based on usage thresholds.
1185
+ *
1186
+ * Pricing tiers enable accurate cost tracking for LLM providers that charge different rates based on usage patterns.
1187
+ * For example, some providers charge higher rates when context size exceeds certain thresholds.
1188
+ *
1189
+ * How tier matching works:
1190
+ * 1. Tiers are evaluated in ascending priority order (priority 1 before priority 2, etc.)
1191
+ * 2. The first tier where ALL conditions match is selected
1192
+ * 3. If no conditional tiers match, the default tier is used as a fallback
1193
+ * 4. The default tier has priority 0 and no conditions
1194
+ *
1195
+ * Why priorities matter:
1196
+ * - Lower priority numbers are evaluated first, allowing you to define specific cases before general ones
1197
+ * - Example: Priority 1 for "high usage" (>200K tokens), Priority 2 for "medium usage" (>100K tokens), Priority 0 for default
1198
+ * - Without proper ordering, a less specific condition might match before a more specific one
1199
+ *
1200
+ * Every model must have exactly one default tier to ensure cost calculation always succeeds.
1201
+ */
1202
+ interface PricingTier {
1203
+ /** Unique identifier for the pricing tier */
1204
+ id: string;
1205
+ /**
1206
+ * Name of the pricing tier for display and identification purposes.
1207
+ *
1208
+ * Examples: "Standard", "High Volume Tier", "Large Context", "Extended Context Tier"
1209
+ */
1210
+ name: string;
1211
+ /**
1212
+ * Whether this is the default tier. Every model must have exactly one default tier with priority 0 and no conditions.
1213
+ *
1214
+ * The default tier serves as a fallback when no conditional tiers match, ensuring cost calculation always succeeds.
1215
+ * It typically represents the base pricing for standard usage patterns.
1216
+ */
1217
+ isDefault: boolean;
1218
+ /**
1219
+ * Priority for tier matching evaluation. Lower numbers = higher priority (evaluated first).
1220
+ *
1221
+ * The default tier must always have priority 0. Conditional tiers should have priority 1, 2, 3, etc.
1222
+ *
1223
+ * Example ordering:
1224
+ * - Priority 0: Default tier (no conditions, always matches as fallback)
1225
+ * - Priority 1: High usage tier (e.g., >200K tokens)
1226
+ * - Priority 2: Medium usage tier (e.g., >100K tokens)
1227
+ *
1228
+ * This ensures more specific conditions are checked before general ones.
1229
+ */
1230
+ priority: number;
1231
+ /**
1232
+ * Array of conditions that must ALL be met for this tier to match (AND logic).
1233
+ *
1234
+ * The default tier must have an empty conditions array. Conditional tiers should have one or more conditions
1235
+ * that define when this tier's pricing applies.
1236
+ *
1237
+ * Multiple conditions enable complex matching scenarios (e.g., "high input tokens AND low output tokens").
1238
+ */
1239
+ conditions: PricingTierCondition[];
1240
+ /**
1241
+ * Prices (USD) by usage type for this tier.
1242
+ *
1243
+ * Common usage types: "input", "output", "total", "request", "image"
1244
+ * Prices are specified in USD per unit (e.g., per token, per request, per second).
1245
+ *
1246
+ * Example: {"input": 0.000003, "output": 0.000015} means $3 per million input tokens and $15 per million output tokens.
1247
+ */
1248
+ prices: Record<string, number>;
1249
+ }
1250
+
1251
+ /**
1252
+ * This file was auto-generated by Fern from our API Definition.
1253
+ */
1254
+
1255
+ /**
1256
+ * Input schema for creating a pricing tier. The tier ID will be automatically generated server-side.
1257
+ *
1258
+ * When creating a model with pricing tiers:
1259
+ * - Exactly one tier must have isDefault=true (the fallback tier)
1260
+ * - The default tier must have priority=0 and conditions=[]
1261
+ * - All tier names and priorities must be unique within the model
1262
+ * - Each tier must define at least one price
1263
+ *
1264
+ * See PricingTier for detailed information about how tiers work and why they're useful.
1265
+ */
1266
+ interface PricingTierInput {
1267
+ /**
1268
+ * Name of the pricing tier for display and identification purposes.
1269
+ *
1270
+ * Must be unique within the model. Common patterns: "Standard", "High Volume Tier", "Extended Context"
1271
+ */
1272
+ name: string;
1273
+ /**
1274
+ * Whether this is the default tier. Exactly one tier per model must be marked as default.
1275
+ *
1276
+ * Requirements for default tier:
1277
+ * - Must have isDefault=true
1278
+ * - Must have priority=0
1279
+ * - Must have empty conditions array (conditions=[])
1280
+ *
1281
+ * The default tier acts as a fallback when no conditional tiers match.
1282
+ */
1283
+ isDefault: boolean;
1284
+ /**
1285
+ * Priority for tier matching evaluation. Lower numbers = higher priority (evaluated first).
1286
+ *
1287
+ * Must be unique within the model. The default tier must have priority=0.
1288
+ * Conditional tiers should use priority 1, 2, 3, etc. based on their specificity.
1289
+ */
1290
+ priority: number;
1291
+ /**
1292
+ * Array of conditions that must ALL be met for this tier to match (AND logic).
1293
+ *
1294
+ * The default tier must have an empty array (conditions=[]).
1295
+ * Conditional tiers should define one or more conditions that specify when this tier's pricing applies.
1296
+ *
1297
+ * Each condition specifies a regex pattern, operator, and threshold value for matching against usage details.
1298
+ */
1299
+ conditions: PricingTierCondition[];
1300
+ /**
1301
+ * Prices (USD) by usage type for this tier. At least one price must be defined.
1302
+ *
1303
+ * Common usage types: "input", "output", "total", "request", "image"
1304
+ * Prices are in USD per unit (e.g., per token).
1305
+ *
1306
+ * Example: {"input": 0.000003, "output": 0.000015} represents $3 per million input tokens and $15 per million output tokens.
1307
+ */
1308
+ prices: Record<string, number>;
1309
+ }
1310
+
1311
+ /**
1312
+ * This file was auto-generated by Fern from our API Definition.
1313
+ */
1314
+ /**
1315
+ * Comparison operators for pricing tier conditions
1316
+ */
1317
+ type PricingTierOperator = "gt" | "gte" | "lt" | "lte" | "eq" | "neq";
1318
+ declare const PricingTierOperator: {
1319
+ readonly Gt: "gt";
1320
+ readonly Gte: "gte";
1321
+ readonly Lt: "lt";
1322
+ readonly Lte: "lte";
1323
+ readonly Eq: "eq";
1324
+ readonly Neq: "neq";
1325
+ };
1326
+
1105
1327
  /**
1106
1328
  * This file was auto-generated by Fern from our API Definition.
1107
1329
  */
@@ -1345,6 +1567,10 @@ type index$n_NumericScoreV1 = NumericScoreV1;
1345
1567
  type index$n_Observation = Observation;
1346
1568
  declare const index$n_ObservationLevel: typeof ObservationLevel;
1347
1569
  type index$n_ObservationsView = ObservationsView;
1570
+ type index$n_PricingTier = PricingTier;
1571
+ type index$n_PricingTierCondition = PricingTierCondition;
1572
+ type index$n_PricingTierInput = PricingTierInput;
1573
+ declare const index$n_PricingTierOperator: typeof PricingTierOperator;
1348
1574
  type index$n_ScoreConfig = ScoreConfig;
1349
1575
  declare const index$n_ScoreDataType: typeof ScoreDataType;
1350
1576
  declare const index$n_ScoreSource: typeof ScoreSource;
@@ -1357,7 +1583,7 @@ type index$n_UnauthorizedError = UnauthorizedError;
1357
1583
  declare const index$n_UnauthorizedError: typeof UnauthorizedError;
1358
1584
  type index$n_Usage = Usage;
1359
1585
  declare namespace index$n {
1360
- export { index$n_AccessDeniedError as AccessDeniedError, type index$n_BaseScore as BaseScore, type index$n_BaseScoreV1 as BaseScoreV1, type index$n_BooleanScore as BooleanScore, type index$n_BooleanScoreV1 as BooleanScoreV1, type index$n_CategoricalScore as CategoricalScore, type index$n_CategoricalScoreV1 as CategoricalScoreV1, type index$n_Comment as Comment, index$n_CommentObjectType as CommentObjectType, type index$n_ConfigCategory as ConfigCategory, type index$n_CreateScoreValue as CreateScoreValue, type index$n_Dataset as Dataset, type index$n_DatasetItem as DatasetItem, type index$n_DatasetRun as DatasetRun, type index$n_DatasetRunItem as DatasetRunItem, type index$n_DatasetRunWithItems as DatasetRunWithItems, index$n_DatasetStatus as DatasetStatus, Error$1 as Error, type index$n_MapValue as MapValue, index$n_MethodNotAllowedError as MethodNotAllowedError, type index$n_Model as Model, type index$n_ModelPrice as ModelPrice, index$n_ModelUsageUnit as ModelUsageUnit, index$n_NotFoundError as NotFoundError, type index$n_NumericScore as NumericScore, type index$n_NumericScoreV1 as NumericScoreV1, type index$n_Observation as Observation, index$n_ObservationLevel as ObservationLevel, type index$n_ObservationsView as ObservationsView, Score$1 as Score, type index$n_ScoreConfig as ScoreConfig, index$n_ScoreDataType as ScoreDataType, index$n_ScoreSource as ScoreSource, index$n_ScoreV1 as ScoreV1, type index$n_Session as Session, type index$n_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$n_TraceWithDetails as TraceWithDetails, type index$n_TraceWithFullDetails as TraceWithFullDetails, index$n_UnauthorizedError as UnauthorizedError, type index$n_Usage as Usage };
1586
+ export { index$n_AccessDeniedError as AccessDeniedError, type index$n_BaseScore as BaseScore, type index$n_BaseScoreV1 as BaseScoreV1, type index$n_BooleanScore as BooleanScore, type index$n_BooleanScoreV1 as BooleanScoreV1, type index$n_CategoricalScore as CategoricalScore, type index$n_CategoricalScoreV1 as CategoricalScoreV1, type index$n_Comment as Comment, index$n_CommentObjectType as CommentObjectType, type index$n_ConfigCategory as ConfigCategory, type index$n_CreateScoreValue as CreateScoreValue, type index$n_Dataset as Dataset, type index$n_DatasetItem as DatasetItem, type index$n_DatasetRun as DatasetRun, type index$n_DatasetRunItem as DatasetRunItem, type index$n_DatasetRunWithItems as DatasetRunWithItems, index$n_DatasetStatus as DatasetStatus, Error$1 as Error, type index$n_MapValue as MapValue, index$n_MethodNotAllowedError as MethodNotAllowedError, type index$n_Model as Model, type index$n_ModelPrice as ModelPrice, index$n_ModelUsageUnit as ModelUsageUnit, index$n_NotFoundError as NotFoundError, type index$n_NumericScore as NumericScore, type index$n_NumericScoreV1 as NumericScoreV1, type index$n_Observation as Observation, index$n_ObservationLevel as ObservationLevel, type index$n_ObservationsView as ObservationsView, type index$n_PricingTier as PricingTier, type index$n_PricingTierCondition as PricingTierCondition, type index$n_PricingTierInput as PricingTierInput, index$n_PricingTierOperator as PricingTierOperator, Score$1 as Score, type index$n_ScoreConfig as ScoreConfig, index$n_ScoreDataType as ScoreDataType, index$n_ScoreSource as ScoreSource, index$n_ScoreV1 as ScoreV1, type index$n_Session as Session, type index$n_SessionWithTraces as SessionWithTraces, type Trace$1 as Trace, type index$n_TraceWithDetails as TraceWithDetails, type index$n_TraceWithFullDetails as TraceWithFullDetails, index$n_UnauthorizedError as UnauthorizedError, type index$n_Usage as Usage };
1361
1587
  }
1362
1588
 
1363
1589
  /**
@@ -2186,6 +2412,8 @@ interface LlmConnection {
2186
2412
  withDefaultModels: boolean;
2187
2413
  /** Keys of extra headers sent with requests (values excluded for security) */
2188
2414
  extraHeaderKeys: string[];
2415
+ /** Adapter-specific configuration. Required for Bedrock (`{"region":"us-east-1"}`), optional for VertexAI (`{"location":"us-central1"}`), not used by other adapters. */
2416
+ config?: Record<string, unknown>;
2189
2417
  createdAt: string;
2190
2418
  updatedAt: string;
2191
2419
  }
@@ -2221,6 +2449,8 @@ interface UpsertLlmConnectionRequest {
2221
2449
  withDefaultModels?: boolean;
2222
2450
  /** Extra headers to send with requests */
2223
2451
  extraHeaders?: Record<string, string>;
2452
+ /** 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. */
2453
+ config?: Record<string, unknown>;
2224
2454
  }
2225
2455
 
2226
2456
  /**
@@ -2325,7 +2555,7 @@ interface GetMediaUploadUrlResponse {
2325
2555
  /**
2326
2556
  * The MIME type of the media record
2327
2557
  */
2328
- type MediaContentType = "image/png" | "image/jpeg" | "image/jpg" | "image/webp" | "image/gif" | "image/svg+xml" | "image/tiff" | "image/bmp" | "audio/mpeg" | "audio/mp3" | "audio/wav" | "audio/ogg" | "audio/oga" | "audio/aac" | "audio/mp4" | "audio/flac" | "video/mp4" | "video/webm" | "text/plain" | "text/html" | "text/css" | "text/csv" | "application/pdf" | "application/msword" | "application/vnd.ms-excel" | "application/zip" | "application/json" | "application/xml" | "application/octet-stream";
2558
+ type MediaContentType = "image/png" | "image/jpeg" | "image/jpg" | "image/webp" | "image/gif" | "image/svg+xml" | "image/tiff" | "image/bmp" | "image/avif" | "image/heic" | "audio/mpeg" | "audio/mp3" | "audio/wav" | "audio/ogg" | "audio/oga" | "audio/aac" | "audio/mp4" | "audio/flac" | "audio/opus" | "audio/webm" | "video/mp4" | "video/webm" | "video/ogg" | "video/mpeg" | "video/quicktime" | "video/x-msvideo" | "video/x-matroska" | "text/plain" | "text/html" | "text/css" | "text/csv" | "text/markdown" | "text/x-python" | "application/javascript" | "text/x-typescript" | "application/x-yaml" | "application/pdf" | "application/msword" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "application/zip" | "application/json" | "application/xml" | "application/octet-stream" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.openxmlformats-officedocument.presentationml.presentation" | "application/rtf" | "application/x-ndjson" | "application/vnd.apache.parquet" | "application/gzip" | "application/x-tar" | "application/x-7z-compressed";
2329
2559
  declare const MediaContentType: {
2330
2560
  readonly ImagePng: "image/png";
2331
2561
  readonly ImageJpeg: "image/jpeg";
@@ -2335,6 +2565,8 @@ declare const MediaContentType: {
2335
2565
  readonly ImageSvgXml: "image/svg+xml";
2336
2566
  readonly ImageTiff: "image/tiff";
2337
2567
  readonly ImageBmp: "image/bmp";
2568
+ readonly ImageAvif: "image/avif";
2569
+ readonly ImageHeic: "image/heic";
2338
2570
  readonly AudioMpeg: "audio/mpeg";
2339
2571
  readonly AudioMp3: "audio/mp3";
2340
2572
  readonly AudioWav: "audio/wav";
@@ -2343,19 +2575,40 @@ declare const MediaContentType: {
2343
2575
  readonly AudioAac: "audio/aac";
2344
2576
  readonly AudioMp4: "audio/mp4";
2345
2577
  readonly AudioFlac: "audio/flac";
2578
+ readonly AudioOpus: "audio/opus";
2579
+ readonly AudioWebm: "audio/webm";
2346
2580
  readonly VideoMp4: "video/mp4";
2347
2581
  readonly VideoWebm: "video/webm";
2582
+ readonly VideoOgg: "video/ogg";
2583
+ readonly VideoMpeg: "video/mpeg";
2584
+ readonly VideoQuicktime: "video/quicktime";
2585
+ readonly VideoXMsvideo: "video/x-msvideo";
2586
+ readonly VideoXMatroska: "video/x-matroska";
2348
2587
  readonly TextPlain: "text/plain";
2349
2588
  readonly TextHtml: "text/html";
2350
2589
  readonly TextCss: "text/css";
2351
2590
  readonly TextCsv: "text/csv";
2591
+ readonly TextMarkdown: "text/markdown";
2592
+ readonly TextXPython: "text/x-python";
2593
+ readonly ApplicationJavascript: "application/javascript";
2594
+ readonly TextXTypescript: "text/x-typescript";
2595
+ readonly ApplicationXYaml: "application/x-yaml";
2352
2596
  readonly ApplicationPdf: "application/pdf";
2353
2597
  readonly ApplicationMsword: "application/msword";
2354
2598
  readonly ApplicationMsExcel: "application/vnd.ms-excel";
2599
+ readonly ApplicationOpenxmlSpreadsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
2355
2600
  readonly ApplicationZip: "application/zip";
2356
2601
  readonly ApplicationJson: "application/json";
2357
2602
  readonly ApplicationXml: "application/xml";
2358
2603
  readonly ApplicationOctetStream: "application/octet-stream";
2604
+ readonly ApplicationOpenxmlWord: "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
2605
+ readonly ApplicationOpenxmlPresentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation";
2606
+ readonly ApplicationRtf: "application/rtf";
2607
+ readonly ApplicationXNdjson: "application/x-ndjson";
2608
+ readonly ApplicationParquet: "application/vnd.apache.parquet";
2609
+ readonly ApplicationGzip: "application/gzip";
2610
+ readonly ApplicationXTar: "application/x-tar";
2611
+ readonly ApplicationX7ZCompressed: "application/x-7z-compressed";
2359
2612
  };
2360
2613
 
2361
2614
  type index$g_GetMediaResponse = GetMediaResponse;
@@ -2463,12 +2716,33 @@ interface CreateModelRequest {
2463
2716
  startDate?: string;
2464
2717
  /** Unit used by this model. */
2465
2718
  unit?: ModelUsageUnit;
2466
- /** Price (USD) per input unit */
2719
+ /** Deprecated. Use 'pricingTiers' instead. Price (USD) per input unit. Creates a default tier if pricingTiers not provided. */
2467
2720
  inputPrice?: number;
2468
- /** Price (USD) per output unit */
2721
+ /** Deprecated. Use 'pricingTiers' instead. Price (USD) per output unit. Creates a default tier if pricingTiers not provided. */
2469
2722
  outputPrice?: number;
2470
- /** Price (USD) per total units. Cannot be set if input or output price is set. */
2723
+ /** Deprecated. Use 'pricingTiers' instead. Price (USD) per total units. Cannot be set if input or output price is set. Creates a default tier if pricingTiers not provided. */
2471
2724
  totalPrice?: number;
2725
+ /**
2726
+ * Optional. Array of pricing tiers for this model.
2727
+ *
2728
+ * Use pricing tiers for all models - both those with threshold-based pricing variations and those with simple flat pricing:
2729
+ *
2730
+ * - For models with standard flat pricing: Create a single default tier with your prices
2731
+ * (e.g., one tier with isDefault=true, priority=0, conditions=[], and your standard prices)
2732
+ *
2733
+ * - For models with threshold-based pricing: Create a default tier plus additional conditional tiers
2734
+ * (e.g., default tier for standard usage + high-volume tier for usage above certain thresholds)
2735
+ *
2736
+ * Requirements:
2737
+ * - Cannot be provided with flat prices (inputPrice/outputPrice/totalPrice) - use one approach or the other
2738
+ * - Must include exactly one default tier with isDefault=true, priority=0, and conditions=[]
2739
+ * - All tier names and priorities must be unique within the model
2740
+ * - Each tier must define at least one price
2741
+ *
2742
+ * If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice),
2743
+ * which will automatically create a single default tier named "Standard".
2744
+ */
2745
+ pricingTiers?: PricingTierInput[];
2472
2746
  /** Optional. Tokenizer to be applied to observations which match to this model. See docs for more details. */
2473
2747
  tokenizerId?: string;
2474
2748
  /** Optional. Configuration for the selected tokenizer. Needs to be JSON. See docs for more details. */
@@ -2606,10 +2880,6 @@ interface GetObservationsRequest {
2606
2880
  * ### Structured Data
2607
2881
  * - `metadata` (stringObject/numberObject/categoryOptions) - Metadata key-value pairs. Use `key` parameter to filter on specific metadata keys.
2608
2882
  *
2609
- * ### Scores (requires join with scores table)
2610
- * - `scores_avg` (number) - Average of numeric scores (alias: `scores`)
2611
- * - `score_categories` (categoryOptions) - Categorical score values
2612
- *
2613
2883
  * ### Associated Trace Fields (requires join with traces table)
2614
2884
  * - `userId` (string) - User ID from associated trace
2615
2885
  * - `traceName` (string) - Name from associated trace
@@ -3710,6 +3980,10 @@ interface GetScoresRequest {
3710
3980
  configId?: string;
3711
3981
  /** Retrieve only scores with a specific sessionId. */
3712
3982
  sessionId?: string;
3983
+ /** Retrieve only scores with a specific datasetRunId. */
3984
+ datasetRunId?: string;
3985
+ /** Retrieve only scores with a specific traceId. */
3986
+ traceId?: string;
3713
3987
  /** Retrieve only scores with a specific annotation queueId. */
3714
3988
  queueId?: string;
3715
3989
  /** Retrieve only scores with a specific dataType. */
@@ -5178,7 +5452,8 @@ declare class LlmConnections {
5178
5452
  * baseURL: undefined,
5179
5453
  * customModels: undefined,
5180
5454
  * withDefaultModels: undefined,
5181
- * extraHeaders: undefined
5455
+ * extraHeaders: undefined,
5456
+ * config: undefined
5182
5457
  * })
5183
5458
  */
5184
5459
  upsert(request: UpsertLlmConnectionRequest, requestOptions?: LlmConnections.RequestOptions): HttpResponsePromise<LlmConnection>;
@@ -5424,6 +5699,7 @@ declare class Models {
5424
5699
  * inputPrice: undefined,
5425
5700
  * outputPrice: undefined,
5426
5701
  * totalPrice: undefined,
5702
+ * pricingTiers: undefined,
5427
5703
  * tokenizerId: undefined,
5428
5704
  * tokenizerConfig: undefined
5429
5705
  * })
@@ -6090,7 +6366,8 @@ declare class PromptVersion {
6090
6366
  /**
6091
6367
  * Update labels for a specific prompt version
6092
6368
  *
6093
- * @param {string} name - The name of the prompt
6369
+ * @param {string} name - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
6370
+ * the folder path must be URL encoded.
6094
6371
  * @param {number} version - Version of the prompt to update
6095
6372
  * @param {LangfuseAPI.UpdatePromptRequest} request
6096
6373
  * @param {PromptVersion.RequestOptions} requestOptions - Request-specific configuration.
@@ -6156,7 +6433,8 @@ declare class Prompts {
6156
6433
  /**
6157
6434
  * Get a prompt
6158
6435
  *
6159
- * @param {string} promptName - The name of the prompt
6436
+ * @param {string} promptName - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
6437
+ * the folder path must be URL encoded.
6160
6438
  * @param {LangfuseAPI.GetPromptRequest} request
6161
6439
  * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
6162
6440
  *
@@ -7341,4 +7619,4 @@ interface PropagateAttributesParams {
7341
7619
  declare function propagateAttributes<A extends unknown[], F extends (...args: A) => ReturnType<F>>(params: PropagateAttributesParams, fn: F): ReturnType<F>;
7342
7620
  declare function getPropagatedAttributesFromContext(context: Context): Record<string, string | string[]>;
7343
7621
 
7344
- 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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, 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 GetMetricsRequest, type GetModelsRequest, type GetObservationsRequest, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, 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, 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 MetricsResponse, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type Observations$1 as Observations, type ObservationsView, type ObservationsViews, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, 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, 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$1 as Score, type ScoreBody, type ScoreConfig, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, 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$q as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$p as blobStorageIntegrations, bytesToBase64, index$o as comments, index$n as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$m as datasetItems, index$l as datasetRunItems, index$k as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$j as health, index$i as ingestion, index$h as llmConnections, LoggerSingleton as logger, index$g as media, index$f as metrics, index$e as models, index$d as observations, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
7622
+ 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, BlobStorageIntegrationType, type BlobStorageIntegrationsResponse, type BooleanScore, type BooleanScoreV1, type BulkConfig, type CategoricalScore, type CategoricalScoreV1, type ChatMessage, ChatMessageWithPlaceholders, type ChatPrompt, type Comment, CommentObjectType, type ConfigCategory, type CreateAnnotationQueueAssignmentResponse, type CreateAnnotationQueueItemRequest, type CreateAnnotationQueueRequest, type CreateApiKeyRequest, type CreateBlobStorageIntegrationRequest, type CreateChatPromptRequest, type CreateCommentRequest, type CreateCommentResponse, type CreateDatasetItemRequest, type CreateDatasetRequest, type CreateDatasetRunItemRequest, type CreateEventBody, type CreateEventEvent, type CreateGenerationBody, type CreateGenerationEvent, type CreateModelRequest, type CreateObservationEvent, type CreateProjectRequest, CreatePromptRequest, type CreateScoreConfigRequest, type CreateScoreRequest, type CreateScoreResponse, type CreateScoreValue, type CreateSpanBody, type CreateSpanEvent, type CreateTextPromptRequest, type CreateUserRequest, type Dataset, type DatasetItem, type DatasetRun, type DatasetRunItem, type DatasetRunWithItems, DatasetStatus, type DeleteAnnotationQueueAssignmentResponse, type DeleteAnnotationQueueItemResponse, type DeleteDatasetItemResponse, type DeleteDatasetRunResponse, type DeleteMembershipRequest, 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 GetMetricsRequest, type GetModelsRequest, type GetObservationsRequest, type GetPromptRequest, type GetScoreConfigsRequest, type GetScoresRequest, type GetScoresResponse, GetScoresResponseData, type GetScoresResponseDataBoolean, type GetScoresResponseDataCategorical, type GetScoresResponseDataNumeric, type GetScoresResponseTraceData, type GetSessionsRequest, 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, 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 MetricsResponse, type Model, type ModelPrice, ModelUsageUnit, NotFoundError, type NumericScore, type NumericScoreV1, type Observation, type ObservationBody, ObservationLevel, ObservationType, type Observations$1 as Observations, type ObservationsView, type ObservationsViews, type OpenAiCompletionUsageSchema, type OpenAiResponseUsageSchema, type OpenAiUsage, type OptionalObservationBody, 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, 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$1 as Score, type ScoreBody, type ScoreConfig, type ScoreConfigs$1 as ScoreConfigs, ScoreDataType, type ScoreEvent, ScoreSource, ScoreV1, type SdkLogBody, type SdkLogEvent, type ServiceProviderConfig, ServiceUnavailableError, type Session, type SessionWithTraces, type Sort, type TextPrompt, 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$q as annotationQueues, base64Decode, base64Encode, base64ToBytes, index$p as blobStorageIntegrations, bytesToBase64, index$o as comments, index$n as commons, configureGlobalLogger, createExperimentId, createExperimentItemId, createLogger, index$m as datasetItems, index$l as datasetRunItems, index$k as datasets, generateUUID, getEnv, getGlobalLogger, getPropagatedAttributesFromContext, index$j as health, index$i as ingestion, index$h as llmConnections, LoggerSingleton as logger, index$g as media, index$f as metrics, index$e as models, index$d as observations, index$c as opentelemetry, index$b as organizations, index$a as projects, index as promptVersion, index$9 as prompts, propagateAttributes, resetGlobalLogger, safeSetTimeout, index$8 as scim, index$5 as score, index$7 as scoreConfigs, index$6 as scoreV2, serializeValue, index$4 as sessions, index$3 as trace, index$1 as utils };
package/dist/index.mjs CHANGED
@@ -253,7 +253,7 @@ var resetGlobalLogger = () => {
253
253
  // package.json
254
254
  var package_default = {
255
255
  name: "@langfuse/core",
256
- version: "4.4.2",
256
+ version: "4.4.4",
257
257
  description: "Core functions and utilities for Langfuse packages",
258
258
  type: "module",
259
259
  sideEffects: false,
@@ -404,11 +404,22 @@ __export(commons_exports, {
404
404
  ModelUsageUnit: () => ModelUsageUnit,
405
405
  NotFoundError: () => NotFoundError,
406
406
  ObservationLevel: () => ObservationLevel,
407
+ PricingTierOperator: () => PricingTierOperator,
407
408
  ScoreDataType: () => ScoreDataType,
408
409
  ScoreSource: () => ScoreSource,
409
410
  UnauthorizedError: () => UnauthorizedError
410
411
  });
411
412
 
413
+ // src/api/api/resources/commons/types/PricingTierOperator.ts
414
+ var PricingTierOperator = {
415
+ Gt: "gt",
416
+ Gte: "gte",
417
+ Lt: "lt",
418
+ Lte: "lte",
419
+ Eq: "eq",
420
+ Neq: "neq"
421
+ };
422
+
412
423
  // src/api/api/resources/commons/types/ModelUsageUnit.ts
413
424
  var ModelUsageUnit = {
414
425
  Characters: "CHARACTERS",
@@ -648,6 +659,8 @@ var MediaContentType = {
648
659
  ImageSvgXml: "image/svg+xml",
649
660
  ImageTiff: "image/tiff",
650
661
  ImageBmp: "image/bmp",
662
+ ImageAvif: "image/avif",
663
+ ImageHeic: "image/heic",
651
664
  AudioMpeg: "audio/mpeg",
652
665
  AudioMp3: "audio/mp3",
653
666
  AudioWav: "audio/wav",
@@ -656,19 +669,40 @@ var MediaContentType = {
656
669
  AudioAac: "audio/aac",
657
670
  AudioMp4: "audio/mp4",
658
671
  AudioFlac: "audio/flac",
672
+ AudioOpus: "audio/opus",
673
+ AudioWebm: "audio/webm",
659
674
  VideoMp4: "video/mp4",
660
675
  VideoWebm: "video/webm",
676
+ VideoOgg: "video/ogg",
677
+ VideoMpeg: "video/mpeg",
678
+ VideoQuicktime: "video/quicktime",
679
+ VideoXMsvideo: "video/x-msvideo",
680
+ VideoXMatroska: "video/x-matroska",
661
681
  TextPlain: "text/plain",
662
682
  TextHtml: "text/html",
663
683
  TextCss: "text/css",
664
684
  TextCsv: "text/csv",
685
+ TextMarkdown: "text/markdown",
686
+ TextXPython: "text/x-python",
687
+ ApplicationJavascript: "application/javascript",
688
+ TextXTypescript: "text/x-typescript",
689
+ ApplicationXYaml: "application/x-yaml",
665
690
  ApplicationPdf: "application/pdf",
666
691
  ApplicationMsword: "application/msword",
667
692
  ApplicationMsExcel: "application/vnd.ms-excel",
693
+ ApplicationOpenxmlSpreadsheet: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
668
694
  ApplicationZip: "application/zip",
669
695
  ApplicationJson: "application/json",
670
696
  ApplicationXml: "application/xml",
671
- ApplicationOctetStream: "application/octet-stream"
697
+ ApplicationOctetStream: "application/octet-stream",
698
+ ApplicationOpenxmlWord: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
699
+ ApplicationOpenxmlPresentation: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
700
+ ApplicationRtf: "application/rtf",
701
+ ApplicationXNdjson: "application/x-ndjson",
702
+ ApplicationParquet: "application/vnd.apache.parquet",
703
+ ApplicationGzip: "application/gzip",
704
+ ApplicationXTar: "application/x-tar",
705
+ ApplicationX7ZCompressed: "application/x-7z-compressed"
672
706
  };
673
707
 
674
708
  // src/api/api/resources/metrics/index.ts
@@ -5098,7 +5132,8 @@ var LlmConnections = class {
5098
5132
  * baseURL: undefined,
5099
5133
  * customModels: undefined,
5100
5134
  * withDefaultModels: undefined,
5101
- * extraHeaders: undefined
5135
+ * extraHeaders: undefined,
5136
+ * config: undefined
5102
5137
  * })
5103
5138
  */
5104
5139
  upsert(request, requestOptions) {
@@ -5702,6 +5737,7 @@ var Models = class {
5702
5737
  * inputPrice: undefined,
5703
5738
  * outputPrice: undefined,
5704
5739
  * totalPrice: undefined,
5740
+ * pricingTiers: undefined,
5705
5741
  * tokenizerId: undefined,
5706
5742
  * tokenizerConfig: undefined
5707
5743
  * })
@@ -8212,7 +8248,8 @@ var PromptVersion = class {
8212
8248
  /**
8213
8249
  * Update labels for a specific prompt version
8214
8250
  *
8215
- * @param {string} name - The name of the prompt
8251
+ * @param {string} name - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
8252
+ * the folder path must be URL encoded.
8216
8253
  * @param {number} version - Version of the prompt to update
8217
8254
  * @param {LangfuseAPI.UpdatePromptRequest} request
8218
8255
  * @param {PromptVersion.RequestOptions} requestOptions - Request-specific configuration.
@@ -8340,7 +8377,8 @@ var Prompts = class {
8340
8377
  /**
8341
8378
  * Get a prompt
8342
8379
  *
8343
- * @param {string} promptName - The name of the prompt
8380
+ * @param {string} promptName - The name of the prompt. If the prompt is in a folder (e.g., "folder/subfolder/prompt-name"),
8381
+ * the folder path must be URL encoded.
8344
8382
  * @param {LangfuseAPI.GetPromptRequest} request
8345
8383
  * @param {Prompts.RequestOptions} requestOptions - Request-specific configuration.
8346
8384
  *
@@ -9968,6 +10006,8 @@ var ScoreV2 = class {
9968
10006
  scoreIds,
9969
10007
  configId,
9970
10008
  sessionId,
10009
+ datasetRunId,
10010
+ traceId,
9971
10011
  queueId,
9972
10012
  dataType,
9973
10013
  traceTags
@@ -10016,6 +10056,12 @@ var ScoreV2 = class {
10016
10056
  if (sessionId != null) {
10017
10057
  _queryParams["sessionId"] = sessionId;
10018
10058
  }
10059
+ if (datasetRunId != null) {
10060
+ _queryParams["datasetRunId"] = datasetRunId;
10061
+ }
10062
+ if (traceId != null) {
10063
+ _queryParams["traceId"] = traceId;
10064
+ }
10019
10065
  if (queueId != null) {
10020
10066
  _queryParams["queueId"] = queueId;
10021
10067
  }
@@ -11886,6 +11932,7 @@ export {
11886
11932
  NotFoundError,
11887
11933
  ObservationLevel,
11888
11934
  ObservationType,
11935
+ PricingTierOperator,
11889
11936
  PromptType,
11890
11937
  ScoreDataType,
11891
11938
  ScoreSource,