weflayr 0.30.0 → 0.31.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.
Files changed (28) hide show
  1. package/dist/package.json +9 -9
  2. package/dist/src/api/generated/facade.gen.d.ts +1436 -10
  3. package/dist/src/api/generated/facade.gen.js +24 -1
  4. package/dist/src/api/generated/index.d.ts +2 -2
  5. package/dist/src/api/generated/index.js +24 -1
  6. package/dist/src/api/generated/sdk.gen.d.ts +97 -5
  7. package/dist/src/api/generated/sdk.gen.js +256 -5
  8. package/dist/src/api/generated/types.gen.d.ts +4527 -741
  9. package/dist/src/instrumentation/anthropic/get_streaming_accumulation_telemetry.d.ts +6 -4
  10. package/dist/src/instrumentation/anthropic/get_streaming_accumulation_telemetry.js +22 -5
  11. package/dist/src/instrumentation/bedrock/{get_cache_telemetry.d.ts → get_cache_and_reasoning_telemetry.d.ts} +7 -0
  12. package/dist/src/instrumentation/bedrock/{get_cache_telemetry.js → get_cache_and_reasoning_telemetry.js} +25 -2
  13. package/dist/src/instrumentation/bedrock/get_streaming_output_message_telemetry.d.ts +6 -0
  14. package/dist/src/instrumentation/bedrock/get_streaming_output_message_telemetry.js +18 -2
  15. package/dist/src/instrumentation/bedrock/set_telemetry_attributes.js +2 -2
  16. package/dist/src/instrumentation/mistral/full_instrumentation.d.ts +10 -4
  17. package/dist/src/instrumentation/mistral/full_instrumentation.js +47 -14
  18. package/dist/src/instrumentation/mistral/get_streamed_reasoning_telemetry.d.ts +38 -0
  19. package/dist/src/instrumentation/mistral/get_streamed_reasoning_telemetry.js +72 -0
  20. package/dist/src/instrumentation/openai/get_streaming_usage.d.ts +5 -2
  21. package/dist/src/instrumentation/openai/get_streaming_usage.js +10 -2
  22. package/dist/src/otel/exporter.d.ts +1 -1
  23. package/dist/src/otel/span-filter.d.ts +1 -1
  24. package/dist/src/otel/span-processor.d.ts +1 -1
  25. package/dist/src/otel/span-processor.js +3 -3
  26. package/dist/src/propagate-metadata-to-gateway.js +38 -11
  27. package/dist/src/setup.js +19 -7
  28. package/package.json +9 -9
