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