@@ -6,12 +6,13 @@ export declare const getCosts: (options: import("../makeEndpoint.js").ClientOpti
6
6
  dateFrom: string;
7
7
  dateTo?: string | undefined;
8
8
  applyCredits?: boolean | undefined;
9
- aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
10
- groupBy?: "customer" | "feature" | "model" | "provider" | null | undefined;
9
+ aggregate?: "month" | "day" | "week" | "quarter" | "year" | "all" | undefined;
10
+ groupBy?: "call_name" | "customer" | "feature" | "model" | "provider" | null | undefined;
11
11
  customers?: string[] | undefined;
12
12
  features?: string[] | undefined;
13
13
  models?: string[] | undefined;
14
14
  providers?: string[] | undefined;
15
+ callNames?: string[] | undefined;
15
16
  cursor?: string | null | undefined;
16
17
  limit?: number | undefined;
17
18
  customerTags?: {
@@ -30,6 +31,7 @@ export declare const getCosts: (options: import("../makeEndpoint.js").ClientOpti
30
31
  feature?: string | null | undefined;
31
32
  model?: string | null | undefined;
32
33
  provider?: string | null | undefined;
34
+ callName?: string | null | undefined;
33
35
  cost: number;
34
36
  avgFeatureRunCost: number;
35
37
  maxFeatureRunCost: number;
@@ -43,10 +45,11 @@ export declare const getMargin: (options: import("../makeEndpoint.js").ClientOpt
43
45
  dateFrom: string;
44
46
  dateTo?: string | undefined;
45
47
  applyCredits?: boolean | undefined;
46
- aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
48
+ aggregate?: "month" | "day" | "week" | "quarter" | "year" | "all" | undefined;
47
49
  groupBy?: "customer" | null | undefined;
48
50
  customers?: string[] | undefined;
49
51
  filterCustomersBasedOnFeatures?: string[] | undefined;
52
+ callNames?: string[] | undefined;
50
53
  cursor?: string | null | undefined;
51
54
  limit?: number | undefined;
52
55
  };
@@ -216,6 +219,25 @@ export declare const setCustomersTags: (options: import("../makeEndpoint.js").Cl
216
219
  ok: boolean;
217
220
  customersUpdated: number;
218
221
  }, CamelCaseDeep<generatedTypes.SetCustomersTagsError>>>;
222
+ export declare const getApiKeyInfo: (options: import("../makeEndpoint.js").ClientOption & {
223
+ query?: undefined;
224
+ body?: undefined;
225
+ path?: undefined;
226
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
227
+ name: string;
228
+ scopes: ("gateway" | "management")[];
229
+ expiresAt: string | null;
230
+ rateLimitRequestsPerMinute: number | null;
231
+ spendLimits: {
232
+ amountUsd: number;
233
+ every: number;
234
+ unit: "month" | "day" | "hour";
235
+ }[];
236
+ createdByUserEmail: string | null;
237
+ createdAt: string;
238
+ }, {
239
+ error: string;
240
+ }>>;
219
241
  export declare const getProject: (options: import("../makeEndpoint.js").ClientOption & {
220
242
  query?: undefined;
221
243
  body?: undefined;
@@ -266,9 +288,16 @@ export declare const getProviders: (options: import("../makeEndpoint.js").Client
266
288
  }>>;
267
289
  export declare const getCustomers: (options: import("../makeEndpoint.js").ClientOption & {
268
290
  query?: {
269
- cursor?: string | undefined;
270
- limit?: number | undefined;
271
291
  includeCustomerTags?: boolean | undefined;
292
+ dateFrom?: string | null | undefined;
293
+ dateTo?: string | null | undefined;
294
+ search?: string | undefined;
295
+ tag?: string[] | undefined;
296
+ status?: ("healthy" | "watch" | "at_risk" | "unprofitable" | "unknown")[] | undefined;
297
+ sort?: "customer" | "margin" | "revenue_or_key_metric" | "cost" | "margin_pct" | "in_tok" | "out_tok" | "mom" | "profitability_status" | null | undefined;
298
+ direction?: "ascending" | "descending" | null | undefined;
299
+ cursor?: string | null | undefined;
300
+ limit?: number | undefined;
272
301
  } | undefined;
273
302
  body?: undefined;
274
303
  path?: undefined;
@@ -278,31 +307,65 @@ export declare const getCustomers: (options: import("../makeEndpoint.js").Client
278
307
  customerTags: {
279
308
  [x: string]: string;
280
309
  };
310
+ figures: {
311
+ revenueOrKeyMetric: number | null;
312
+ hasRevenueOrKeyMetric: boolean;
313
+ cost: number | null;
314
+ margin: number | null;
315
+ marginPct: number | null;
316
+ inTok: number | null;
317
+ outTok: number | null;
318
+ mom: number | null;
319
+ profitabilityStatus: string;
320
+ } | null;
281
321
  }[];
282
322
  nextCursor: string | null;
283
323
  hasMore: boolean;
284
- }, {
285
- error: string;
286
- }>>;
324
+ }, CamelCaseDeep<generatedTypes.GetCustomersError>>>;
287
325
  export declare const getFeatures: (options: import("../makeEndpoint.js").ClientOption & {
288
326
  query?: undefined;
289
327
  body?: undefined;
290
328
  path?: undefined;
291
329
  }) => Promise<import("../makeEndpoint.js").CallResult<{
292
330
  features: string[];
331
+ callNamesByFeature: {
332
+ [x: string]: string[];
333
+ };
293
334
  }, {
294
335
  error: string;
295
336
  }>>;
337
+ export declare const getCalls: (options: import("../makeEndpoint.js").ClientOption & {
338
+ query: {
339
+ dateFrom: string;
340
+ dateTo?: string | undefined;
341
+ cursor?: string | null | undefined;
342
+ limit?: number | undefined;
343
+ };
344
+ body?: undefined;
345
+ path?: undefined;
346
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
347
+ calls: {
348
+ callName: string;
349
+ callCount: number;
350
+ features: string[];
351
+ models: string[];
352
+ totalCost: number;
353
+ }[];
354
+ unnamedCallCount: number;
355
+ nextCursor: string | null;
356
+ hasMore: boolean;
357
+ }, CamelCaseDeep<generatedTypes.GetCallsError>>>;
296
358
  export declare const getPerformance: (options: import("../makeEndpoint.js").ClientOption & {
297
359
  query?: undefined;
298
360
  body: {
299
361
  dateFrom: string;
300
362
  dateTo?: string | undefined;
301
363
  applyCredits?: boolean | undefined;
302
- aggregate?: "day" | "week" | "month" | "quarter" | "year" | "all" | undefined;
303
- groupBy?: "user" | null | undefined;
364
+ aggregate?: "month" | "day" | "week" | "quarter" | "year" | "all" | undefined;
365
+ groupBy?: "call_name" | "user" | null | undefined;
304
366
  users?: string[] | undefined;
305
367
  filterUsersBasedOnFeatures?: string[] | undefined;
368
+ callNames?: string[] | undefined;
306
369
  cursor?: string | null | undefined;
307
370
  limit?: number | undefined;
308
371
  userTags?: {
@@ -315,6 +378,7 @@ export declare const getPerformance: (options: import("../makeEndpoint.js").Clie
315
378
  dateFrom: string;
316
379
  dateTo: string;
317
380
  user?: string | null | undefined;
381
+ callName?: string | null | undefined;
318
382
  cost: number;
319
383
  keyMetrics: {
320
384
  [x: string]: {
@@ -327,3 +391,1365 @@ export declare const getPerformance: (options: import("../makeEndpoint.js").Clie
327
391
  nextCursor: string | null;
328
392
  hasMore: boolean;
329
393
  }, CamelCaseDeep<generatedTypes.GetPerformanceError>>>;
394
+ export declare const getRoutingStrategies: (options: import("../makeEndpoint.js").ClientOption & {
395
+ query?: {
396
+ status?: "all" | "active" | "archived" | undefined;
397
+ cursor?: string | null | undefined;
398
+ limit?: number | undefined;
399
+ } | undefined;
400
+ body?: undefined;
401
+ path?: undefined;
402
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
403
+ strategies: {
404
+ slug: string;
405
+ name: string;
406
+ version: number;
407
+ globalRule: string;
408
+ archivedAt: string | null;
409
+ updatedAt: string;
410
+ url: string;
411
+ }[];
412
+ nextCursor: string | null;
413
+ hasMore: boolean;
414
+ }, CamelCaseDeep<generatedTypes.GetRoutingStrategiesError>>>;
415
+ export declare const setRoutingStrategy: (options: import("../makeEndpoint.js").ClientOption & {
416
+ query?: undefined;
417
+ body: {
418
+ userEmail?: string | null | undefined;
419
+ document: {
420
+ name: string;
421
+ slug?: string | undefined;
422
+ allowedDeployments: {
423
+ model: string;
424
+ provider: string;
425
+ region: string;
426
+ }[];
427
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
428
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
429
+ fallback?: {
430
+ retryAttempts?: number | undefined;
431
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
432
+ } | undefined;
433
+ overrideRules?: ({
434
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
435
+ allowedDeployments: {
436
+ model: string;
437
+ provider: string;
438
+ region: string;
439
+ }[];
440
+ excludedCustomers?: string[] | undefined;
441
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
442
+ triggersWhen: "above" | "below";
443
+ thresholdValue: number;
444
+ thresholdUnit: "pct" | "usd";
445
+ type: "customer_cost";
446
+ spendPeriod: "month" | "day";
447
+ } | {
448
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
449
+ allowedDeployments: {
450
+ model: string;
451
+ provider: string;
452
+ region: string;
453
+ }[];
454
+ excludedCustomers?: string[] | undefined;
455
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
456
+ type: "customer_selection";
457
+ includedCustomers: string[];
458
+ } | {
459
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
460
+ allowedDeployments: {
461
+ model: string;
462
+ provider: string;
463
+ region: string;
464
+ }[];
465
+ excludedCustomers?: string[] | undefined;
466
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
467
+ triggersWhen: "above" | "below";
468
+ thresholdValue: number;
469
+ thresholdUnit: "pct" | "usd";
470
+ type: "margin";
471
+ })[] | undefined;
472
+ selfHeal: boolean;
473
+ applyAutoCachingFromBenchmark?: boolean | undefined;
474
+ benchmarkSource?: {
475
+ benchmarkUuid: string;
476
+ } | null | undefined;
477
+ };
478
+ expectedVersion?: number | null | undefined;
479
+ };
480
+ path?: undefined;
481
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
482
+ blockers?: string[] | undefined;
483
+ slug: string;
484
+ version: number;
485
+ document: {
486
+ name: string;
487
+ slug?: string | undefined;
488
+ allowedDeployments: {
489
+ model: string;
490
+ provider: string;
491
+ region: string;
492
+ }[];
493
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
494
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
495
+ fallback?: {
496
+ retryAttempts?: number | undefined;
497
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
498
+ } | undefined;
499
+ overrideRules?: ({
500
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
501
+ allowedDeployments: {
502
+ model: string;
503
+ provider: string;
504
+ region: string;
505
+ }[];
506
+ excludedCustomers?: string[] | undefined;
507
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
508
+ triggersWhen: "above" | "below";
509
+ thresholdValue: number;
510
+ thresholdUnit: "pct" | "usd";
511
+ type: "customer_cost";
512
+ spendPeriod: "month" | "day";
513
+ } | {
514
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
515
+ allowedDeployments: {
516
+ model: string;
517
+ provider: string;
518
+ region: string;
519
+ }[];
520
+ excludedCustomers?: string[] | undefined;
521
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
522
+ type: "customer_selection";
523
+ includedCustomers: string[];
524
+ } | {
525
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
526
+ allowedDeployments: {
527
+ model: string;
528
+ provider: string;
529
+ region: string;
530
+ }[];
531
+ excludedCustomers?: string[] | undefined;
532
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
533
+ triggersWhen: "above" | "below";
534
+ thresholdValue: number;
535
+ thresholdUnit: "pct" | "usd";
536
+ type: "margin";
537
+ })[] | undefined;
538
+ selfHeal: boolean;
539
+ applyAutoCachingFromBenchmark?: boolean | undefined;
540
+ benchmarkSource?: {
541
+ benchmarkUuid: string;
542
+ } | null | undefined;
543
+ };
544
+ archivedAt: string | null;
545
+ updatedAt: string;
546
+ url: string;
547
+ recordedForEmail: string;
548
+ }, CamelCaseDeep<generatedTypes.SetRoutingStrategyError>>>;
549
+ export declare const getRoutingStrategy: (options: import("../makeEndpoint.js").ClientOption & {
550
+ query: {
551
+ slug: string;
552
+ previousVersions?: boolean | undefined;
553
+ };
554
+ body?: undefined;
555
+ path?: undefined;
556
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
557
+ blockers?: string[] | undefined;
558
+ slug: string;
559
+ version: number;
560
+ document: {
561
+ name: string;
562
+ slug?: string | undefined;
563
+ allowedDeployments: {
564
+ model: string;
565
+ provider: string;
566
+ region: string;
567
+ }[];
568
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
569
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
570
+ fallback?: {
571
+ retryAttempts?: number | undefined;
572
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
573
+ } | undefined;
574
+ overrideRules?: ({
575
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
576
+ allowedDeployments: {
577
+ model: string;
578
+ provider: string;
579
+ region: string;
580
+ }[];
581
+ excludedCustomers?: string[] | undefined;
582
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
583
+ triggersWhen: "above" | "below";
584
+ thresholdValue: number;
585
+ thresholdUnit: "pct" | "usd";
586
+ type: "customer_cost";
587
+ spendPeriod: "month" | "day";
588
+ } | {
589
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
590
+ allowedDeployments: {
591
+ model: string;
592
+ provider: string;
593
+ region: string;
594
+ }[];
595
+ excludedCustomers?: string[] | undefined;
596
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
597
+ type: "customer_selection";
598
+ includedCustomers: string[];
599
+ } | {
600
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
601
+ allowedDeployments: {
602
+ model: string;
603
+ provider: string;
604
+ region: string;
605
+ }[];
606
+ excludedCustomers?: string[] | undefined;
607
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
608
+ triggersWhen: "above" | "below";
609
+ thresholdValue: number;
610
+ thresholdUnit: "pct" | "usd";
611
+ type: "margin";
612
+ })[] | undefined;
613
+ selfHeal: boolean;
614
+ applyAutoCachingFromBenchmark?: boolean | undefined;
615
+ benchmarkSource?: {
616
+ benchmarkUuid: string;
617
+ } | null | undefined;
618
+ };
619
+ archivedAt: string | null;
620
+ updatedAt: string;
621
+ url: string;
622
+ previousVersions: {
623
+ version: number;
624
+ document: {
625
+ name: string;
626
+ slug?: string | undefined;
627
+ allowedDeployments: {
628
+ model: string;
629
+ provider: string;
630
+ region: string;
631
+ }[];
632
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
633
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
634
+ fallback?: {
635
+ retryAttempts?: number | undefined;
636
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
637
+ } | undefined;
638
+ overrideRules?: ({
639
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
640
+ allowedDeployments: {
641
+ model: string;
642
+ provider: string;
643
+ region: string;
644
+ }[];
645
+ excludedCustomers?: string[] | undefined;
646
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
647
+ triggersWhen: "above" | "below";
648
+ thresholdValue: number;
649
+ thresholdUnit: "pct" | "usd";
650
+ type: "customer_cost";
651
+ spendPeriod: "month" | "day";
652
+ } | {
653
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
654
+ allowedDeployments: {
655
+ model: string;
656
+ provider: string;
657
+ region: string;
658
+ }[];
659
+ excludedCustomers?: string[] | undefined;
660
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
661
+ type: "customer_selection";
662
+ includedCustomers: string[];
663
+ } | {
664
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
665
+ allowedDeployments: {
666
+ model: string;
667
+ provider: string;
668
+ region: string;
669
+ }[];
670
+ excludedCustomers?: string[] | undefined;
671
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
672
+ triggersWhen: "above" | "below";
673
+ thresholdValue: number;
674
+ thresholdUnit: "pct" | "usd";
675
+ type: "margin";
676
+ })[] | undefined;
677
+ selfHeal: boolean;
678
+ applyAutoCachingFromBenchmark?: boolean | undefined;
679
+ benchmarkSource?: {
680
+ benchmarkUuid: string;
681
+ } | null | undefined;
682
+ };
683
+ effectiveFrom: string;
684
+ effectiveTo: string | null;
685
+ createdBy: string | null;
686
+ }[] | null;
687
+ }, CamelCaseDeep<generatedTypes.GetRoutingStrategyError>>>;
688
+ export declare const archiveRoutingStrategy: (options: import("../makeEndpoint.js").ClientOption & {
689
+ query?: undefined;
690
+ body: {
691
+ slug: string;
692
+ };
693
+ path?: undefined;
694
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
695
+ blockers?: string[] | undefined;
696
+ slug: string;
697
+ version: number;
698
+ document: {
699
+ name: string;
700
+ slug?: string | undefined;
701
+ allowedDeployments: {
702
+ model: string;
703
+ provider: string;
704
+ region: string;
705
+ }[];
706
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
707
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
708
+ fallback?: {
709
+ retryAttempts?: number | undefined;
710
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
711
+ } | undefined;
712
+ overrideRules?: ({
713
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
714
+ allowedDeployments: {
715
+ model: string;
716
+ provider: string;
717
+ region: string;
718
+ }[];
719
+ excludedCustomers?: string[] | undefined;
720
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
721
+ triggersWhen: "above" | "below";
722
+ thresholdValue: number;
723
+ thresholdUnit: "pct" | "usd";
724
+ type: "customer_cost";
725
+ spendPeriod: "month" | "day";
726
+ } | {
727
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
728
+ allowedDeployments: {
729
+ model: string;
730
+ provider: string;
731
+ region: string;
732
+ }[];
733
+ excludedCustomers?: string[] | undefined;
734
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
735
+ type: "customer_selection";
736
+ includedCustomers: string[];
737
+ } | {
738
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
739
+ allowedDeployments: {
740
+ model: string;
741
+ provider: string;
742
+ region: string;
743
+ }[];
744
+ excludedCustomers?: string[] | undefined;
745
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
746
+ triggersWhen: "above" | "below";
747
+ thresholdValue: number;
748
+ thresholdUnit: "pct" | "usd";
749
+ type: "margin";
750
+ })[] | undefined;
751
+ selfHeal: boolean;
752
+ applyAutoCachingFromBenchmark?: boolean | undefined;
753
+ benchmarkSource?: {
754
+ benchmarkUuid: string;
755
+ } | null | undefined;
756
+ };
757
+ archivedAt: string | null;
758
+ updatedAt: string;
759
+ url: string;
760
+ }, CamelCaseDeep<generatedTypes.ArchiveRoutingStrategyError>>>;
761
+ export declare const restoreRoutingStrategy: (options: import("../makeEndpoint.js").ClientOption & {
762
+ query?: undefined;
763
+ body: {
764
+ slug: string;
765
+ };
766
+ path?: undefined;
767
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
768
+ blockers?: string[] | undefined;
769
+ slug: string;
770
+ version: number;
771
+ document: {
772
+ name: string;
773
+ slug?: string | undefined;
774
+ allowedDeployments: {
775
+ model: string;
776
+ provider: string;
777
+ region: string;
778
+ }[];
779
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
780
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
781
+ fallback?: {
782
+ retryAttempts?: number | undefined;
783
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
784
+ } | undefined;
785
+ overrideRules?: ({
786
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
787
+ allowedDeployments: {
788
+ model: string;
789
+ provider: string;
790
+ region: string;
791
+ }[];
792
+ excludedCustomers?: string[] | undefined;
793
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
794
+ triggersWhen: "above" | "below";
795
+ thresholdValue: number;
796
+ thresholdUnit: "pct" | "usd";
797
+ type: "customer_cost";
798
+ spendPeriod: "month" | "day";
799
+ } | {
800
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
801
+ allowedDeployments: {
802
+ model: string;
803
+ provider: string;
804
+ region: string;
805
+ }[];
806
+ excludedCustomers?: string[] | undefined;
807
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
808
+ type: "customer_selection";
809
+ includedCustomers: string[];
810
+ } | {
811
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
812
+ allowedDeployments: {
813
+ model: string;
814
+ provider: string;
815
+ region: string;
816
+ }[];
817
+ excludedCustomers?: string[] | undefined;
818
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
819
+ triggersWhen: "above" | "below";
820
+ thresholdValue: number;
821
+ thresholdUnit: "pct" | "usd";
822
+ type: "margin";
823
+ })[] | undefined;
824
+ selfHeal: boolean;
825
+ applyAutoCachingFromBenchmark?: boolean | undefined;
826
+ benchmarkSource?: {
827
+ benchmarkUuid: string;
828
+ } | null | undefined;
829
+ };
830
+ archivedAt: string | null;
831
+ updatedAt: string;
832
+ url: string;
833
+ }, CamelCaseDeep<generatedTypes.RestoreRoutingStrategyError>>>;
834
+ export declare const getRoutingStrategyResults: (options: import("../makeEndpoint.js").ClientOption & {
835
+ query: {
836
+ dateFrom: string;
837
+ dateTo?: string | undefined;
838
+ slug: string;
839
+ version?: number | null | undefined;
840
+ };
841
+ body?: undefined;
842
+ path?: undefined;
843
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
844
+ blockers?: string[] | undefined;
845
+ available: boolean;
846
+ asOf: string;
847
+ version: number;
848
+ period: {
849
+ startsAt: string;
850
+ endsAt: string;
851
+ };
852
+ totals: {
853
+ calls: number;
854
+ spend: number;
855
+ costPerCall: number | null;
856
+ };
857
+ rules: {
858
+ calls: number;
859
+ spend: number;
860
+ costPerCall: number | null;
861
+ share: number;
862
+ id: number;
863
+ kind: string;
864
+ position: number | null;
865
+ routes: {
866
+ calls: number;
867
+ spend: number;
868
+ costPerCall: number | null;
869
+ share: number;
870
+ routeId: string;
871
+ }[];
872
+ }[];
873
+ routes: {
874
+ calls: number;
875
+ spend: number;
876
+ costPerCall: number | null;
877
+ share: number;
878
+ id: string;
879
+ model: string;
880
+ modelMaker: string;
881
+ reasoningEffort: string | null;
882
+ rules: {
883
+ calls: number;
884
+ spend: number;
885
+ costPerCall: number | null;
886
+ share: number;
887
+ ruleId: number;
888
+ }[];
889
+ }[];
890
+ }, CamelCaseDeep<generatedTypes.GetRoutingStrategyResultsError>>>;
891
+ export declare const getBenchmarkCandidates: (options: import("../makeEndpoint.js").ClientOption & {
892
+ query?: undefined;
893
+ body: {
894
+ dateFrom: string;
895
+ dateTo?: string | undefined;
896
+ callNames: string[];
897
+ optimizationObjectives?: generatedTypes.OptimizationObjective[] | undefined;
898
+ baselineDeployment?: {
899
+ model: string;
900
+ provider: string;
901
+ region: string;
902
+ } | null | undefined;
903
+ modelPricesPromptedByUser?: {
904
+ model: string;
905
+ inputPer1m: number;
906
+ outputPer1m: number;
907
+ }[] | undefined;
908
+ };
909
+ path?: undefined;
910
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
911
+ blockers?: string[] | undefined;
912
+ requiredCapabilities: string[];
913
+ largestCallInputTokens: number;
914
+ production: {
915
+ models: {
916
+ model: string;
917
+ provider: string;
918
+ calls: number;
919
+ inputPer1m: number | null;
920
+ outputPer1m: number | null;
921
+ }[];
922
+ modelsToPrice: string[];
923
+ singleCatalogModel: string | null;
924
+ defaultReplayDeployment: {
925
+ model: string;
926
+ provider: string;
927
+ region: string;
928
+ } | null;
929
+ };
930
+ baselineUnavailableMessage: string | null;
931
+ models: {
932
+ name: string;
933
+ builtBy: string | null;
934
+ maxInputTokens: number | null;
935
+ released: string | null;
936
+ capabilities: string[];
937
+ deployments: {
938
+ model: string;
939
+ provider: string;
940
+ region: string;
941
+ inputPer1m: number;
942
+ outputPer1m: number;
943
+ cacheReadPer1m: number | null;
944
+ missingCapabilities: string[];
945
+ recommended: boolean;
946
+ blockedFromExploration: string[];
947
+ blockedFromAlwaysBenchmark: string[];
948
+ }[];
949
+ }[];
950
+ }, CamelCaseDeep<generatedTypes.GetBenchmarkCandidatesError>>>;
951
+ export declare const getEvaluator: (options: import("../makeEndpoint.js").ClientOption & {
952
+ query: {
953
+ evaluatorId: number;
954
+ };
955
+ body?: undefined;
956
+ path?: undefined;
957
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
958
+ blockers?: string[] | undefined;
959
+ evaluatorId: number;
960
+ name: string;
961
+ kind: string;
962
+ instruction: string;
963
+ builtin: boolean;
964
+ alwaysUsed: boolean;
965
+ inLibrary: boolean;
966
+ generated: boolean;
967
+ }, CamelCaseDeep<generatedTypes.GetEvaluatorError>>>;
968
+ export declare const deleteEvaluator: (options: import("../makeEndpoint.js").ClientOption & {
969
+ query: {
970
+ evaluatorId: number;
971
+ };
972
+ body?: undefined;
973
+ path?: undefined;
974
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
975
+ blockers?: string[] | undefined;
976
+ evaluatorId: number;
977
+ deleted: boolean;
978
+ }, CamelCaseDeep<generatedTypes.DeleteEvaluatorError>>>;
979
+ export declare const getEvaluators: (options: import("../makeEndpoint.js").ClientOption & {
980
+ query?: {
981
+ cursor?: string | null | undefined;
982
+ limit?: number | undefined;
983
+ } | undefined;
984
+ body?: undefined;
985
+ path?: undefined;
986
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
987
+ blockers?: string[] | undefined;
988
+ evaluators: {
989
+ evaluatorId: number;
990
+ name: string;
991
+ kind: string;
992
+ instruction: string;
993
+ builtin: boolean;
994
+ alwaysUsed: boolean;
995
+ inLibrary: boolean;
996
+ generated: boolean;
997
+ }[];
998
+ nextCursor: string | null;
999
+ hasMore: boolean;
1000
+ }, CamelCaseDeep<generatedTypes.GetEvaluatorsError>>>;
1001
+ export declare const setEvaluator: (options: import("../makeEndpoint.js").ClientOption & {
1002
+ query?: undefined;
1003
+ body: {
1004
+ evaluatorId?: number | null | undefined;
1005
+ name?: string | null | undefined;
1006
+ kind?: generatedTypes.EvaluatorKind | null | undefined;
1007
+ instruction?: string | null | undefined;
1008
+ inLibrary?: boolean | null | undefined;
1009
+ userEmail?: string | null | undefined;
1010
+ };
1011
+ path?: undefined;
1012
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1013
+ blockers?: string[] | undefined;
1014
+ evaluatorId: number;
1015
+ name: string;
1016
+ kind: string;
1017
+ instruction: string;
1018
+ builtin: boolean;
1019
+ alwaysUsed: boolean;
1020
+ inLibrary: boolean;
1021
+ generated: boolean;
1022
+ url: string;
1023
+ recordedForEmail: string | null;
1024
+ }, CamelCaseDeep<generatedTypes.SetEvaluatorError>>>;
1025
+ export declare const generateEvaluators: (options: import("../makeEndpoint.js").ClientOption & {
1026
+ query?: undefined;
1027
+ body: {
1028
+ benchmarkUuid?: string | null | undefined;
1029
+ description?: string | null | undefined;
1030
+ userEmail?: string | null | undefined;
1031
+ };
1032
+ path?: undefined;
1033
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1034
+ blockers?: string[] | undefined;
1035
+ evaluators: {
1036
+ evaluatorId: number;
1037
+ name: string;
1038
+ kind: string;
1039
+ instruction: string;
1040
+ builtin: boolean;
1041
+ alwaysUsed: boolean;
1042
+ inLibrary: boolean;
1043
+ generated: boolean;
1044
+ }[];
1045
+ instruction: string | null;
1046
+ url: string | null;
1047
+ recordedForEmail: string | null;
1048
+ }, CamelCaseDeep<generatedTypes.GenerateEvaluatorsError>>>;
1049
+ export declare const testEvaluator: (options: import("../makeEndpoint.js").ClientOption & {
1050
+ query?: undefined;
1051
+ body: {
1052
+ kind: generatedTypes.EvaluatorKind;
1053
+ instruction: string;
1054
+ callName: string;
1055
+ candidateDeployment: {
1056
+ model: string;
1057
+ provider: string;
1058
+ region: string;
1059
+ };
1060
+ baselineDeployment?: {
1061
+ model: string;
1062
+ provider: string;
1063
+ region: string;
1064
+ } | null | undefined;
1065
+ };
1066
+ path?: undefined;
1067
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1068
+ blockers?: string[] | undefined;
1069
+ callId: string;
1070
+ candidateOutput: string;
1071
+ baselineOutput: string | null;
1072
+ verdict: string;
1073
+ justification: string;
1074
+ }, CamelCaseDeep<generatedTypes.TestEvaluatorError>>>;
1075
+ export declare const importPastData: (options: import("../makeEndpoint.js").ClientOption & {
1076
+ query?: undefined;
1077
+ body: {
1078
+ calls: {
1079
+ callName: string;
1080
+ input: {
1081
+ [x: string]: unknown;
1082
+ } | {
1083
+ [x: string]: unknown;
1084
+ }[];
1085
+ output?: string | {
1086
+ [x: string]: unknown;
1087
+ } | null | undefined;
1088
+ timestamp: string;
1089
+ modelName: string;
1090
+ provider?: string | null | undefined;
1091
+ inputTokens: number;
1092
+ outputTokens: number;
1093
+ customerName?: string | null | undefined;
1094
+ runTags?: {
1095
+ [x: string]: string | number | boolean;
1096
+ } | null | undefined;
1097
+ }[];
1098
+ };
1099
+ path?: undefined;
1100
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1101
+ blockers?: string[] | undefined;
1102
+ importedCallCount: number;
1103
+ skippedRowCount: number;
1104
+ }, CamelCaseDeep<generatedTypes.ImportPastDataError>>>;
1105
+ export declare const getBenchmark: (options: import("../makeEndpoint.js").ClientOption & {
1106
+ query: {
1107
+ benchmarkUuid: string;
1108
+ estimate?: boolean | undefined;
1109
+ reports?: boolean | undefined;
1110
+ suggestedRoutingStrategies?: boolean | undefined;
1111
+ };
1112
+ body?: undefined;
1113
+ path?: undefined;
1114
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1115
+ blockers?: string[] | undefined;
1116
+ benchmarkUuid: string;
1117
+ url: string;
1118
+ name: string;
1119
+ status: string;
1120
+ message: string;
1121
+ callNames: string[];
1122
+ optimizationObjectives: string[];
1123
+ period: {
1124
+ dateFrom: string;
1125
+ dateTo: string;
1126
+ };
1127
+ requestedAt: string | null;
1128
+ startedAt: string | null;
1129
+ completedAt: string | null;
1130
+ updatedAt: string;
1131
+ estimatedCost: number;
1132
+ actualCost: number | null;
1133
+ creditReserved: number;
1134
+ setup: {
1135
+ deployments: {
1136
+ model: string;
1137
+ provider: string;
1138
+ region: string;
1139
+ }[];
1140
+ forcedDeployments: {
1141
+ model: string;
1142
+ provider: string;
1143
+ region: string;
1144
+ }[];
1145
+ evaluatorsImpactingBenchmark: number[];
1146
+ evaluatorsForReference: number[];
1147
+ config: {
1148
+ optimizationObjectives: string[];
1149
+ period: {
1150
+ dateFrom: string;
1151
+ dateTo: string;
1152
+ };
1153
+ examples: number;
1154
+ validationExamples: number;
1155
+ replays: number;
1156
+ sampling: string;
1157
+ baselineDeployment: {
1158
+ model: string;
1159
+ provider: string;
1160
+ region: string;
1161
+ } | null;
1162
+ productionModelReplayDeployment: {
1163
+ model: string;
1164
+ provider: string;
1165
+ region: string;
1166
+ } | null;
1167
+ modelPricesPromptedByUser: {
1168
+ model: string;
1169
+ inputPer1m: number;
1170
+ outputPer1m: number;
1171
+ }[];
1172
+ maskPii: boolean;
1173
+ autoDisallowTooCostlyReasoningEfforts: boolean;
1174
+ };
1175
+ };
1176
+ baseline: {
1177
+ name: string;
1178
+ provider: string;
1179
+ } | null;
1180
+ recommendations: {
1181
+ objective: string;
1182
+ recommended: {
1183
+ name: string;
1184
+ provider: string;
1185
+ }[];
1186
+ }[];
1187
+ overpricedReasoningEfforts: {
1188
+ model: string;
1189
+ reasoningEffort: string;
1190
+ }[];
1191
+ estimate: {
1192
+ runsCost: number;
1193
+ baselineCost: number;
1194
+ judgeCost: number;
1195
+ estimatedCost: number;
1196
+ creditToReserve: number;
1197
+ availableCredit: number;
1198
+ enoughCredit: boolean;
1199
+ } | null;
1200
+ report: {
1201
+ features: string;
1202
+ examples: number;
1203
+ exploreExamples: number;
1204
+ exploredModels: number;
1205
+ callsPerMonth: number;
1206
+ cost: number;
1207
+ evaluators: {
1208
+ id: string;
1209
+ name: string;
1210
+ kind: string;
1211
+ instruction: string;
1212
+ priority: string;
1213
+ }[];
1214
+ objectives: {
1215
+ optimizationObjective: string;
1216
+ recommendation: {
1217
+ costPerRun: number;
1218
+ quality: {
1219
+ [x: string]: unknown;
1220
+ betterPct?: number | null | undefined;
1221
+ samePct: number;
1222
+ worsePct: number;
1223
+ sameOrBetterPct: number;
1224
+ };
1225
+ monthlyCost: number;
1226
+ baselineMonthlyCost: number;
1227
+ monthlySavings: number;
1228
+ savingsPct: number;
1229
+ } | null;
1230
+ validation: {
1231
+ numBetter: number;
1232
+ numSame: number;
1233
+ numWorse: number;
1234
+ } | null;
1235
+ models: {
1236
+ name: string;
1237
+ provider: string;
1238
+ baseline: boolean;
1239
+ fullRun: boolean;
1240
+ reasoningEffort: string | null;
1241
+ costPerRun: number;
1242
+ latencyMs: number | null;
1243
+ outputTokensPerRun: number | null;
1244
+ reasoningTokensPerRun: number | null;
1245
+ inputPer1m: number | null;
1246
+ outputPer1m: number | null;
1247
+ quality: {
1248
+ [x: string]: unknown;
1249
+ betterPct?: number | null | undefined;
1250
+ samePct: number;
1251
+ worsePct: number;
1252
+ sameOrBetterPct: number;
1253
+ } | null;
1254
+ qualityByEvaluator: {
1255
+ [x: string]: {
1256
+ [x: string]: unknown;
1257
+ betterPct?: number | null | undefined;
1258
+ samePct: number;
1259
+ worsePct: number;
1260
+ sameOrBetterPct: number;
1261
+ };
1262
+ };
1263
+ mix: {
1264
+ share: number | null;
1265
+ numCalls: number | null;
1266
+ costPerRun: number | null;
1267
+ quality: {
1268
+ [x: string]: unknown;
1269
+ betterPct?: number | null | undefined;
1270
+ samePct: number;
1271
+ worsePct: number;
1272
+ sameOrBetterPct: number;
1273
+ } | null;
1274
+ reasoningEfforts: (string | null)[];
1275
+ } | null;
1276
+ }[];
1277
+ }[];
1278
+ } | null;
1279
+ suggestedRoutingStrategies: {
1280
+ routableModels: {
1281
+ name: string;
1282
+ provider: string;
1283
+ baseline: boolean;
1284
+ recommendedFor: string[];
1285
+ costPerRun: number;
1286
+ quality: {
1287
+ [x: string]: unknown;
1288
+ betterPct?: number | null | undefined;
1289
+ samePct: number;
1290
+ worsePct: number;
1291
+ sameOrBetterPct: number;
1292
+ } | null;
1293
+ userCacheBreakpoints: "kept" | "replaced" | null;
1294
+ }[];
1295
+ objectives: {
1296
+ objective: string;
1297
+ ran: boolean;
1298
+ offeredObjective: string;
1299
+ models: {
1300
+ name: string;
1301
+ provider: string;
1302
+ baseline: boolean;
1303
+ inMix: boolean;
1304
+ predictedShare: number | null;
1305
+ costPerRun: number;
1306
+ quality: {
1307
+ [x: string]: unknown;
1308
+ betterPct?: number | null | undefined;
1309
+ samePct: number;
1310
+ worsePct: number;
1311
+ sameOrBetterPct: number;
1312
+ } | null;
1313
+ routedReasoningEfforts: (string | null)[];
1314
+ }[];
1315
+ defaultModelOrder: string[];
1316
+ monthlyCost: {
1317
+ baseline: number;
1318
+ strategy: number;
1319
+ } | null;
1320
+ notSelectable: {
1321
+ deployments: {
1322
+ model: string;
1323
+ provider: string;
1324
+ region: string;
1325
+ }[];
1326
+ reason: string;
1327
+ }[];
1328
+ document: {
1329
+ name: string;
1330
+ slug?: string | undefined;
1331
+ allowedDeployments: {
1332
+ model: string;
1333
+ provider: string;
1334
+ region: string;
1335
+ }[];
1336
+ globalRule: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
1337
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
1338
+ fallback?: {
1339
+ retryAttempts?: number | undefined;
1340
+ strategy?: "default" | "unavailable" | "unhealthy" | undefined;
1341
+ } | undefined;
1342
+ overrideRules?: ({
1343
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
1344
+ allowedDeployments: {
1345
+ model: string;
1346
+ provider: string;
1347
+ region: string;
1348
+ }[];
1349
+ excludedCustomers?: string[] | undefined;
1350
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
1351
+ triggersWhen: "above" | "below";
1352
+ thresholdValue: number;
1353
+ thresholdUnit: "pct" | "usd";
1354
+ type: "customer_cost";
1355
+ spendPeriod: "month" | "day";
1356
+ } | {
1357
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
1358
+ allowedDeployments: {
1359
+ model: string;
1360
+ provider: string;
1361
+ region: string;
1362
+ }[];
1363
+ excludedCustomers?: string[] | undefined;
1364
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
1365
+ type: "customer_selection";
1366
+ includedCustomers: string[];
1367
+ } | {
1368
+ objective: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | "fixed_order";
1369
+ allowedDeployments: {
1370
+ model: string;
1371
+ provider: string;
1372
+ region: string;
1373
+ }[];
1374
+ excludedCustomers?: string[] | undefined;
1375
+ switchFromCachedModelOrCheaperBetterModelCondition?: "never" | "same_or_better_quality_is_unlikely" | "best_quality_is_unlikely" | "anytime" | null | undefined;
1376
+ triggersWhen: "above" | "below";
1377
+ thresholdValue: number;
1378
+ thresholdUnit: "pct" | "usd";
1379
+ type: "margin";
1380
+ })[] | undefined;
1381
+ selfHeal: boolean;
1382
+ applyAutoCachingFromBenchmark?: boolean | undefined;
1383
+ benchmarkSource?: {
1384
+ benchmarkUuid: string;
1385
+ } | null | undefined;
1386
+ } | null;
1387
+ }[];
1388
+ } | null;
1389
+ }, CamelCaseDeep<generatedTypes.GetBenchmarkError>>>;
1390
+ export declare const getBenchmarkExamples: (options: import("../makeEndpoint.js").ClientOption & {
1391
+ query: {
1392
+ benchmarkUuid: string;
1393
+ optimizationObjective?: "same_quality_lowest_cost" | "same_cost_best_quality" | "best_quality" | null | undefined;
1394
+ exampleId?: string | null | undefined;
1395
+ search?: string | undefined;
1396
+ cursor?: string | null | undefined;
1397
+ limit?: number | undefined;
1398
+ };
1399
+ body?: undefined;
1400
+ path?: undefined;
1401
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1402
+ blockers?: string[] | undefined;
1403
+ examples: {
1404
+ id: string;
1405
+ customerName: string;
1406
+ timestamp: string;
1407
+ verdicts: {
1408
+ [x: string]: {
1409
+ [x: string]: string;
1410
+ };
1411
+ };
1412
+ model?: string | null | undefined;
1413
+ isBaselineModelPick?: boolean | null | undefined;
1414
+ reasoningEffort?: string | null | undefined;
1415
+ }[];
1416
+ example: {
1417
+ [x: string]: unknown;
1418
+ } | null;
1419
+ nextCursor: string | null;
1420
+ hasMore: boolean;
1421
+ }, CamelCaseDeep<generatedTypes.GetBenchmarkExamplesError>>>;
1422
+ export declare const deleteBenchmark: (options: import("../makeEndpoint.js").ClientOption & {
1423
+ query: {
1424
+ benchmarkUuid: string;
1425
+ };
1426
+ body?: undefined;
1427
+ path?: undefined;
1428
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1429
+ blockers?: string[] | undefined;
1430
+ benchmarkUuid: string;
1431
+ deleted: boolean;
1432
+ }, CamelCaseDeep<generatedTypes.DeleteBenchmarkError>>>;
1433
+ export declare const getBenchmarks: (options: import("../makeEndpoint.js").ClientOption & {
1434
+ query?: {
1435
+ status?: "all" | "archived" | "draft" | "running" | "stopped" | "completed" | undefined;
1436
+ cursor?: string | null | undefined;
1437
+ limit?: number | undefined;
1438
+ } | undefined;
1439
+ body?: undefined;
1440
+ path?: undefined;
1441
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1442
+ benchmarks: {
1443
+ benchmarkUuid: string;
1444
+ url: string;
1445
+ name: string;
1446
+ status: string;
1447
+ requestedAt: string | null;
1448
+ startedAt: string | null;
1449
+ completedAt: string | null;
1450
+ updatedAt: string;
1451
+ estimatedCost: number;
1452
+ actualCost: number | null;
1453
+ }[];
1454
+ nextCursor: string | null;
1455
+ hasMore: boolean;
1456
+ }, CamelCaseDeep<generatedTypes.GetBenchmarksError>>>;
1457
+ export declare const setBenchmark: (options: import("../makeEndpoint.js").ClientOption & {
1458
+ query?: undefined;
1459
+ body: {
1460
+ userEmail?: string | null | undefined;
1461
+ name: string;
1462
+ callNames: string[];
1463
+ deployments?: {
1464
+ model: string;
1465
+ provider: string;
1466
+ region: string;
1467
+ }[] | undefined;
1468
+ forcedDeployments?: {
1469
+ model: string;
1470
+ provider: string;
1471
+ region: string;
1472
+ }[] | undefined;
1473
+ evaluatorsImpactingBenchmark?: number[] | undefined;
1474
+ evaluatorsForReference?: number[] | undefined;
1475
+ config: {
1476
+ optimizationObjectives?: generatedTypes.OptimizationObjective[] | undefined;
1477
+ period: {
1478
+ dateFrom: string;
1479
+ dateTo?: string | undefined;
1480
+ };
1481
+ examples?: number | undefined;
1482
+ validationExamples?: number | undefined;
1483
+ replays?: 1 | 3 | 5 | undefined;
1484
+ sampling?: generatedTypes.SamplingType | undefined;
1485
+ baselineDeployment?: {
1486
+ model: string;
1487
+ provider: string;
1488
+ region: string;
1489
+ } | null | undefined;
1490
+ productionModelReplayDeployment?: {
1491
+ model: string;
1492
+ provider: string;
1493
+ region: string;
1494
+ } | null | undefined;
1495
+ modelPricesPromptedByUser?: {
1496
+ model: string;
1497
+ inputPer1m: number;
1498
+ outputPer1m: number;
1499
+ }[] | undefined;
1500
+ maskPii?: boolean | undefined;
1501
+ autoDisallowTooCostlyReasoningEfforts?: boolean | undefined;
1502
+ };
1503
+ benchmarkUuid?: string | null | undefined;
1504
+ requestId?: string | null | undefined;
1505
+ };
1506
+ path?: undefined;
1507
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1508
+ blockers?: string[] | undefined;
1509
+ benchmarkUuid: string;
1510
+ url: string;
1511
+ name: string;
1512
+ status: string;
1513
+ message: string;
1514
+ callNames: string[];
1515
+ optimizationObjectives: string[];
1516
+ period: {
1517
+ dateFrom: string;
1518
+ dateTo: string;
1519
+ };
1520
+ requestedAt: string | null;
1521
+ startedAt: string | null;
1522
+ completedAt: string | null;
1523
+ updatedAt: string;
1524
+ estimatedCost: number;
1525
+ actualCost: number | null;
1526
+ creditReserved: number;
1527
+ setup: {
1528
+ deployments: {
1529
+ model: string;
1530
+ provider: string;
1531
+ region: string;
1532
+ }[];
1533
+ forcedDeployments: {
1534
+ model: string;
1535
+ provider: string;
1536
+ region: string;
1537
+ }[];
1538
+ evaluatorsImpactingBenchmark: number[];
1539
+ evaluatorsForReference: number[];
1540
+ config: {
1541
+ optimizationObjectives: string[];
1542
+ period: {
1543
+ dateFrom: string;
1544
+ dateTo: string;
1545
+ };
1546
+ examples: number;
1547
+ validationExamples: number;
1548
+ replays: number;
1549
+ sampling: string;
1550
+ baselineDeployment: {
1551
+ model: string;
1552
+ provider: string;
1553
+ region: string;
1554
+ } | null;
1555
+ productionModelReplayDeployment: {
1556
+ model: string;
1557
+ provider: string;
1558
+ region: string;
1559
+ } | null;
1560
+ modelPricesPromptedByUser: {
1561
+ model: string;
1562
+ inputPer1m: number;
1563
+ outputPer1m: number;
1564
+ }[];
1565
+ maskPii: boolean;
1566
+ autoDisallowTooCostlyReasoningEfforts: boolean;
1567
+ };
1568
+ };
1569
+ baseline: {
1570
+ name: string;
1571
+ provider: string;
1572
+ } | null;
1573
+ recommendations: {
1574
+ objective: string;
1575
+ recommended: {
1576
+ name: string;
1577
+ provider: string;
1578
+ }[];
1579
+ }[];
1580
+ overpricedReasoningEfforts: {
1581
+ model: string;
1582
+ reasoningEffort: string;
1583
+ }[];
1584
+ recordedForEmail: string;
1585
+ }, CamelCaseDeep<generatedTypes.SetBenchmarkError>>>;
1586
+ export declare const startOrResumeBenchmark: (options: import("../makeEndpoint.js").ClientOption & {
1587
+ query?: undefined;
1588
+ body: {
1589
+ benchmarkUuid: string;
1590
+ acceptedEstimatedCost: number;
1591
+ disallowOverpricedReasoningEfforts?: boolean | undefined;
1592
+ };
1593
+ path?: undefined;
1594
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1595
+ blockers?: string[] | undefined;
1596
+ benchmarkUuid: string;
1597
+ url: string;
1598
+ name: string;
1599
+ status: string;
1600
+ message: string;
1601
+ callNames: string[];
1602
+ optimizationObjectives: string[];
1603
+ period: {
1604
+ dateFrom: string;
1605
+ dateTo: string;
1606
+ };
1607
+ requestedAt: string | null;
1608
+ startedAt: string | null;
1609
+ completedAt: string | null;
1610
+ updatedAt: string;
1611
+ estimatedCost: number;
1612
+ actualCost: number | null;
1613
+ creditReserved: number;
1614
+ setup: {
1615
+ deployments: {
1616
+ model: string;
1617
+ provider: string;
1618
+ region: string;
1619
+ }[];
1620
+ forcedDeployments: {
1621
+ model: string;
1622
+ provider: string;
1623
+ region: string;
1624
+ }[];
1625
+ evaluatorsImpactingBenchmark: number[];
1626
+ evaluatorsForReference: number[];
1627
+ config: {
1628
+ optimizationObjectives: string[];
1629
+ period: {
1630
+ dateFrom: string;
1631
+ dateTo: string;
1632
+ };
1633
+ examples: number;
1634
+ validationExamples: number;
1635
+ replays: number;
1636
+ sampling: string;
1637
+ baselineDeployment: {
1638
+ model: string;
1639
+ provider: string;
1640
+ region: string;
1641
+ } | null;
1642
+ productionModelReplayDeployment: {
1643
+ model: string;
1644
+ provider: string;
1645
+ region: string;
1646
+ } | null;
1647
+ modelPricesPromptedByUser: {
1648
+ model: string;
1649
+ inputPer1m: number;
1650
+ outputPer1m: number;
1651
+ }[];
1652
+ maskPii: boolean;
1653
+ autoDisallowTooCostlyReasoningEfforts: boolean;
1654
+ };
1655
+ };
1656
+ baseline: {
1657
+ name: string;
1658
+ provider: string;
1659
+ } | null;
1660
+ recommendations: {
1661
+ objective: string;
1662
+ recommended: {
1663
+ name: string;
1664
+ provider: string;
1665
+ }[];
1666
+ }[];
1667
+ overpricedReasoningEfforts: {
1668
+ model: string;
1669
+ reasoningEffort: string;
1670
+ }[];
1671
+ }, CamelCaseDeep<generatedTypes.StartOrResumeBenchmarkError>>>;
1672
+ export declare const stopBenchmark: (options: import("../makeEndpoint.js").ClientOption & {
1673
+ query?: undefined;
1674
+ body: {
1675
+ benchmarkUuid: string;
1676
+ };
1677
+ path?: undefined;
1678
+ }) => Promise<import("../makeEndpoint.js").CallResult<{
1679
+ blockers?: string[] | undefined;
1680
+ benchmarkUuid: string;
1681
+ url: string;
1682
+ name: string;
1683
+ status: string;
1684
+ message: string;
1685
+ callNames: string[];
1686
+ optimizationObjectives: string[];
1687
+ period: {
1688
+ dateFrom: string;
1689
+ dateTo: string;
1690
+ };
1691
+ requestedAt: string | null;
1692
+ startedAt: string | null;
1693
+ completedAt: string | null;
1694
+ updatedAt: string;
1695
+ estimatedCost: number;
1696
+ actualCost: number | null;
1697
+ creditReserved: number;
1698
+ setup: {
1699
+ deployments: {
1700
+ model: string;
1701
+ provider: string;
1702
+ region: string;
1703
+ }[];
1704
+ forcedDeployments: {
1705
+ model: string;
1706
+ provider: string;
1707
+ region: string;
1708
+ }[];
1709
+ evaluatorsImpactingBenchmark: number[];
1710
+ evaluatorsForReference: number[];
1711
+ config: {
1712
+ optimizationObjectives: string[];
1713
+ period: {
1714
+ dateFrom: string;
1715
+ dateTo: string;
1716
+ };
1717
+ examples: number;
1718
+ validationExamples: number;
1719
+ replays: number;
1720
+ sampling: string;
1721
+ baselineDeployment: {
1722
+ model: string;
1723
+ provider: string;
1724
+ region: string;
1725
+ } | null;
1726
+ productionModelReplayDeployment: {
1727
+ model: string;
1728
+ provider: string;
1729
+ region: string;
1730
+ } | null;
1731
+ modelPricesPromptedByUser: {
1732
+ model: string;
1733
+ inputPer1m: number;
1734
+ outputPer1m: number;
1735
+ }[];
1736
+ maskPii: boolean;
1737
+ autoDisallowTooCostlyReasoningEfforts: boolean;
1738
+ };
1739
+ };
1740
+ baseline: {
1741
+ name: string;
1742
+ provider: string;
1743
+ } | null;
1744
+ recommendations: {
1745
+ objective: string;
1746
+ recommended: {
1747
+ name: string;
1748
+ provider: string;
1749
+ }[];
1750
+ }[];
1751
+ overpricedReasoningEfforts: {
1752
+ model: string;
1753
+ reasoningEffort: string;
1754
+ }[];
1755
+ }, CamelCaseDeep<generatedTypes.StopBenchmarkError>>>;