@sixb/server 0.1.5 → 0.1.7

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 (74) hide show
  1. package/dist/auth/public-routes.d.ts.map +1 -1
  2. package/dist/auth/scope.d.ts +6 -2
  3. package/dist/auth/scope.d.ts.map +1 -1
  4. package/dist/files/content.d.ts +8 -0
  5. package/dist/files/content.d.ts.map +1 -1
  6. package/dist/index.js +2507 -1573
  7. package/dist/index.js.map +22 -20
  8. package/dist/models/display.d.ts +22 -0
  9. package/dist/models/display.d.ts.map +1 -0
  10. package/dist/routes/action-runs.d.ts +2 -0
  11. package/dist/routes/action-runs.d.ts.map +1 -1
  12. package/dist/routes/actions.d.ts +1 -0
  13. package/dist/routes/actions.d.ts.map +1 -1
  14. package/dist/routes/agent-api-gateway.d.ts.map +1 -1
  15. package/dist/routes/agents.d.ts +99 -89
  16. package/dist/routes/agents.d.ts.map +1 -1
  17. package/dist/routes/ai-accounting.d.ts.map +1 -1
  18. package/dist/routes/auth.d.ts +139 -15
  19. package/dist/routes/auth.d.ts.map +1 -1
  20. package/dist/routes/events.d.ts +3 -3
  21. package/dist/routes/files.d.ts +1 -0
  22. package/dist/routes/files.d.ts.map +1 -1
  23. package/dist/routes/models.d.ts +18 -1
  24. package/dist/routes/models.d.ts.map +1 -1
  25. package/dist/routes/objects.d.ts +3 -1
  26. package/dist/routes/objects.d.ts.map +1 -1
  27. package/dist/routes/pipelines.d.ts +2 -1
  28. package/dist/routes/pipelines.d.ts.map +1 -1
  29. package/dist/routes/rules.d.ts +1 -1
  30. package/dist/routes/syncs.d.ts +1 -0
  31. package/dist/routes/syncs.d.ts.map +1 -1
  32. package/dist/routes/workflows.d.ts +57 -54
  33. package/dist/routes/workflows.d.ts.map +1 -1
  34. package/dist/routes/ws/logs.d.ts +4 -4
  35. package/dist/schemas/agents.d.ts +378 -215
  36. package/dist/schemas/agents.d.ts.map +1 -1
  37. package/dist/schemas/ai-accounting.d.ts +1847 -295
  38. package/dist/schemas/ai-accounting.d.ts.map +1 -1
  39. package/dist/schemas/ai-limits.d.ts +2210 -0
  40. package/dist/schemas/ai-limits.d.ts.map +1 -0
  41. package/dist/schemas/auth.d.ts +202 -72
  42. package/dist/schemas/auth.d.ts.map +1 -1
  43. package/dist/schemas/events.d.ts +6 -6
  44. package/dist/schemas/files.d.ts +3 -0
  45. package/dist/schemas/files.d.ts.map +1 -1
  46. package/dist/schemas/models.d.ts +214 -14
  47. package/dist/schemas/models.d.ts.map +1 -1
  48. package/dist/schemas/objects.d.ts +4 -4
  49. package/dist/schemas/pipelines.d.ts +6 -6
  50. package/dist/schemas/rules.d.ts +6 -6
  51. package/dist/schemas/workflows.d.ts +196 -206
  52. package/dist/schemas/workflows.d.ts.map +1 -1
  53. package/dist/utils/http.d.ts +8 -4
  54. package/dist/utils/http.d.ts.map +1 -1
  55. package/package.json +6 -6
  56. package/src/auth/public-routes.ts +18 -0
  57. package/src/auth/scope.ts +3 -2
  58. package/src/files/content.ts +39 -6
  59. package/src/models/display.ts +91 -0
  60. package/src/routes/agent-api-gateway.ts +137 -38
  61. package/src/routes/agents.ts +58 -83
  62. package/src/routes/ai-accounting.ts +414 -23
  63. package/src/routes/auth.ts +297 -2
  64. package/src/routes/models.ts +12 -4
  65. package/src/routes/workflows.ts +3 -5
  66. package/src/routes/ws/agents.ts +17 -6
  67. package/src/schemas/agents.ts +40 -49
  68. package/src/schemas/ai-accounting.ts +88 -19
  69. package/src/schemas/ai-limits.ts +116 -0
  70. package/src/schemas/auth.ts +39 -0
  71. package/src/schemas/files.ts +1 -0
  72. package/src/schemas/models.ts +33 -5
  73. package/src/schemas/workflows.ts +0 -2
  74. package/src/utils/http.ts +33 -2
@@ -1,4 +1,14 @@
1
1
  import { z } from "zod";
2
+ export declare const AiMoneySchema: z.ZodObject<{
3
+ currency: z.ZodString;
4
+ amountNanos: z.ZodString;
5
+ }, "strip", z.ZodTypeAny, {
6
+ currency: string;
7
+ amountNanos: string;
8
+ }, {
9
+ currency: string;
10
+ amountNanos: string;
11
+ }>;
2
12
  export declare const AiAccountingBucketSchema: z.ZodEnum<["hour", "day", "week"]>;
3
13
  export declare const AiValuationStatusSchema: z.ZodEnum<["rated", "unpriceable", "unvalued"]>;
4
14
  export declare const AiAccountingRangeQuerySchema: z.ZodObject<{
@@ -9,13 +19,13 @@ export declare const AiAccountingRangeQuerySchema: z.ZodObject<{
9
19
  }, "strip", z.ZodTypeAny, {
10
20
  from: string;
11
21
  to: string;
12
- providerId?: string | undefined;
13
22
  modelId?: string | undefined;
23
+ providerId?: string | undefined;
14
24
  }, {
15
25
  from: string;
16
26
  to: string;
17
- providerId?: string | undefined;
18
27
  modelId?: string | undefined;
28
+ providerId?: string | undefined;
19
29
  }>;
20
30
  export declare const AiAccountingOverviewQuerySchema: z.ZodObject<{
21
31
  from: z.ZodString;
@@ -28,14 +38,14 @@ export declare const AiAccountingOverviewQuerySchema: z.ZodObject<{
28
38
  from: string;
29
39
  to: string;
30
40
  bucket: "hour" | "day" | "week";
31
- providerId?: string | undefined;
32
41
  modelId?: string | undefined;
42
+ providerId?: string | undefined;
33
43
  }, {
34
44
  from: string;
35
45
  to: string;
36
46
  bucket: "hour" | "day" | "week";
37
- providerId?: string | undefined;
38
47
  modelId?: string | undefined;
48
+ providerId?: string | undefined;
39
49
  }>;
40
50
  export declare const AiModelCallAccountingListQuerySchema: z.ZodObject<{
41
51
  from: z.ZodString;
@@ -52,8 +62,8 @@ export declare const AiModelCallAccountingListQuerySchema: z.ZodObject<{
52
62
  to: string;
53
63
  limit?: string | undefined;
54
64
  offset?: string | undefined;
55
- providerId?: string | undefined;
56
65
  modelId?: string | undefined;
66
+ providerId?: string | undefined;
57
67
  executionId?: string | undefined;
58
68
  valuationStatus?: "rated" | "unpriceable" | "unvalued" | undefined;
59
69
  }, {
@@ -61,21 +71,11 @@ export declare const AiModelCallAccountingListQuerySchema: z.ZodObject<{
61
71
  to: string;
62
72
  limit?: string | undefined;
63
73
  offset?: string | undefined;
64
- providerId?: string | undefined;
65
74
  modelId?: string | undefined;
75
+ providerId?: string | undefined;
66
76
  executionId?: string | undefined;
67
77
  valuationStatus?: "rated" | "unpriceable" | "unvalued" | undefined;
68
78
  }>;
69
- export declare const AiMoneySchema: z.ZodObject<{
70
- currency: z.ZodString;
71
- amountNanos: z.ZodString;
72
- }, "strip", z.ZodTypeAny, {
73
- currency: string;
74
- amountNanos: string;
75
- }, {
76
- currency: string;
77
- amountNanos: string;
78
- }>;
79
79
  export declare const AiCostSummarySchema: z.ZodObject<{
80
80
  amounts: z.ZodArray<z.ZodObject<{
81
81
  currency: z.ZodString;
@@ -412,8 +412,8 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
412
412
  providerId: z.ZodString;
413
413
  modelId: z.ZodString;
414
414
  }, "strip", z.ZodTypeAny, {
415
- providerId: string;
416
415
  modelId: string;
416
+ providerId: string;
417
417
  modelCallCount: number;
418
418
  usage: {
419
419
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -436,8 +436,8 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
436
436
  unvaluedCallCount: number;
437
437
  };
438
438
  }, {
439
- providerId: string;
440
439
  modelId: string;
440
+ providerId: string;
441
441
  modelCallCount: number;
442
442
  usage: {
443
443
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -460,7 +460,7 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
460
460
  unvaluedCallCount: number;
461
461
  };
462
462
  }>, "many">;
463
- agents: z.ZodArray<z.ZodObject<{
463
+ agents: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
464
464
  modelCallCount: z.ZodNumber;
465
465
  usage: z.ZodObject<{
466
466
  inputTokens: z.ZodOptional<z.ZodNumber>;
@@ -525,8 +525,9 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
525
525
  unvaluedCallCount: number;
526
526
  }>;
527
527
  } & {
528
- agentId: z.ZodString;
528
+ kind: z.ZodLiteral<"agent">;
529
529
  }, "strip", z.ZodTypeAny, {
530
+ kind: "agent";
530
531
  modelCallCount: number;
531
532
  usage: {
532
533
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -548,8 +549,8 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
548
549
  unpriceableCallCount: number;
549
550
  unvaluedCallCount: number;
550
551
  };
551
- agentId: string;
552
552
  }, {
553
+ kind: "agent";
553
554
  modelCallCount: number;
554
555
  usage: {
555
556
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -571,8 +572,125 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
571
572
  unpriceableCallCount: number;
572
573
  unvaluedCallCount: number;
573
574
  };
574
- agentId: string;
575
- }>, "many">;
575
+ }>, z.ZodObject<{
576
+ modelCallCount: z.ZodNumber;
577
+ usage: z.ZodObject<{
578
+ inputTokens: z.ZodOptional<z.ZodNumber>;
579
+ outputTokens: z.ZodOptional<z.ZodNumber>;
580
+ totalTokens: z.ZodOptional<z.ZodNumber>;
581
+ uncachedInputTokens: z.ZodOptional<z.ZodNumber>;
582
+ cacheReadInputTokens: z.ZodOptional<z.ZodNumber>;
583
+ cacheWriteInputTokens: z.ZodOptional<z.ZodNumber>;
584
+ textOutputTokens: z.ZodOptional<z.ZodNumber>;
585
+ reasoningOutputTokens: z.ZodOptional<z.ZodNumber>;
586
+ reportingStatus: z.ZodEnum<["complete", "partial", "unavailable"]>;
587
+ }, "strip", z.ZodTypeAny, {
588
+ reportingStatus: "complete" | "partial" | "unavailable";
589
+ inputTokens?: number | undefined;
590
+ outputTokens?: number | undefined;
591
+ totalTokens?: number | undefined;
592
+ uncachedInputTokens?: number | undefined;
593
+ cacheReadInputTokens?: number | undefined;
594
+ cacheWriteInputTokens?: number | undefined;
595
+ textOutputTokens?: number | undefined;
596
+ reasoningOutputTokens?: number | undefined;
597
+ }, {
598
+ reportingStatus: "complete" | "partial" | "unavailable";
599
+ inputTokens?: number | undefined;
600
+ outputTokens?: number | undefined;
601
+ totalTokens?: number | undefined;
602
+ uncachedInputTokens?: number | undefined;
603
+ cacheReadInputTokens?: number | undefined;
604
+ cacheWriteInputTokens?: number | undefined;
605
+ textOutputTokens?: number | undefined;
606
+ reasoningOutputTokens?: number | undefined;
607
+ }>;
608
+ costs: z.ZodObject<{
609
+ amounts: z.ZodArray<z.ZodObject<{
610
+ currency: z.ZodString;
611
+ amountNanos: z.ZodString;
612
+ }, "strip", z.ZodTypeAny, {
613
+ currency: string;
614
+ amountNanos: string;
615
+ }, {
616
+ currency: string;
617
+ amountNanos: string;
618
+ }>, "many">;
619
+ ratedCallCount: z.ZodNumber;
620
+ unpriceableCallCount: z.ZodNumber;
621
+ unvaluedCallCount: z.ZodNumber;
622
+ }, "strip", z.ZodTypeAny, {
623
+ amounts: {
624
+ currency: string;
625
+ amountNanos: string;
626
+ }[];
627
+ ratedCallCount: number;
628
+ unpriceableCallCount: number;
629
+ unvaluedCallCount: number;
630
+ }, {
631
+ amounts: {
632
+ currency: string;
633
+ amountNanos: string;
634
+ }[];
635
+ ratedCallCount: number;
636
+ unpriceableCallCount: number;
637
+ unvaluedCallCount: number;
638
+ }>;
639
+ } & {
640
+ kind: z.ZodLiteral<"workflowAgent">;
641
+ workflowId: z.ZodString;
642
+ agentStepId: z.ZodString;
643
+ }, "strip", z.ZodTypeAny, {
644
+ kind: "workflowAgent";
645
+ modelCallCount: number;
646
+ usage: {
647
+ reportingStatus: "complete" | "partial" | "unavailable";
648
+ inputTokens?: number | undefined;
649
+ outputTokens?: number | undefined;
650
+ totalTokens?: number | undefined;
651
+ uncachedInputTokens?: number | undefined;
652
+ cacheReadInputTokens?: number | undefined;
653
+ cacheWriteInputTokens?: number | undefined;
654
+ textOutputTokens?: number | undefined;
655
+ reasoningOutputTokens?: number | undefined;
656
+ };
657
+ costs: {
658
+ amounts: {
659
+ currency: string;
660
+ amountNanos: string;
661
+ }[];
662
+ ratedCallCount: number;
663
+ unpriceableCallCount: number;
664
+ unvaluedCallCount: number;
665
+ };
666
+ workflowId: string;
667
+ agentStepId: string;
668
+ }, {
669
+ kind: "workflowAgent";
670
+ modelCallCount: number;
671
+ usage: {
672
+ reportingStatus: "complete" | "partial" | "unavailable";
673
+ inputTokens?: number | undefined;
674
+ outputTokens?: number | undefined;
675
+ totalTokens?: number | undefined;
676
+ uncachedInputTokens?: number | undefined;
677
+ cacheReadInputTokens?: number | undefined;
678
+ cacheWriteInputTokens?: number | undefined;
679
+ textOutputTokens?: number | undefined;
680
+ reasoningOutputTokens?: number | undefined;
681
+ };
682
+ costs: {
683
+ amounts: {
684
+ currency: string;
685
+ amountNanos: string;
686
+ }[];
687
+ ratedCallCount: number;
688
+ unpriceableCallCount: number;
689
+ unvaluedCallCount: number;
690
+ };
691
+ workflowId: string;
692
+ agentStepId: string;
693
+ }>]>, "many">;
576
694
  workflows: z.ZodArray<z.ZodObject<{
577
695
  modelCallCount: z.ZodNumber;
578
696
  usage: z.ZodObject<{
@@ -711,7 +829,8 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
711
829
  };
712
830
  workflowId: string;
713
831
  }[];
714
- agents: {
832
+ agents: ({
833
+ kind: "agent";
715
834
  modelCallCount: number;
716
835
  usage: {
717
836
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -733,11 +852,35 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
733
852
  unpriceableCallCount: number;
734
853
  unvaluedCallCount: number;
735
854
  };
736
- agentId: string;
737
- }[];
855
+ } | {
856
+ kind: "workflowAgent";
857
+ modelCallCount: number;
858
+ usage: {
859
+ reportingStatus: "complete" | "partial" | "unavailable";
860
+ inputTokens?: number | undefined;
861
+ outputTokens?: number | undefined;
862
+ totalTokens?: number | undefined;
863
+ uncachedInputTokens?: number | undefined;
864
+ cacheReadInputTokens?: number | undefined;
865
+ cacheWriteInputTokens?: number | undefined;
866
+ textOutputTokens?: number | undefined;
867
+ reasoningOutputTokens?: number | undefined;
868
+ };
869
+ costs: {
870
+ amounts: {
871
+ currency: string;
872
+ amountNanos: string;
873
+ }[];
874
+ ratedCallCount: number;
875
+ unpriceableCallCount: number;
876
+ unvaluedCallCount: number;
877
+ };
878
+ workflowId: string;
879
+ agentStepId: string;
880
+ })[];
738
881
  models: {
739
- providerId: string;
740
882
  modelId: string;
883
+ providerId: string;
741
884
  modelCallCount: number;
742
885
  usage: {
743
886
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -838,7 +981,8 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
838
981
  };
839
982
  workflowId: string;
840
983
  }[];
841
- agents: {
984
+ agents: ({
985
+ kind: "agent";
842
986
  modelCallCount: number;
843
987
  usage: {
844
988
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -860,11 +1004,35 @@ export declare const AiAccountingOverviewResponseSchema: z.ZodObject<{
860
1004
  unpriceableCallCount: number;
861
1005
  unvaluedCallCount: number;
862
1006
  };
863
- agentId: string;
864
- }[];
1007
+ } | {
1008
+ kind: "workflowAgent";
1009
+ modelCallCount: number;
1010
+ usage: {
1011
+ reportingStatus: "complete" | "partial" | "unavailable";
1012
+ inputTokens?: number | undefined;
1013
+ outputTokens?: number | undefined;
1014
+ totalTokens?: number | undefined;
1015
+ uncachedInputTokens?: number | undefined;
1016
+ cacheReadInputTokens?: number | undefined;
1017
+ cacheWriteInputTokens?: number | undefined;
1018
+ textOutputTokens?: number | undefined;
1019
+ reasoningOutputTokens?: number | undefined;
1020
+ };
1021
+ costs: {
1022
+ amounts: {
1023
+ currency: string;
1024
+ amountNanos: string;
1025
+ }[];
1026
+ ratedCallCount: number;
1027
+ unpriceableCallCount: number;
1028
+ unvaluedCallCount: number;
1029
+ };
1030
+ workflowId: string;
1031
+ agentStepId: string;
1032
+ })[];
865
1033
  models: {
866
- providerId: string;
867
1034
  modelId: string;
1035
+ providerId: string;
868
1036
  modelCallCount: number;
869
1037
  usage: {
870
1038
  reportingStatus: "complete" | "partial" | "unavailable";
@@ -947,6 +1115,7 @@ export declare const AiPricingContextSchema: z.ZodObject<{
947
1115
  region: z.ZodOptional<z.ZodString>;
948
1116
  inferenceGeo: z.ZodOptional<z.ZodString>;
949
1117
  routedProviderId: z.ZodOptional<z.ZodString>;
1118
+ routedModelId: z.ZodOptional<z.ZodString>;
950
1119
  deploymentId: z.ZodOptional<z.ZodString>;
951
1120
  inferenceProfileId: z.ZodOptional<z.ZodString>;
952
1121
  cacheWriteTtlSeconds: z.ZodOptional<z.ZodNumber>;
@@ -958,6 +1127,7 @@ export declare const AiPricingContextSchema: z.ZodObject<{
958
1127
  region?: string | undefined;
959
1128
  inferenceGeo?: string | undefined;
960
1129
  routedProviderId?: string | undefined;
1130
+ routedModelId?: string | undefined;
961
1131
  deploymentId?: string | undefined;
962
1132
  inferenceProfileId?: string | undefined;
963
1133
  cacheWriteTtlSeconds?: number | undefined;
@@ -968,6 +1138,7 @@ export declare const AiPricingContextSchema: z.ZodObject<{
968
1138
  region?: string | undefined;
969
1139
  inferenceGeo?: string | undefined;
970
1140
  routedProviderId?: string | undefined;
1141
+ routedModelId?: string | undefined;
971
1142
  deploymentId?: string | undefined;
972
1143
  inferenceProfileId?: string | undefined;
973
1144
  cacheWriteTtlSeconds?: number | undefined;
@@ -980,8 +1151,28 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
980
1151
  callId: z.ZodString;
981
1152
  providerId: z.ZodString;
982
1153
  requestedModelId: z.ZodString;
1154
+ requestedReasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
1155
+ budgetTokens: z.ZodNumber;
1156
+ }, "strict", z.ZodTypeAny, {
1157
+ budgetTokens: number;
1158
+ }, {
1159
+ budgetTokens: number;
1160
+ }>]>>;
983
1161
  responseModelId: z.ZodOptional<z.ZodString>;
984
1162
  responseId: z.ZodString;
1163
+ providerIds: z.ZodNullable<z.ZodObject<{
1164
+ requestId: z.ZodOptional<z.ZodString>;
1165
+ responseId: z.ZodOptional<z.ZodString>;
1166
+ generationId: z.ZodOptional<z.ZodString>;
1167
+ }, "strip", z.ZodTypeAny, {
1168
+ responseId?: string | undefined;
1169
+ requestId?: string | undefined;
1170
+ generationId?: string | undefined;
1171
+ }, {
1172
+ responseId?: string | undefined;
1173
+ requestId?: string | undefined;
1174
+ generationId?: string | undefined;
1175
+ }>>;
985
1176
  usage: z.ZodObject<{
986
1177
  inputTokens: z.ZodOptional<z.ZodNumber>;
987
1178
  outputTokens: z.ZodOptional<z.ZodNumber>;
@@ -1034,8 +1225,16 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1034
1225
  callId: string;
1035
1226
  requestedModelId: string;
1036
1227
  responseId: string;
1228
+ providerIds: {
1229
+ responseId?: string | undefined;
1230
+ requestId?: string | undefined;
1231
+ generationId?: string | undefined;
1232
+ } | null;
1037
1233
  occurredAt: string;
1038
1234
  recordedAt: string;
1235
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1236
+ budgetTokens: number;
1237
+ } | undefined;
1039
1238
  responseModelId?: string | undefined;
1040
1239
  }, {
1041
1240
  id: string;
@@ -1056,62 +1255,146 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1056
1255
  callId: string;
1057
1256
  requestedModelId: string;
1058
1257
  responseId: string;
1258
+ providerIds: {
1259
+ responseId?: string | undefined;
1260
+ requestId?: string | undefined;
1261
+ generationId?: string | undefined;
1262
+ } | null;
1059
1263
  occurredAt: string;
1060
1264
  recordedAt: string;
1265
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1266
+ budgetTokens: number;
1267
+ } | undefined;
1061
1268
  responseModelId?: string | undefined;
1062
1269
  }>;
1063
1270
  attribution: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1064
1271
  kind: z.ZodLiteral<"agent">;
1065
- agentId: z.ZodString;
1066
1272
  agentRunId: z.ZodString;
1067
1273
  threadId: z.ZodString;
1068
1274
  }, "strip", z.ZodTypeAny, {
1069
1275
  kind: "agent";
1070
- agentId: string;
1071
1276
  agentRunId: string;
1072
1277
  threadId: string;
1073
1278
  }, {
1074
1279
  kind: "agent";
1075
- agentId: string;
1076
1280
  agentRunId: string;
1077
1281
  threadId: string;
1078
1282
  }>, z.ZodObject<{
1079
1283
  kind: z.ZodLiteral<"workflowAgent">;
1080
- agentId: z.ZodString;
1284
+ agentStepId: z.ZodString;
1081
1285
  nodeRunId: z.ZodString;
1082
1286
  workflowId: z.ZodString;
1083
1287
  workflowRunId: z.ZodString;
1084
1288
  }, "strip", z.ZodTypeAny, {
1085
1289
  kind: "workflowAgent";
1086
- agentId: string;
1087
1290
  workflowId: string;
1291
+ agentStepId: string;
1088
1292
  nodeRunId: string;
1089
1293
  workflowRunId: string;
1090
1294
  }, {
1091
1295
  kind: "workflowAgent";
1092
- agentId: string;
1093
1296
  workflowId: string;
1297
+ agentStepId: string;
1094
1298
  nodeRunId: string;
1095
1299
  workflowRunId: string;
1300
+ }>, z.ZodObject<{
1301
+ kind: z.ZodLiteral<"subagent">;
1302
+ subagentRunId: z.ZodString;
1303
+ parentRunId: z.ZodString;
1304
+ }, "strip", z.ZodTypeAny, {
1305
+ kind: "subagent";
1306
+ parentRunId: string;
1307
+ subagentRunId: string;
1308
+ }, {
1309
+ kind: "subagent";
1310
+ parentRunId: string;
1311
+ subagentRunId: string;
1096
1312
  }>]>>;
1097
1313
  cost: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1098
1314
  status: z.ZodLiteral<"rated">;
1099
- billingIdentity: z.ZodObject<{
1100
- providerId: z.ZodString;
1101
- modelId: z.ZodString;
1315
+ source: z.ZodEnum<["estimate", "provider", "unknown"]>;
1316
+ estimate: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1317
+ status: z.ZodLiteral<"rated">;
1318
+ money: z.ZodObject<{
1319
+ currency: z.ZodString;
1320
+ amountNanos: z.ZodString;
1321
+ }, "strip", z.ZodTypeAny, {
1322
+ currency: string;
1323
+ amountNanos: string;
1324
+ }, {
1325
+ currency: string;
1326
+ amountNanos: string;
1327
+ }>;
1328
+ components: z.ZodArray<z.ZodObject<{
1329
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
1330
+ quantity: z.ZodString;
1331
+ rateAmountNanosPerMillion: z.ZodString;
1332
+ chargeAmountNanos: z.ZodString;
1333
+ }, "strip", z.ZodTypeAny, {
1334
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1335
+ quantity: string;
1336
+ rateAmountNanosPerMillion: string;
1337
+ chargeAmountNanos: string;
1338
+ }, {
1339
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1340
+ quantity: string;
1341
+ rateAmountNanosPerMillion: string;
1342
+ chargeAmountNanos: string;
1343
+ }>, "many">;
1102
1344
  }, "strip", z.ZodTypeAny, {
1103
- providerId: string;
1104
- modelId: string;
1105
- }, {
1106
- providerId: string;
1107
- modelId: string;
1108
- }>;
1109
- pricingContext: z.ZodObject<{
1110
- serviceTier: z.ZodOptional<z.ZodString>;
1345
+ status: "rated";
1346
+ money: {
1347
+ currency: string;
1348
+ amountNanos: string;
1349
+ };
1350
+ components: {
1351
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1352
+ quantity: string;
1353
+ rateAmountNanosPerMillion: string;
1354
+ chargeAmountNanos: string;
1355
+ }[];
1356
+ }, {
1357
+ status: "rated";
1358
+ money: {
1359
+ currency: string;
1360
+ amountNanos: string;
1361
+ };
1362
+ components: {
1363
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1364
+ quantity: string;
1365
+ rateAmountNanosPerMillion: string;
1366
+ chargeAmountNanos: string;
1367
+ }[];
1368
+ }>, z.ZodObject<{
1369
+ status: z.ZodLiteral<"unpriceable">;
1370
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
1371
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
1372
+ }, "strip", z.ZodTypeAny, {
1373
+ status: "unpriceable";
1374
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1375
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1376
+ }, {
1377
+ status: "unpriceable";
1378
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1379
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1380
+ }>]>>;
1381
+ billingIdentity: z.ZodObject<{
1382
+ providerId: z.ZodString;
1383
+ modelId: z.ZodString;
1384
+ }, "strip", z.ZodTypeAny, {
1385
+ modelId: string;
1386
+ providerId: string;
1387
+ }, {
1388
+ modelId: string;
1389
+ providerId: string;
1390
+ }>;
1391
+ pricingContext: z.ZodObject<{
1392
+ serviceTier: z.ZodOptional<z.ZodString>;
1111
1393
  batch: z.ZodOptional<z.ZodBoolean>;
1112
1394
  region: z.ZodOptional<z.ZodString>;
1113
1395
  inferenceGeo: z.ZodOptional<z.ZodString>;
1114
1396
  routedProviderId: z.ZodOptional<z.ZodString>;
1397
+ routedModelId: z.ZodOptional<z.ZodString>;
1115
1398
  deploymentId: z.ZodOptional<z.ZodString>;
1116
1399
  inferenceProfileId: z.ZodOptional<z.ZodString>;
1117
1400
  cacheWriteTtlSeconds: z.ZodOptional<z.ZodNumber>;
@@ -1123,6 +1406,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1123
1406
  region?: string | undefined;
1124
1407
  inferenceGeo?: string | undefined;
1125
1408
  routedProviderId?: string | undefined;
1409
+ routedModelId?: string | undefined;
1126
1410
  deploymentId?: string | undefined;
1127
1411
  inferenceProfileId?: string | undefined;
1128
1412
  cacheWriteTtlSeconds?: number | undefined;
@@ -1133,6 +1417,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1133
1417
  region?: string | undefined;
1134
1418
  inferenceGeo?: string | undefined;
1135
1419
  routedProviderId?: string | undefined;
1420
+ routedModelId?: string | undefined;
1136
1421
  deploymentId?: string | undefined;
1137
1422
  inferenceProfileId?: string | undefined;
1138
1423
  cacheWriteTtlSeconds?: number | undefined;
@@ -1141,20 +1426,20 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1141
1426
  sourceId: z.ZodString;
1142
1427
  sourceEntryId: z.ZodString;
1143
1428
  sourceVersion: z.ZodString;
1144
- sourceUrl: z.ZodString;
1429
+ sourceUrl: z.ZodOptional<z.ZodString>;
1145
1430
  observedAt: z.ZodString;
1146
1431
  }, "strip", z.ZodTypeAny, {
1147
1432
  sourceId: string;
1148
1433
  sourceEntryId: string;
1149
1434
  sourceVersion: string;
1150
- sourceUrl: string;
1151
1435
  observedAt: string;
1436
+ sourceUrl?: string | undefined;
1152
1437
  }, {
1153
1438
  sourceId: string;
1154
1439
  sourceEntryId: string;
1155
1440
  sourceVersion: string;
1156
- sourceUrl: string;
1157
1441
  observedAt: string;
1442
+ sourceUrl?: string | undefined;
1158
1443
  }>;
1159
1444
  money: z.ZodObject<{
1160
1445
  currency: z.ZodString;
@@ -1167,17 +1452,17 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1167
1452
  amountNanos: string;
1168
1453
  }>;
1169
1454
  components: z.ZodArray<z.ZodObject<{
1170
- meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
1455
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
1171
1456
  quantity: z.ZodString;
1172
1457
  rateAmountNanosPerMillion: z.ZodString;
1173
1458
  chargeAmountNanos: z.ZodString;
1174
1459
  }, "strip", z.ZodTypeAny, {
1175
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1460
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1176
1461
  quantity: string;
1177
1462
  rateAmountNanosPerMillion: string;
1178
1463
  chargeAmountNanos: string;
1179
1464
  }, {
1180
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1465
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1181
1466
  quantity: string;
1182
1467
  rateAmountNanosPerMillion: string;
1183
1468
  chargeAmountNanos: string;
@@ -1185,9 +1470,20 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1185
1470
  ratedAt: z.ZodString;
1186
1471
  }, "strip", z.ZodTypeAny, {
1187
1472
  status: "rated";
1473
+ source: "unknown" | "provider" | "estimate";
1474
+ money: {
1475
+ currency: string;
1476
+ amountNanos: string;
1477
+ };
1478
+ components: {
1479
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1480
+ quantity: string;
1481
+ rateAmountNanosPerMillion: string;
1482
+ chargeAmountNanos: string;
1483
+ }[];
1188
1484
  billingIdentity: {
1189
- providerId: string;
1190
1485
  modelId: string;
1486
+ providerId: string;
1191
1487
  };
1192
1488
  pricingContext: {
1193
1489
  mode?: string | undefined;
@@ -1196,6 +1492,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1196
1492
  region?: string | undefined;
1197
1493
  inferenceGeo?: string | undefined;
1198
1494
  routedProviderId?: string | undefined;
1495
+ routedModelId?: string | undefined;
1199
1496
  deploymentId?: string | undefined;
1200
1497
  inferenceProfileId?: string | undefined;
1201
1498
  cacheWriteTtlSeconds?: number | undefined;
@@ -1204,25 +1501,43 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1204
1501
  sourceId: string;
1205
1502
  sourceEntryId: string;
1206
1503
  sourceVersion: string;
1207
- sourceUrl: string;
1208
1504
  observedAt: string;
1505
+ sourceUrl?: string | undefined;
1209
1506
  };
1507
+ ratedAt: string;
1508
+ estimate?: {
1509
+ status: "rated";
1510
+ money: {
1511
+ currency: string;
1512
+ amountNanos: string;
1513
+ };
1514
+ components: {
1515
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1516
+ quantity: string;
1517
+ rateAmountNanosPerMillion: string;
1518
+ chargeAmountNanos: string;
1519
+ }[];
1520
+ } | {
1521
+ status: "unpriceable";
1522
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1523
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1524
+ } | undefined;
1525
+ }, {
1526
+ status: "rated";
1527
+ source: "unknown" | "provider" | "estimate";
1210
1528
  money: {
1211
1529
  currency: string;
1212
1530
  amountNanos: string;
1213
1531
  };
1214
1532
  components: {
1215
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1533
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1216
1534
  quantity: string;
1217
1535
  rateAmountNanosPerMillion: string;
1218
1536
  chargeAmountNanos: string;
1219
1537
  }[];
1220
- ratedAt: string;
1221
- }, {
1222
- status: "rated";
1223
1538
  billingIdentity: {
1224
- providerId: string;
1225
1539
  modelId: string;
1540
+ providerId: string;
1226
1541
  };
1227
1542
  pricingContext: {
1228
1543
  mode?: string | undefined;
@@ -1231,6 +1546,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1231
1546
  region?: string | undefined;
1232
1547
  inferenceGeo?: string | undefined;
1233
1548
  routedProviderId?: string | undefined;
1549
+ routedModelId?: string | undefined;
1234
1550
  deploymentId?: string | undefined;
1235
1551
  inferenceProfileId?: string | undefined;
1236
1552
  cacheWriteTtlSeconds?: number | undefined;
@@ -1239,31 +1555,104 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1239
1555
  sourceId: string;
1240
1556
  sourceEntryId: string;
1241
1557
  sourceVersion: string;
1242
- sourceUrl: string;
1243
1558
  observedAt: string;
1559
+ sourceUrl?: string | undefined;
1244
1560
  };
1245
- money: {
1246
- currency: string;
1247
- amountNanos: string;
1248
- };
1249
- components: {
1250
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1251
- quantity: string;
1252
- rateAmountNanosPerMillion: string;
1253
- chargeAmountNanos: string;
1254
- }[];
1255
1561
  ratedAt: string;
1562
+ estimate?: {
1563
+ status: "rated";
1564
+ money: {
1565
+ currency: string;
1566
+ amountNanos: string;
1567
+ };
1568
+ components: {
1569
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1570
+ quantity: string;
1571
+ rateAmountNanosPerMillion: string;
1572
+ chargeAmountNanos: string;
1573
+ }[];
1574
+ } | {
1575
+ status: "unpriceable";
1576
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1577
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1578
+ } | undefined;
1256
1579
  }>, z.ZodObject<{
1257
1580
  status: z.ZodLiteral<"unpriceable">;
1581
+ source: z.ZodEnum<["estimate", "provider", "unknown"]>;
1582
+ estimate: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1583
+ status: z.ZodLiteral<"rated">;
1584
+ money: z.ZodObject<{
1585
+ currency: z.ZodString;
1586
+ amountNanos: z.ZodString;
1587
+ }, "strip", z.ZodTypeAny, {
1588
+ currency: string;
1589
+ amountNanos: string;
1590
+ }, {
1591
+ currency: string;
1592
+ amountNanos: string;
1593
+ }>;
1594
+ components: z.ZodArray<z.ZodObject<{
1595
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
1596
+ quantity: z.ZodString;
1597
+ rateAmountNanosPerMillion: z.ZodString;
1598
+ chargeAmountNanos: z.ZodString;
1599
+ }, "strip", z.ZodTypeAny, {
1600
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1601
+ quantity: string;
1602
+ rateAmountNanosPerMillion: string;
1603
+ chargeAmountNanos: string;
1604
+ }, {
1605
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1606
+ quantity: string;
1607
+ rateAmountNanosPerMillion: string;
1608
+ chargeAmountNanos: string;
1609
+ }>, "many">;
1610
+ }, "strip", z.ZodTypeAny, {
1611
+ status: "rated";
1612
+ money: {
1613
+ currency: string;
1614
+ amountNanos: string;
1615
+ };
1616
+ components: {
1617
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1618
+ quantity: string;
1619
+ rateAmountNanosPerMillion: string;
1620
+ chargeAmountNanos: string;
1621
+ }[];
1622
+ }, {
1623
+ status: "rated";
1624
+ money: {
1625
+ currency: string;
1626
+ amountNanos: string;
1627
+ };
1628
+ components: {
1629
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1630
+ quantity: string;
1631
+ rateAmountNanosPerMillion: string;
1632
+ chargeAmountNanos: string;
1633
+ }[];
1634
+ }>, z.ZodObject<{
1635
+ status: z.ZodLiteral<"unpriceable">;
1636
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
1637
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
1638
+ }, "strip", z.ZodTypeAny, {
1639
+ status: "unpriceable";
1640
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1641
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1642
+ }, {
1643
+ status: "unpriceable";
1644
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1645
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1646
+ }>]>>;
1258
1647
  billingIdentity: z.ZodOptional<z.ZodObject<{
1259
1648
  providerId: z.ZodString;
1260
1649
  modelId: z.ZodString;
1261
1650
  }, "strip", z.ZodTypeAny, {
1262
- providerId: string;
1263
1651
  modelId: string;
1264
- }, {
1265
1652
  providerId: string;
1653
+ }, {
1266
1654
  modelId: string;
1655
+ providerId: string;
1267
1656
  }>>;
1268
1657
  pricingContext: z.ZodObject<{
1269
1658
  serviceTier: z.ZodOptional<z.ZodString>;
@@ -1271,6 +1660,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1271
1660
  region: z.ZodOptional<z.ZodString>;
1272
1661
  inferenceGeo: z.ZodOptional<z.ZodString>;
1273
1662
  routedProviderId: z.ZodOptional<z.ZodString>;
1663
+ routedModelId: z.ZodOptional<z.ZodString>;
1274
1664
  deploymentId: z.ZodOptional<z.ZodString>;
1275
1665
  inferenceProfileId: z.ZodOptional<z.ZodString>;
1276
1666
  cacheWriteTtlSeconds: z.ZodOptional<z.ZodNumber>;
@@ -1282,6 +1672,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1282
1672
  region?: string | undefined;
1283
1673
  inferenceGeo?: string | undefined;
1284
1674
  routedProviderId?: string | undefined;
1675
+ routedModelId?: string | undefined;
1285
1676
  deploymentId?: string | undefined;
1286
1677
  inferenceProfileId?: string | undefined;
1287
1678
  cacheWriteTtlSeconds?: number | undefined;
@@ -1292,34 +1683,37 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1292
1683
  region?: string | undefined;
1293
1684
  inferenceGeo?: string | undefined;
1294
1685
  routedProviderId?: string | undefined;
1686
+ routedModelId?: string | undefined;
1295
1687
  deploymentId?: string | undefined;
1296
1688
  inferenceProfileId?: string | undefined;
1297
1689
  cacheWriteTtlSeconds?: number | undefined;
1298
1690
  }>;
1299
- priceSource: z.ZodObject<{
1691
+ priceSource: z.ZodOptional<z.ZodObject<{
1300
1692
  sourceId: z.ZodString;
1301
1693
  sourceEntryId: z.ZodString;
1302
1694
  sourceVersion: z.ZodString;
1303
- sourceUrl: z.ZodString;
1695
+ sourceUrl: z.ZodOptional<z.ZodString>;
1304
1696
  observedAt: z.ZodString;
1305
1697
  }, "strip", z.ZodTypeAny, {
1306
1698
  sourceId: string;
1307
1699
  sourceEntryId: string;
1308
1700
  sourceVersion: string;
1309
- sourceUrl: string;
1310
1701
  observedAt: string;
1702
+ sourceUrl?: string | undefined;
1311
1703
  }, {
1312
1704
  sourceId: string;
1313
1705
  sourceEntryId: string;
1314
1706
  sourceVersion: string;
1315
- sourceUrl: string;
1316
1707
  observedAt: string;
1317
- }>;
1318
- reason: z.ZodEnum<["missingBillingIdentity", "missingCatalogEntry", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
1319
- missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
1708
+ sourceUrl?: string | undefined;
1709
+ }>>;
1710
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
1711
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
1320
1712
  ratedAt: z.ZodString;
1321
1713
  }, "strip", z.ZodTypeAny, {
1322
1714
  status: "unpriceable";
1715
+ source: "unknown" | "provider" | "estimate";
1716
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1323
1717
  pricingContext: {
1324
1718
  mode?: string | undefined;
1325
1719
  serviceTier?: string | undefined;
@@ -1327,26 +1721,45 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1327
1721
  region?: string | undefined;
1328
1722
  inferenceGeo?: string | undefined;
1329
1723
  routedProviderId?: string | undefined;
1724
+ routedModelId?: string | undefined;
1330
1725
  deploymentId?: string | undefined;
1331
1726
  inferenceProfileId?: string | undefined;
1332
1727
  cacheWriteTtlSeconds?: number | undefined;
1333
1728
  };
1334
- priceSource: {
1729
+ ratedAt: string;
1730
+ estimate?: {
1731
+ status: "rated";
1732
+ money: {
1733
+ currency: string;
1734
+ amountNanos: string;
1735
+ };
1736
+ components: {
1737
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1738
+ quantity: string;
1739
+ rateAmountNanosPerMillion: string;
1740
+ chargeAmountNanos: string;
1741
+ }[];
1742
+ } | {
1743
+ status: "unpriceable";
1744
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1745
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1746
+ } | undefined;
1747
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1748
+ billingIdentity?: {
1749
+ modelId: string;
1750
+ providerId: string;
1751
+ } | undefined;
1752
+ priceSource?: {
1335
1753
  sourceId: string;
1336
1754
  sourceEntryId: string;
1337
1755
  sourceVersion: string;
1338
- sourceUrl: string;
1339
1756
  observedAt: string;
1340
- };
1341
- ratedAt: string;
1342
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1343
- billingIdentity?: {
1344
- providerId: string;
1345
- modelId: string;
1757
+ sourceUrl?: string | undefined;
1346
1758
  } | undefined;
1347
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1348
1759
  }, {
1349
1760
  status: "unpriceable";
1761
+ source: "unknown" | "provider" | "estimate";
1762
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1350
1763
  pricingContext: {
1351
1764
  mode?: string | undefined;
1352
1765
  serviceTier?: string | undefined;
@@ -1354,24 +1767,41 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1354
1767
  region?: string | undefined;
1355
1768
  inferenceGeo?: string | undefined;
1356
1769
  routedProviderId?: string | undefined;
1770
+ routedModelId?: string | undefined;
1357
1771
  deploymentId?: string | undefined;
1358
1772
  inferenceProfileId?: string | undefined;
1359
1773
  cacheWriteTtlSeconds?: number | undefined;
1360
1774
  };
1361
- priceSource: {
1775
+ ratedAt: string;
1776
+ estimate?: {
1777
+ status: "rated";
1778
+ money: {
1779
+ currency: string;
1780
+ amountNanos: string;
1781
+ };
1782
+ components: {
1783
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1784
+ quantity: string;
1785
+ rateAmountNanosPerMillion: string;
1786
+ chargeAmountNanos: string;
1787
+ }[];
1788
+ } | {
1789
+ status: "unpriceable";
1790
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1791
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1792
+ } | undefined;
1793
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1794
+ billingIdentity?: {
1795
+ modelId: string;
1796
+ providerId: string;
1797
+ } | undefined;
1798
+ priceSource?: {
1362
1799
  sourceId: string;
1363
1800
  sourceEntryId: string;
1364
1801
  sourceVersion: string;
1365
- sourceUrl: string;
1366
1802
  observedAt: string;
1367
- };
1368
- ratedAt: string;
1369
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1370
- billingIdentity?: {
1371
- providerId: string;
1372
- modelId: string;
1803
+ sourceUrl?: string | undefined;
1373
1804
  } | undefined;
1374
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1375
1805
  }>]>>;
1376
1806
  valuationStatus: z.ZodEnum<["rated", "unpriceable", "unvalued"]>;
1377
1807
  }, "strip", z.ZodTypeAny, {
@@ -1395,27 +1825,49 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1395
1825
  callId: string;
1396
1826
  requestedModelId: string;
1397
1827
  responseId: string;
1828
+ providerIds: {
1829
+ responseId?: string | undefined;
1830
+ requestId?: string | undefined;
1831
+ generationId?: string | undefined;
1832
+ } | null;
1398
1833
  occurredAt: string;
1399
1834
  recordedAt: string;
1835
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1836
+ budgetTokens: number;
1837
+ } | undefined;
1400
1838
  responseModelId?: string | undefined;
1401
1839
  };
1402
1840
  attribution?: {
1403
1841
  kind: "agent";
1404
- agentId: string;
1405
1842
  agentRunId: string;
1406
1843
  threadId: string;
1407
1844
  } | {
1408
1845
  kind: "workflowAgent";
1409
- agentId: string;
1410
1846
  workflowId: string;
1847
+ agentStepId: string;
1411
1848
  nodeRunId: string;
1412
1849
  workflowRunId: string;
1850
+ } | {
1851
+ kind: "subagent";
1852
+ parentRunId: string;
1853
+ subagentRunId: string;
1413
1854
  } | undefined;
1414
1855
  cost?: {
1415
1856
  status: "rated";
1857
+ source: "unknown" | "provider" | "estimate";
1858
+ money: {
1859
+ currency: string;
1860
+ amountNanos: string;
1861
+ };
1862
+ components: {
1863
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1864
+ quantity: string;
1865
+ rateAmountNanosPerMillion: string;
1866
+ chargeAmountNanos: string;
1867
+ }[];
1416
1868
  billingIdentity: {
1417
- providerId: string;
1418
1869
  modelId: string;
1870
+ providerId: string;
1419
1871
  };
1420
1872
  pricingContext: {
1421
1873
  mode?: string | undefined;
@@ -1424,6 +1876,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1424
1876
  region?: string | undefined;
1425
1877
  inferenceGeo?: string | undefined;
1426
1878
  routedProviderId?: string | undefined;
1879
+ routedModelId?: string | undefined;
1427
1880
  deploymentId?: string | undefined;
1428
1881
  inferenceProfileId?: string | undefined;
1429
1882
  cacheWriteTtlSeconds?: number | undefined;
@@ -1432,22 +1885,31 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1432
1885
  sourceId: string;
1433
1886
  sourceEntryId: string;
1434
1887
  sourceVersion: string;
1435
- sourceUrl: string;
1436
1888
  observedAt: string;
1889
+ sourceUrl?: string | undefined;
1437
1890
  };
1438
- money: {
1439
- currency: string;
1440
- amountNanos: string;
1441
- };
1442
- components: {
1443
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1444
- quantity: string;
1445
- rateAmountNanosPerMillion: string;
1446
- chargeAmountNanos: string;
1447
- }[];
1448
1891
  ratedAt: string;
1892
+ estimate?: {
1893
+ status: "rated";
1894
+ money: {
1895
+ currency: string;
1896
+ amountNanos: string;
1897
+ };
1898
+ components: {
1899
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1900
+ quantity: string;
1901
+ rateAmountNanosPerMillion: string;
1902
+ chargeAmountNanos: string;
1903
+ }[];
1904
+ } | {
1905
+ status: "unpriceable";
1906
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1907
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1908
+ } | undefined;
1449
1909
  } | {
1450
1910
  status: "unpriceable";
1911
+ source: "unknown" | "provider" | "estimate";
1912
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1451
1913
  pricingContext: {
1452
1914
  mode?: string | undefined;
1453
1915
  serviceTier?: string | undefined;
@@ -1455,24 +1917,41 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1455
1917
  region?: string | undefined;
1456
1918
  inferenceGeo?: string | undefined;
1457
1919
  routedProviderId?: string | undefined;
1920
+ routedModelId?: string | undefined;
1458
1921
  deploymentId?: string | undefined;
1459
1922
  inferenceProfileId?: string | undefined;
1460
1923
  cacheWriteTtlSeconds?: number | undefined;
1461
1924
  };
1462
- priceSource: {
1925
+ ratedAt: string;
1926
+ estimate?: {
1927
+ status: "rated";
1928
+ money: {
1929
+ currency: string;
1930
+ amountNanos: string;
1931
+ };
1932
+ components: {
1933
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1934
+ quantity: string;
1935
+ rateAmountNanosPerMillion: string;
1936
+ chargeAmountNanos: string;
1937
+ }[];
1938
+ } | {
1939
+ status: "unpriceable";
1940
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1941
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1942
+ } | undefined;
1943
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1944
+ billingIdentity?: {
1945
+ modelId: string;
1946
+ providerId: string;
1947
+ } | undefined;
1948
+ priceSource?: {
1463
1949
  sourceId: string;
1464
1950
  sourceEntryId: string;
1465
1951
  sourceVersion: string;
1466
- sourceUrl: string;
1467
1952
  observedAt: string;
1468
- };
1469
- ratedAt: string;
1470
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1471
- billingIdentity?: {
1472
- providerId: string;
1473
- modelId: string;
1953
+ sourceUrl?: string | undefined;
1474
1954
  } | undefined;
1475
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1476
1955
  } | undefined;
1477
1956
  }, {
1478
1957
  valuationStatus: "rated" | "unpriceable" | "unvalued";
@@ -1495,27 +1974,49 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1495
1974
  callId: string;
1496
1975
  requestedModelId: string;
1497
1976
  responseId: string;
1977
+ providerIds: {
1978
+ responseId?: string | undefined;
1979
+ requestId?: string | undefined;
1980
+ generationId?: string | undefined;
1981
+ } | null;
1498
1982
  occurredAt: string;
1499
1983
  recordedAt: string;
1984
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
1985
+ budgetTokens: number;
1986
+ } | undefined;
1500
1987
  responseModelId?: string | undefined;
1501
1988
  };
1502
1989
  attribution?: {
1503
1990
  kind: "agent";
1504
- agentId: string;
1505
1991
  agentRunId: string;
1506
1992
  threadId: string;
1507
1993
  } | {
1508
1994
  kind: "workflowAgent";
1509
- agentId: string;
1510
1995
  workflowId: string;
1996
+ agentStepId: string;
1511
1997
  nodeRunId: string;
1512
1998
  workflowRunId: string;
1999
+ } | {
2000
+ kind: "subagent";
2001
+ parentRunId: string;
2002
+ subagentRunId: string;
1513
2003
  } | undefined;
1514
2004
  cost?: {
1515
2005
  status: "rated";
2006
+ source: "unknown" | "provider" | "estimate";
2007
+ money: {
2008
+ currency: string;
2009
+ amountNanos: string;
2010
+ };
2011
+ components: {
2012
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2013
+ quantity: string;
2014
+ rateAmountNanosPerMillion: string;
2015
+ chargeAmountNanos: string;
2016
+ }[];
1516
2017
  billingIdentity: {
1517
- providerId: string;
1518
2018
  modelId: string;
2019
+ providerId: string;
1519
2020
  };
1520
2021
  pricingContext: {
1521
2022
  mode?: string | undefined;
@@ -1524,6 +2025,7 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1524
2025
  region?: string | undefined;
1525
2026
  inferenceGeo?: string | undefined;
1526
2027
  routedProviderId?: string | undefined;
2028
+ routedModelId?: string | undefined;
1527
2029
  deploymentId?: string | undefined;
1528
2030
  inferenceProfileId?: string | undefined;
1529
2031
  cacheWriteTtlSeconds?: number | undefined;
@@ -1532,22 +2034,31 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1532
2034
  sourceId: string;
1533
2035
  sourceEntryId: string;
1534
2036
  sourceVersion: string;
1535
- sourceUrl: string;
1536
2037
  observedAt: string;
2038
+ sourceUrl?: string | undefined;
1537
2039
  };
1538
- money: {
1539
- currency: string;
1540
- amountNanos: string;
1541
- };
1542
- components: {
1543
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1544
- quantity: string;
1545
- rateAmountNanosPerMillion: string;
1546
- chargeAmountNanos: string;
1547
- }[];
1548
2040
  ratedAt: string;
2041
+ estimate?: {
2042
+ status: "rated";
2043
+ money: {
2044
+ currency: string;
2045
+ amountNanos: string;
2046
+ };
2047
+ components: {
2048
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2049
+ quantity: string;
2050
+ rateAmountNanosPerMillion: string;
2051
+ chargeAmountNanos: string;
2052
+ }[];
2053
+ } | {
2054
+ status: "unpriceable";
2055
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2056
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2057
+ } | undefined;
1549
2058
  } | {
1550
2059
  status: "unpriceable";
2060
+ source: "unknown" | "provider" | "estimate";
2061
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1551
2062
  pricingContext: {
1552
2063
  mode?: string | undefined;
1553
2064
  serviceTier?: string | undefined;
@@ -1555,24 +2066,41 @@ export declare const AiModelCallAccountingItemSchema: z.ZodObject<{
1555
2066
  region?: string | undefined;
1556
2067
  inferenceGeo?: string | undefined;
1557
2068
  routedProviderId?: string | undefined;
2069
+ routedModelId?: string | undefined;
1558
2070
  deploymentId?: string | undefined;
1559
2071
  inferenceProfileId?: string | undefined;
1560
2072
  cacheWriteTtlSeconds?: number | undefined;
1561
2073
  };
1562
- priceSource: {
2074
+ ratedAt: string;
2075
+ estimate?: {
2076
+ status: "rated";
2077
+ money: {
2078
+ currency: string;
2079
+ amountNanos: string;
2080
+ };
2081
+ components: {
2082
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2083
+ quantity: string;
2084
+ rateAmountNanosPerMillion: string;
2085
+ chargeAmountNanos: string;
2086
+ }[];
2087
+ } | {
2088
+ status: "unpriceable";
2089
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2090
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2091
+ } | undefined;
2092
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2093
+ billingIdentity?: {
2094
+ modelId: string;
2095
+ providerId: string;
2096
+ } | undefined;
2097
+ priceSource?: {
1563
2098
  sourceId: string;
1564
2099
  sourceEntryId: string;
1565
2100
  sourceVersion: string;
1566
- sourceUrl: string;
1567
2101
  observedAt: string;
1568
- };
1569
- ratedAt: string;
1570
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1571
- billingIdentity?: {
1572
- providerId: string;
1573
- modelId: string;
2102
+ sourceUrl?: string | undefined;
1574
2103
  } | undefined;
1575
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1576
2104
  } | undefined;
1577
2105
  }>;
1578
2106
  export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
@@ -1584,8 +2112,28 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1584
2112
  callId: z.ZodString;
1585
2113
  providerId: z.ZodString;
1586
2114
  requestedModelId: z.ZodString;
2115
+ requestedReasoning: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["provider-default", "none", "minimal", "low", "medium", "high", "xhigh", "max"]>, z.ZodObject<{
2116
+ budgetTokens: z.ZodNumber;
2117
+ }, "strict", z.ZodTypeAny, {
2118
+ budgetTokens: number;
2119
+ }, {
2120
+ budgetTokens: number;
2121
+ }>]>>;
1587
2122
  responseModelId: z.ZodOptional<z.ZodString>;
1588
2123
  responseId: z.ZodString;
2124
+ providerIds: z.ZodNullable<z.ZodObject<{
2125
+ requestId: z.ZodOptional<z.ZodString>;
2126
+ responseId: z.ZodOptional<z.ZodString>;
2127
+ generationId: z.ZodOptional<z.ZodString>;
2128
+ }, "strip", z.ZodTypeAny, {
2129
+ responseId?: string | undefined;
2130
+ requestId?: string | undefined;
2131
+ generationId?: string | undefined;
2132
+ }, {
2133
+ responseId?: string | undefined;
2134
+ requestId?: string | undefined;
2135
+ generationId?: string | undefined;
2136
+ }>>;
1589
2137
  usage: z.ZodObject<{
1590
2138
  inputTokens: z.ZodOptional<z.ZodNumber>;
1591
2139
  outputTokens: z.ZodOptional<z.ZodNumber>;
@@ -1638,8 +2186,16 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1638
2186
  callId: string;
1639
2187
  requestedModelId: string;
1640
2188
  responseId: string;
2189
+ providerIds: {
2190
+ responseId?: string | undefined;
2191
+ requestId?: string | undefined;
2192
+ generationId?: string | undefined;
2193
+ } | null;
1641
2194
  occurredAt: string;
1642
2195
  recordedAt: string;
2196
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2197
+ budgetTokens: number;
2198
+ } | undefined;
1643
2199
  responseModelId?: string | undefined;
1644
2200
  }, {
1645
2201
  id: string;
@@ -1660,55 +2216,138 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1660
2216
  callId: string;
1661
2217
  requestedModelId: string;
1662
2218
  responseId: string;
2219
+ providerIds: {
2220
+ responseId?: string | undefined;
2221
+ requestId?: string | undefined;
2222
+ generationId?: string | undefined;
2223
+ } | null;
1663
2224
  occurredAt: string;
1664
2225
  recordedAt: string;
2226
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2227
+ budgetTokens: number;
2228
+ } | undefined;
1665
2229
  responseModelId?: string | undefined;
1666
2230
  }>;
1667
2231
  attribution: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
1668
2232
  kind: z.ZodLiteral<"agent">;
1669
- agentId: z.ZodString;
1670
2233
  agentRunId: z.ZodString;
1671
2234
  threadId: z.ZodString;
1672
2235
  }, "strip", z.ZodTypeAny, {
1673
2236
  kind: "agent";
1674
- agentId: string;
1675
2237
  agentRunId: string;
1676
2238
  threadId: string;
1677
2239
  }, {
1678
2240
  kind: "agent";
1679
- agentId: string;
1680
2241
  agentRunId: string;
1681
2242
  threadId: string;
1682
2243
  }>, z.ZodObject<{
1683
2244
  kind: z.ZodLiteral<"workflowAgent">;
1684
- agentId: z.ZodString;
2245
+ agentStepId: z.ZodString;
1685
2246
  nodeRunId: z.ZodString;
1686
2247
  workflowId: z.ZodString;
1687
2248
  workflowRunId: z.ZodString;
1688
2249
  }, "strip", z.ZodTypeAny, {
1689
2250
  kind: "workflowAgent";
1690
- agentId: string;
1691
2251
  workflowId: string;
2252
+ agentStepId: string;
1692
2253
  nodeRunId: string;
1693
2254
  workflowRunId: string;
1694
2255
  }, {
1695
2256
  kind: "workflowAgent";
1696
- agentId: string;
1697
2257
  workflowId: string;
2258
+ agentStepId: string;
1698
2259
  nodeRunId: string;
1699
2260
  workflowRunId: string;
2261
+ }>, z.ZodObject<{
2262
+ kind: z.ZodLiteral<"subagent">;
2263
+ subagentRunId: z.ZodString;
2264
+ parentRunId: z.ZodString;
2265
+ }, "strip", z.ZodTypeAny, {
2266
+ kind: "subagent";
2267
+ parentRunId: string;
2268
+ subagentRunId: string;
2269
+ }, {
2270
+ kind: "subagent";
2271
+ parentRunId: string;
2272
+ subagentRunId: string;
1700
2273
  }>]>>;
1701
2274
  cost: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
1702
2275
  status: z.ZodLiteral<"rated">;
2276
+ source: z.ZodEnum<["estimate", "provider", "unknown"]>;
2277
+ estimate: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
2278
+ status: z.ZodLiteral<"rated">;
2279
+ money: z.ZodObject<{
2280
+ currency: z.ZodString;
2281
+ amountNanos: z.ZodString;
2282
+ }, "strip", z.ZodTypeAny, {
2283
+ currency: string;
2284
+ amountNanos: string;
2285
+ }, {
2286
+ currency: string;
2287
+ amountNanos: string;
2288
+ }>;
2289
+ components: z.ZodArray<z.ZodObject<{
2290
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
2291
+ quantity: z.ZodString;
2292
+ rateAmountNanosPerMillion: z.ZodString;
2293
+ chargeAmountNanos: z.ZodString;
2294
+ }, "strip", z.ZodTypeAny, {
2295
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2296
+ quantity: string;
2297
+ rateAmountNanosPerMillion: string;
2298
+ chargeAmountNanos: string;
2299
+ }, {
2300
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2301
+ quantity: string;
2302
+ rateAmountNanosPerMillion: string;
2303
+ chargeAmountNanos: string;
2304
+ }>, "many">;
2305
+ }, "strip", z.ZodTypeAny, {
2306
+ status: "rated";
2307
+ money: {
2308
+ currency: string;
2309
+ amountNanos: string;
2310
+ };
2311
+ components: {
2312
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2313
+ quantity: string;
2314
+ rateAmountNanosPerMillion: string;
2315
+ chargeAmountNanos: string;
2316
+ }[];
2317
+ }, {
2318
+ status: "rated";
2319
+ money: {
2320
+ currency: string;
2321
+ amountNanos: string;
2322
+ };
2323
+ components: {
2324
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2325
+ quantity: string;
2326
+ rateAmountNanosPerMillion: string;
2327
+ chargeAmountNanos: string;
2328
+ }[];
2329
+ }>, z.ZodObject<{
2330
+ status: z.ZodLiteral<"unpriceable">;
2331
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
2332
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
2333
+ }, "strip", z.ZodTypeAny, {
2334
+ status: "unpriceable";
2335
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2336
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2337
+ }, {
2338
+ status: "unpriceable";
2339
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2340
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2341
+ }>]>>;
1703
2342
  billingIdentity: z.ZodObject<{
1704
2343
  providerId: z.ZodString;
1705
2344
  modelId: z.ZodString;
1706
2345
  }, "strip", z.ZodTypeAny, {
1707
- providerId: string;
1708
2346
  modelId: string;
1709
- }, {
1710
2347
  providerId: string;
2348
+ }, {
1711
2349
  modelId: string;
2350
+ providerId: string;
1712
2351
  }>;
1713
2352
  pricingContext: z.ZodObject<{
1714
2353
  serviceTier: z.ZodOptional<z.ZodString>;
@@ -1716,6 +2355,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1716
2355
  region: z.ZodOptional<z.ZodString>;
1717
2356
  inferenceGeo: z.ZodOptional<z.ZodString>;
1718
2357
  routedProviderId: z.ZodOptional<z.ZodString>;
2358
+ routedModelId: z.ZodOptional<z.ZodString>;
1719
2359
  deploymentId: z.ZodOptional<z.ZodString>;
1720
2360
  inferenceProfileId: z.ZodOptional<z.ZodString>;
1721
2361
  cacheWriteTtlSeconds: z.ZodOptional<z.ZodNumber>;
@@ -1727,6 +2367,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1727
2367
  region?: string | undefined;
1728
2368
  inferenceGeo?: string | undefined;
1729
2369
  routedProviderId?: string | undefined;
2370
+ routedModelId?: string | undefined;
1730
2371
  deploymentId?: string | undefined;
1731
2372
  inferenceProfileId?: string | undefined;
1732
2373
  cacheWriteTtlSeconds?: number | undefined;
@@ -1737,6 +2378,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1737
2378
  region?: string | undefined;
1738
2379
  inferenceGeo?: string | undefined;
1739
2380
  routedProviderId?: string | undefined;
2381
+ routedModelId?: string | undefined;
1740
2382
  deploymentId?: string | undefined;
1741
2383
  inferenceProfileId?: string | undefined;
1742
2384
  cacheWriteTtlSeconds?: number | undefined;
@@ -1745,20 +2387,20 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1745
2387
  sourceId: z.ZodString;
1746
2388
  sourceEntryId: z.ZodString;
1747
2389
  sourceVersion: z.ZodString;
1748
- sourceUrl: z.ZodString;
2390
+ sourceUrl: z.ZodOptional<z.ZodString>;
1749
2391
  observedAt: z.ZodString;
1750
2392
  }, "strip", z.ZodTypeAny, {
1751
2393
  sourceId: string;
1752
2394
  sourceEntryId: string;
1753
2395
  sourceVersion: string;
1754
- sourceUrl: string;
1755
2396
  observedAt: string;
2397
+ sourceUrl?: string | undefined;
1756
2398
  }, {
1757
2399
  sourceId: string;
1758
2400
  sourceEntryId: string;
1759
2401
  sourceVersion: string;
1760
- sourceUrl: string;
1761
2402
  observedAt: string;
2403
+ sourceUrl?: string | undefined;
1762
2404
  }>;
1763
2405
  money: z.ZodObject<{
1764
2406
  currency: z.ZodString;
@@ -1771,17 +2413,17 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1771
2413
  amountNanos: string;
1772
2414
  }>;
1773
2415
  components: z.ZodArray<z.ZodObject<{
1774
- meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
2416
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
1775
2417
  quantity: z.ZodString;
1776
2418
  rateAmountNanosPerMillion: z.ZodString;
1777
2419
  chargeAmountNanos: z.ZodString;
1778
2420
  }, "strip", z.ZodTypeAny, {
1779
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2421
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1780
2422
  quantity: string;
1781
2423
  rateAmountNanosPerMillion: string;
1782
2424
  chargeAmountNanos: string;
1783
2425
  }, {
1784
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2426
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1785
2427
  quantity: string;
1786
2428
  rateAmountNanosPerMillion: string;
1787
2429
  chargeAmountNanos: string;
@@ -1789,9 +2431,20 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1789
2431
  ratedAt: z.ZodString;
1790
2432
  }, "strip", z.ZodTypeAny, {
1791
2433
  status: "rated";
2434
+ source: "unknown" | "provider" | "estimate";
2435
+ money: {
2436
+ currency: string;
2437
+ amountNanos: string;
2438
+ };
2439
+ components: {
2440
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2441
+ quantity: string;
2442
+ rateAmountNanosPerMillion: string;
2443
+ chargeAmountNanos: string;
2444
+ }[];
1792
2445
  billingIdentity: {
1793
- providerId: string;
1794
2446
  modelId: string;
2447
+ providerId: string;
1795
2448
  };
1796
2449
  pricingContext: {
1797
2450
  mode?: string | undefined;
@@ -1800,6 +2453,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1800
2453
  region?: string | undefined;
1801
2454
  inferenceGeo?: string | undefined;
1802
2455
  routedProviderId?: string | undefined;
2456
+ routedModelId?: string | undefined;
1803
2457
  deploymentId?: string | undefined;
1804
2458
  inferenceProfileId?: string | undefined;
1805
2459
  cacheWriteTtlSeconds?: number | undefined;
@@ -1808,25 +2462,43 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1808
2462
  sourceId: string;
1809
2463
  sourceEntryId: string;
1810
2464
  sourceVersion: string;
1811
- sourceUrl: string;
1812
2465
  observedAt: string;
2466
+ sourceUrl?: string | undefined;
1813
2467
  };
2468
+ ratedAt: string;
2469
+ estimate?: {
2470
+ status: "rated";
2471
+ money: {
2472
+ currency: string;
2473
+ amountNanos: string;
2474
+ };
2475
+ components: {
2476
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2477
+ quantity: string;
2478
+ rateAmountNanosPerMillion: string;
2479
+ chargeAmountNanos: string;
2480
+ }[];
2481
+ } | {
2482
+ status: "unpriceable";
2483
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2484
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2485
+ } | undefined;
2486
+ }, {
2487
+ status: "rated";
2488
+ source: "unknown" | "provider" | "estimate";
1814
2489
  money: {
1815
2490
  currency: string;
1816
2491
  amountNanos: string;
1817
2492
  };
1818
2493
  components: {
1819
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2494
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1820
2495
  quantity: string;
1821
2496
  rateAmountNanosPerMillion: string;
1822
2497
  chargeAmountNanos: string;
1823
2498
  }[];
1824
- ratedAt: string;
1825
- }, {
1826
- status: "rated";
1827
2499
  billingIdentity: {
1828
- providerId: string;
1829
2500
  modelId: string;
2501
+ providerId: string;
1830
2502
  };
1831
2503
  pricingContext: {
1832
2504
  mode?: string | undefined;
@@ -1835,6 +2507,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1835
2507
  region?: string | undefined;
1836
2508
  inferenceGeo?: string | undefined;
1837
2509
  routedProviderId?: string | undefined;
2510
+ routedModelId?: string | undefined;
1838
2511
  deploymentId?: string | undefined;
1839
2512
  inferenceProfileId?: string | undefined;
1840
2513
  cacheWriteTtlSeconds?: number | undefined;
@@ -1843,31 +2516,104 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1843
2516
  sourceId: string;
1844
2517
  sourceEntryId: string;
1845
2518
  sourceVersion: string;
1846
- sourceUrl: string;
1847
2519
  observedAt: string;
2520
+ sourceUrl?: string | undefined;
1848
2521
  };
1849
- money: {
1850
- currency: string;
1851
- amountNanos: string;
1852
- };
1853
- components: {
1854
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
1855
- quantity: string;
1856
- rateAmountNanosPerMillion: string;
1857
- chargeAmountNanos: string;
1858
- }[];
1859
2522
  ratedAt: string;
2523
+ estimate?: {
2524
+ status: "rated";
2525
+ money: {
2526
+ currency: string;
2527
+ amountNanos: string;
2528
+ };
2529
+ components: {
2530
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2531
+ quantity: string;
2532
+ rateAmountNanosPerMillion: string;
2533
+ chargeAmountNanos: string;
2534
+ }[];
2535
+ } | {
2536
+ status: "unpriceable";
2537
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2538
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2539
+ } | undefined;
1860
2540
  }>, z.ZodObject<{
1861
2541
  status: z.ZodLiteral<"unpriceable">;
2542
+ source: z.ZodEnum<["estimate", "provider", "unknown"]>;
2543
+ estimate: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
2544
+ status: z.ZodLiteral<"rated">;
2545
+ money: z.ZodObject<{
2546
+ currency: z.ZodString;
2547
+ amountNanos: z.ZodString;
2548
+ }, "strip", z.ZodTypeAny, {
2549
+ currency: string;
2550
+ amountNanos: string;
2551
+ }, {
2552
+ currency: string;
2553
+ amountNanos: string;
2554
+ }>;
2555
+ components: z.ZodArray<z.ZodObject<{
2556
+ meter: z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>;
2557
+ quantity: z.ZodString;
2558
+ rateAmountNanosPerMillion: z.ZodString;
2559
+ chargeAmountNanos: z.ZodString;
2560
+ }, "strip", z.ZodTypeAny, {
2561
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2562
+ quantity: string;
2563
+ rateAmountNanosPerMillion: string;
2564
+ chargeAmountNanos: string;
2565
+ }, {
2566
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2567
+ quantity: string;
2568
+ rateAmountNanosPerMillion: string;
2569
+ chargeAmountNanos: string;
2570
+ }>, "many">;
2571
+ }, "strip", z.ZodTypeAny, {
2572
+ status: "rated";
2573
+ money: {
2574
+ currency: string;
2575
+ amountNanos: string;
2576
+ };
2577
+ components: {
2578
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2579
+ quantity: string;
2580
+ rateAmountNanosPerMillion: string;
2581
+ chargeAmountNanos: string;
2582
+ }[];
2583
+ }, {
2584
+ status: "rated";
2585
+ money: {
2586
+ currency: string;
2587
+ amountNanos: string;
2588
+ };
2589
+ components: {
2590
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2591
+ quantity: string;
2592
+ rateAmountNanosPerMillion: string;
2593
+ chargeAmountNanos: string;
2594
+ }[];
2595
+ }>, z.ZodObject<{
2596
+ status: z.ZodLiteral<"unpriceable">;
2597
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
2598
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
2599
+ }, "strip", z.ZodTypeAny, {
2600
+ status: "unpriceable";
2601
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2602
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2603
+ }, {
2604
+ status: "unpriceable";
2605
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2606
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2607
+ }>]>>;
1862
2608
  billingIdentity: z.ZodOptional<z.ZodObject<{
1863
2609
  providerId: z.ZodString;
1864
2610
  modelId: z.ZodString;
1865
2611
  }, "strip", z.ZodTypeAny, {
1866
- providerId: string;
1867
2612
  modelId: string;
1868
- }, {
1869
2613
  providerId: string;
2614
+ }, {
1870
2615
  modelId: string;
2616
+ providerId: string;
1871
2617
  }>>;
1872
2618
  pricingContext: z.ZodObject<{
1873
2619
  serviceTier: z.ZodOptional<z.ZodString>;
@@ -1875,6 +2621,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1875
2621
  region: z.ZodOptional<z.ZodString>;
1876
2622
  inferenceGeo: z.ZodOptional<z.ZodString>;
1877
2623
  routedProviderId: z.ZodOptional<z.ZodString>;
2624
+ routedModelId: z.ZodOptional<z.ZodString>;
1878
2625
  deploymentId: z.ZodOptional<z.ZodString>;
1879
2626
  inferenceProfileId: z.ZodOptional<z.ZodString>;
1880
2627
  cacheWriteTtlSeconds: z.ZodOptional<z.ZodNumber>;
@@ -1886,6 +2633,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1886
2633
  region?: string | undefined;
1887
2634
  inferenceGeo?: string | undefined;
1888
2635
  routedProviderId?: string | undefined;
2636
+ routedModelId?: string | undefined;
1889
2637
  deploymentId?: string | undefined;
1890
2638
  inferenceProfileId?: string | undefined;
1891
2639
  cacheWriteTtlSeconds?: number | undefined;
@@ -1896,34 +2644,37 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1896
2644
  region?: string | undefined;
1897
2645
  inferenceGeo?: string | undefined;
1898
2646
  routedProviderId?: string | undefined;
2647
+ routedModelId?: string | undefined;
1899
2648
  deploymentId?: string | undefined;
1900
2649
  inferenceProfileId?: string | undefined;
1901
2650
  cacheWriteTtlSeconds?: number | undefined;
1902
2651
  }>;
1903
- priceSource: z.ZodObject<{
2652
+ priceSource: z.ZodOptional<z.ZodObject<{
1904
2653
  sourceId: z.ZodString;
1905
2654
  sourceEntryId: z.ZodString;
1906
2655
  sourceVersion: z.ZodString;
1907
- sourceUrl: z.ZodString;
2656
+ sourceUrl: z.ZodOptional<z.ZodString>;
1908
2657
  observedAt: z.ZodString;
1909
2658
  }, "strip", z.ZodTypeAny, {
1910
2659
  sourceId: string;
1911
2660
  sourceEntryId: string;
1912
2661
  sourceVersion: string;
1913
- sourceUrl: string;
1914
2662
  observedAt: string;
2663
+ sourceUrl?: string | undefined;
1915
2664
  }, {
1916
2665
  sourceId: string;
1917
2666
  sourceEntryId: string;
1918
2667
  sourceVersion: string;
1919
- sourceUrl: string;
1920
2668
  observedAt: string;
1921
- }>;
1922
- reason: z.ZodEnum<["missingBillingIdentity", "missingCatalogEntry", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
1923
- missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
2669
+ sourceUrl?: string | undefined;
2670
+ }>>;
2671
+ reason: z.ZodEnum<["missingBillingIdentity", "missingRateCard", "missingUsageMeter", "unsupportedPricingDimension", "invalidUsageForFormula"]>;
2672
+ missingMeters: z.ZodOptional<z.ZodArray<z.ZodEnum<["tokens.input.total", "tokens.input.uncached", "tokens.input.cacheRead", "tokens.input.cacheWrite", "tokens.input.cacheWrite5m", "tokens.input.cacheWrite1h", "tokens.output.total", "tokens.output.text", "tokens.output.reasoning"]>, "many">>;
1924
2673
  ratedAt: z.ZodString;
1925
2674
  }, "strip", z.ZodTypeAny, {
1926
2675
  status: "unpriceable";
2676
+ source: "unknown" | "provider" | "estimate";
2677
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1927
2678
  pricingContext: {
1928
2679
  mode?: string | undefined;
1929
2680
  serviceTier?: string | undefined;
@@ -1931,26 +2682,45 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1931
2682
  region?: string | undefined;
1932
2683
  inferenceGeo?: string | undefined;
1933
2684
  routedProviderId?: string | undefined;
2685
+ routedModelId?: string | undefined;
1934
2686
  deploymentId?: string | undefined;
1935
2687
  inferenceProfileId?: string | undefined;
1936
2688
  cacheWriteTtlSeconds?: number | undefined;
1937
2689
  };
1938
- priceSource: {
2690
+ ratedAt: string;
2691
+ estimate?: {
2692
+ status: "rated";
2693
+ money: {
2694
+ currency: string;
2695
+ amountNanos: string;
2696
+ };
2697
+ components: {
2698
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2699
+ quantity: string;
2700
+ rateAmountNanosPerMillion: string;
2701
+ chargeAmountNanos: string;
2702
+ }[];
2703
+ } | {
2704
+ status: "unpriceable";
2705
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2706
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2707
+ } | undefined;
2708
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2709
+ billingIdentity?: {
2710
+ modelId: string;
2711
+ providerId: string;
2712
+ } | undefined;
2713
+ priceSource?: {
1939
2714
  sourceId: string;
1940
2715
  sourceEntryId: string;
1941
2716
  sourceVersion: string;
1942
- sourceUrl: string;
1943
2717
  observedAt: string;
1944
- };
1945
- ratedAt: string;
1946
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1947
- billingIdentity?: {
1948
- providerId: string;
1949
- modelId: string;
2718
+ sourceUrl?: string | undefined;
1950
2719
  } | undefined;
1951
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1952
2720
  }, {
1953
2721
  status: "unpriceable";
2722
+ source: "unknown" | "provider" | "estimate";
2723
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1954
2724
  pricingContext: {
1955
2725
  mode?: string | undefined;
1956
2726
  serviceTier?: string | undefined;
@@ -1958,24 +2728,41 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1958
2728
  region?: string | undefined;
1959
2729
  inferenceGeo?: string | undefined;
1960
2730
  routedProviderId?: string | undefined;
2731
+ routedModelId?: string | undefined;
1961
2732
  deploymentId?: string | undefined;
1962
2733
  inferenceProfileId?: string | undefined;
1963
2734
  cacheWriteTtlSeconds?: number | undefined;
1964
2735
  };
1965
- priceSource: {
2736
+ ratedAt: string;
2737
+ estimate?: {
2738
+ status: "rated";
2739
+ money: {
2740
+ currency: string;
2741
+ amountNanos: string;
2742
+ };
2743
+ components: {
2744
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2745
+ quantity: string;
2746
+ rateAmountNanosPerMillion: string;
2747
+ chargeAmountNanos: string;
2748
+ }[];
2749
+ } | {
2750
+ status: "unpriceable";
2751
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2752
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2753
+ } | undefined;
2754
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2755
+ billingIdentity?: {
2756
+ modelId: string;
2757
+ providerId: string;
2758
+ } | undefined;
2759
+ priceSource?: {
1966
2760
  sourceId: string;
1967
2761
  sourceEntryId: string;
1968
2762
  sourceVersion: string;
1969
- sourceUrl: string;
1970
2763
  observedAt: string;
1971
- };
1972
- ratedAt: string;
1973
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
1974
- billingIdentity?: {
1975
- providerId: string;
1976
- modelId: string;
2764
+ sourceUrl?: string | undefined;
1977
2765
  } | undefined;
1978
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
1979
2766
  }>]>>;
1980
2767
  valuationStatus: z.ZodEnum<["rated", "unpriceable", "unvalued"]>;
1981
2768
  }, "strip", z.ZodTypeAny, {
@@ -1999,27 +2786,49 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
1999
2786
  callId: string;
2000
2787
  requestedModelId: string;
2001
2788
  responseId: string;
2789
+ providerIds: {
2790
+ responseId?: string | undefined;
2791
+ requestId?: string | undefined;
2792
+ generationId?: string | undefined;
2793
+ } | null;
2002
2794
  occurredAt: string;
2003
2795
  recordedAt: string;
2796
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2797
+ budgetTokens: number;
2798
+ } | undefined;
2004
2799
  responseModelId?: string | undefined;
2005
2800
  };
2006
2801
  attribution?: {
2007
2802
  kind: "agent";
2008
- agentId: string;
2009
2803
  agentRunId: string;
2010
2804
  threadId: string;
2011
2805
  } | {
2012
2806
  kind: "workflowAgent";
2013
- agentId: string;
2014
2807
  workflowId: string;
2808
+ agentStepId: string;
2015
2809
  nodeRunId: string;
2016
2810
  workflowRunId: string;
2811
+ } | {
2812
+ kind: "subagent";
2813
+ parentRunId: string;
2814
+ subagentRunId: string;
2017
2815
  } | undefined;
2018
2816
  cost?: {
2019
2817
  status: "rated";
2818
+ source: "unknown" | "provider" | "estimate";
2819
+ money: {
2820
+ currency: string;
2821
+ amountNanos: string;
2822
+ };
2823
+ components: {
2824
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2825
+ quantity: string;
2826
+ rateAmountNanosPerMillion: string;
2827
+ chargeAmountNanos: string;
2828
+ }[];
2020
2829
  billingIdentity: {
2021
- providerId: string;
2022
2830
  modelId: string;
2831
+ providerId: string;
2023
2832
  };
2024
2833
  pricingContext: {
2025
2834
  mode?: string | undefined;
@@ -2028,6 +2837,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2028
2837
  region?: string | undefined;
2029
2838
  inferenceGeo?: string | undefined;
2030
2839
  routedProviderId?: string | undefined;
2840
+ routedModelId?: string | undefined;
2031
2841
  deploymentId?: string | undefined;
2032
2842
  inferenceProfileId?: string | undefined;
2033
2843
  cacheWriteTtlSeconds?: number | undefined;
@@ -2036,22 +2846,31 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2036
2846
  sourceId: string;
2037
2847
  sourceEntryId: string;
2038
2848
  sourceVersion: string;
2039
- sourceUrl: string;
2040
2849
  observedAt: string;
2850
+ sourceUrl?: string | undefined;
2041
2851
  };
2042
- money: {
2043
- currency: string;
2044
- amountNanos: string;
2045
- };
2046
- components: {
2047
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2048
- quantity: string;
2049
- rateAmountNanosPerMillion: string;
2050
- chargeAmountNanos: string;
2051
- }[];
2052
2852
  ratedAt: string;
2853
+ estimate?: {
2854
+ status: "rated";
2855
+ money: {
2856
+ currency: string;
2857
+ amountNanos: string;
2858
+ };
2859
+ components: {
2860
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2861
+ quantity: string;
2862
+ rateAmountNanosPerMillion: string;
2863
+ chargeAmountNanos: string;
2864
+ }[];
2865
+ } | {
2866
+ status: "unpriceable";
2867
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2868
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2869
+ } | undefined;
2053
2870
  } | {
2054
2871
  status: "unpriceable";
2872
+ source: "unknown" | "provider" | "estimate";
2873
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2055
2874
  pricingContext: {
2056
2875
  mode?: string | undefined;
2057
2876
  serviceTier?: string | undefined;
@@ -2059,24 +2878,41 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2059
2878
  region?: string | undefined;
2060
2879
  inferenceGeo?: string | undefined;
2061
2880
  routedProviderId?: string | undefined;
2881
+ routedModelId?: string | undefined;
2062
2882
  deploymentId?: string | undefined;
2063
2883
  inferenceProfileId?: string | undefined;
2064
2884
  cacheWriteTtlSeconds?: number | undefined;
2065
2885
  };
2066
- priceSource: {
2886
+ ratedAt: string;
2887
+ estimate?: {
2888
+ status: "rated";
2889
+ money: {
2890
+ currency: string;
2891
+ amountNanos: string;
2892
+ };
2893
+ components: {
2894
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2895
+ quantity: string;
2896
+ rateAmountNanosPerMillion: string;
2897
+ chargeAmountNanos: string;
2898
+ }[];
2899
+ } | {
2900
+ status: "unpriceable";
2901
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2902
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2903
+ } | undefined;
2904
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2905
+ billingIdentity?: {
2906
+ modelId: string;
2907
+ providerId: string;
2908
+ } | undefined;
2909
+ priceSource?: {
2067
2910
  sourceId: string;
2068
2911
  sourceEntryId: string;
2069
2912
  sourceVersion: string;
2070
- sourceUrl: string;
2071
2913
  observedAt: string;
2072
- };
2073
- ratedAt: string;
2074
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2075
- billingIdentity?: {
2076
- providerId: string;
2077
- modelId: string;
2914
+ sourceUrl?: string | undefined;
2078
2915
  } | undefined;
2079
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2080
2916
  } | undefined;
2081
2917
  }, {
2082
2918
  valuationStatus: "rated" | "unpriceable" | "unvalued";
@@ -2099,27 +2935,49 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2099
2935
  callId: string;
2100
2936
  requestedModelId: string;
2101
2937
  responseId: string;
2938
+ providerIds: {
2939
+ responseId?: string | undefined;
2940
+ requestId?: string | undefined;
2941
+ generationId?: string | undefined;
2942
+ } | null;
2102
2943
  occurredAt: string;
2103
2944
  recordedAt: string;
2945
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
2946
+ budgetTokens: number;
2947
+ } | undefined;
2104
2948
  responseModelId?: string | undefined;
2105
2949
  };
2106
2950
  attribution?: {
2107
2951
  kind: "agent";
2108
- agentId: string;
2109
2952
  agentRunId: string;
2110
2953
  threadId: string;
2111
2954
  } | {
2112
2955
  kind: "workflowAgent";
2113
- agentId: string;
2114
2956
  workflowId: string;
2957
+ agentStepId: string;
2115
2958
  nodeRunId: string;
2116
2959
  workflowRunId: string;
2960
+ } | {
2961
+ kind: "subagent";
2962
+ parentRunId: string;
2963
+ subagentRunId: string;
2117
2964
  } | undefined;
2118
2965
  cost?: {
2119
2966
  status: "rated";
2967
+ source: "unknown" | "provider" | "estimate";
2968
+ money: {
2969
+ currency: string;
2970
+ amountNanos: string;
2971
+ };
2972
+ components: {
2973
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2974
+ quantity: string;
2975
+ rateAmountNanosPerMillion: string;
2976
+ chargeAmountNanos: string;
2977
+ }[];
2120
2978
  billingIdentity: {
2121
- providerId: string;
2122
2979
  modelId: string;
2980
+ providerId: string;
2123
2981
  };
2124
2982
  pricingContext: {
2125
2983
  mode?: string | undefined;
@@ -2128,6 +2986,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2128
2986
  region?: string | undefined;
2129
2987
  inferenceGeo?: string | undefined;
2130
2988
  routedProviderId?: string | undefined;
2989
+ routedModelId?: string | undefined;
2131
2990
  deploymentId?: string | undefined;
2132
2991
  inferenceProfileId?: string | undefined;
2133
2992
  cacheWriteTtlSeconds?: number | undefined;
@@ -2136,22 +2995,31 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2136
2995
  sourceId: string;
2137
2996
  sourceEntryId: string;
2138
2997
  sourceVersion: string;
2139
- sourceUrl: string;
2140
2998
  observedAt: string;
2999
+ sourceUrl?: string | undefined;
2141
3000
  };
2142
- money: {
2143
- currency: string;
2144
- amountNanos: string;
2145
- };
2146
- components: {
2147
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2148
- quantity: string;
2149
- rateAmountNanosPerMillion: string;
2150
- chargeAmountNanos: string;
2151
- }[];
2152
3001
  ratedAt: string;
3002
+ estimate?: {
3003
+ status: "rated";
3004
+ money: {
3005
+ currency: string;
3006
+ amountNanos: string;
3007
+ };
3008
+ components: {
3009
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3010
+ quantity: string;
3011
+ rateAmountNanosPerMillion: string;
3012
+ chargeAmountNanos: string;
3013
+ }[];
3014
+ } | {
3015
+ status: "unpriceable";
3016
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3017
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3018
+ } | undefined;
2153
3019
  } | {
2154
3020
  status: "unpriceable";
3021
+ source: "unknown" | "provider" | "estimate";
3022
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2155
3023
  pricingContext: {
2156
3024
  mode?: string | undefined;
2157
3025
  serviceTier?: string | undefined;
@@ -2159,24 +3027,41 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2159
3027
  region?: string | undefined;
2160
3028
  inferenceGeo?: string | undefined;
2161
3029
  routedProviderId?: string | undefined;
3030
+ routedModelId?: string | undefined;
2162
3031
  deploymentId?: string | undefined;
2163
3032
  inferenceProfileId?: string | undefined;
2164
3033
  cacheWriteTtlSeconds?: number | undefined;
2165
3034
  };
2166
- priceSource: {
3035
+ ratedAt: string;
3036
+ estimate?: {
3037
+ status: "rated";
3038
+ money: {
3039
+ currency: string;
3040
+ amountNanos: string;
3041
+ };
3042
+ components: {
3043
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3044
+ quantity: string;
3045
+ rateAmountNanosPerMillion: string;
3046
+ chargeAmountNanos: string;
3047
+ }[];
3048
+ } | {
3049
+ status: "unpriceable";
3050
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3051
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3052
+ } | undefined;
3053
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3054
+ billingIdentity?: {
3055
+ modelId: string;
3056
+ providerId: string;
3057
+ } | undefined;
3058
+ priceSource?: {
2167
3059
  sourceId: string;
2168
3060
  sourceEntryId: string;
2169
3061
  sourceVersion: string;
2170
- sourceUrl: string;
2171
3062
  observedAt: string;
2172
- };
2173
- ratedAt: string;
2174
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2175
- billingIdentity?: {
2176
- providerId: string;
2177
- modelId: string;
3063
+ sourceUrl?: string | undefined;
2178
3064
  } | undefined;
2179
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2180
3065
  } | undefined;
2181
3066
  }>, "many">;
2182
3067
  hasMore: z.ZodBoolean;
@@ -2203,27 +3088,49 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2203
3088
  callId: string;
2204
3089
  requestedModelId: string;
2205
3090
  responseId: string;
3091
+ providerIds: {
3092
+ responseId?: string | undefined;
3093
+ requestId?: string | undefined;
3094
+ generationId?: string | undefined;
3095
+ } | null;
2206
3096
  occurredAt: string;
2207
3097
  recordedAt: string;
3098
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3099
+ budgetTokens: number;
3100
+ } | undefined;
2208
3101
  responseModelId?: string | undefined;
2209
3102
  };
2210
3103
  attribution?: {
2211
3104
  kind: "agent";
2212
- agentId: string;
2213
3105
  agentRunId: string;
2214
3106
  threadId: string;
2215
3107
  } | {
2216
3108
  kind: "workflowAgent";
2217
- agentId: string;
2218
3109
  workflowId: string;
3110
+ agentStepId: string;
2219
3111
  nodeRunId: string;
2220
3112
  workflowRunId: string;
3113
+ } | {
3114
+ kind: "subagent";
3115
+ parentRunId: string;
3116
+ subagentRunId: string;
2221
3117
  } | undefined;
2222
3118
  cost?: {
2223
3119
  status: "rated";
3120
+ source: "unknown" | "provider" | "estimate";
3121
+ money: {
3122
+ currency: string;
3123
+ amountNanos: string;
3124
+ };
3125
+ components: {
3126
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3127
+ quantity: string;
3128
+ rateAmountNanosPerMillion: string;
3129
+ chargeAmountNanos: string;
3130
+ }[];
2224
3131
  billingIdentity: {
2225
- providerId: string;
2226
3132
  modelId: string;
3133
+ providerId: string;
2227
3134
  };
2228
3135
  pricingContext: {
2229
3136
  mode?: string | undefined;
@@ -2232,6 +3139,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2232
3139
  region?: string | undefined;
2233
3140
  inferenceGeo?: string | undefined;
2234
3141
  routedProviderId?: string | undefined;
3142
+ routedModelId?: string | undefined;
2235
3143
  deploymentId?: string | undefined;
2236
3144
  inferenceProfileId?: string | undefined;
2237
3145
  cacheWriteTtlSeconds?: number | undefined;
@@ -2240,22 +3148,31 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2240
3148
  sourceId: string;
2241
3149
  sourceEntryId: string;
2242
3150
  sourceVersion: string;
2243
- sourceUrl: string;
2244
3151
  observedAt: string;
3152
+ sourceUrl?: string | undefined;
2245
3153
  };
2246
- money: {
2247
- currency: string;
2248
- amountNanos: string;
2249
- };
2250
- components: {
2251
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2252
- quantity: string;
2253
- rateAmountNanosPerMillion: string;
2254
- chargeAmountNanos: string;
2255
- }[];
2256
3154
  ratedAt: string;
3155
+ estimate?: {
3156
+ status: "rated";
3157
+ money: {
3158
+ currency: string;
3159
+ amountNanos: string;
3160
+ };
3161
+ components: {
3162
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3163
+ quantity: string;
3164
+ rateAmountNanosPerMillion: string;
3165
+ chargeAmountNanos: string;
3166
+ }[];
3167
+ } | {
3168
+ status: "unpriceable";
3169
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3170
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3171
+ } | undefined;
2257
3172
  } | {
2258
3173
  status: "unpriceable";
3174
+ source: "unknown" | "provider" | "estimate";
3175
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2259
3176
  pricingContext: {
2260
3177
  mode?: string | undefined;
2261
3178
  serviceTier?: string | undefined;
@@ -2263,24 +3180,41 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2263
3180
  region?: string | undefined;
2264
3181
  inferenceGeo?: string | undefined;
2265
3182
  routedProviderId?: string | undefined;
3183
+ routedModelId?: string | undefined;
2266
3184
  deploymentId?: string | undefined;
2267
3185
  inferenceProfileId?: string | undefined;
2268
3186
  cacheWriteTtlSeconds?: number | undefined;
2269
3187
  };
2270
- priceSource: {
3188
+ ratedAt: string;
3189
+ estimate?: {
3190
+ status: "rated";
3191
+ money: {
3192
+ currency: string;
3193
+ amountNanos: string;
3194
+ };
3195
+ components: {
3196
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3197
+ quantity: string;
3198
+ rateAmountNanosPerMillion: string;
3199
+ chargeAmountNanos: string;
3200
+ }[];
3201
+ } | {
3202
+ status: "unpriceable";
3203
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3204
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3205
+ } | undefined;
3206
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3207
+ billingIdentity?: {
3208
+ modelId: string;
3209
+ providerId: string;
3210
+ } | undefined;
3211
+ priceSource?: {
2271
3212
  sourceId: string;
2272
3213
  sourceEntryId: string;
2273
3214
  sourceVersion: string;
2274
- sourceUrl: string;
2275
3215
  observedAt: string;
2276
- };
2277
- ratedAt: string;
2278
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2279
- billingIdentity?: {
2280
- providerId: string;
2281
- modelId: string;
3216
+ sourceUrl?: string | undefined;
2282
3217
  } | undefined;
2283
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
2284
3218
  } | undefined;
2285
3219
  }[];
2286
3220
  hasMore: boolean;
@@ -2307,27 +3241,49 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2307
3241
  callId: string;
2308
3242
  requestedModelId: string;
2309
3243
  responseId: string;
3244
+ providerIds: {
3245
+ responseId?: string | undefined;
3246
+ requestId?: string | undefined;
3247
+ generationId?: string | undefined;
3248
+ } | null;
2310
3249
  occurredAt: string;
2311
3250
  recordedAt: string;
3251
+ requestedReasoning?: "none" | "provider-default" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | {
3252
+ budgetTokens: number;
3253
+ } | undefined;
2312
3254
  responseModelId?: string | undefined;
2313
3255
  };
2314
3256
  attribution?: {
2315
3257
  kind: "agent";
2316
- agentId: string;
2317
3258
  agentRunId: string;
2318
3259
  threadId: string;
2319
3260
  } | {
2320
3261
  kind: "workflowAgent";
2321
- agentId: string;
2322
3262
  workflowId: string;
3263
+ agentStepId: string;
2323
3264
  nodeRunId: string;
2324
3265
  workflowRunId: string;
3266
+ } | {
3267
+ kind: "subagent";
3268
+ parentRunId: string;
3269
+ subagentRunId: string;
2325
3270
  } | undefined;
2326
3271
  cost?: {
2327
3272
  status: "rated";
2328
- billingIdentity: {
2329
- providerId: string;
2330
- modelId: string;
3273
+ source: "unknown" | "provider" | "estimate";
3274
+ money: {
3275
+ currency: string;
3276
+ amountNanos: string;
3277
+ };
3278
+ components: {
3279
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3280
+ quantity: string;
3281
+ rateAmountNanosPerMillion: string;
3282
+ chargeAmountNanos: string;
3283
+ }[];
3284
+ billingIdentity: {
3285
+ modelId: string;
3286
+ providerId: string;
2331
3287
  };
2332
3288
  pricingContext: {
2333
3289
  mode?: string | undefined;
@@ -2336,6 +3292,7 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2336
3292
  region?: string | undefined;
2337
3293
  inferenceGeo?: string | undefined;
2338
3294
  routedProviderId?: string | undefined;
3295
+ routedModelId?: string | undefined;
2339
3296
  deploymentId?: string | undefined;
2340
3297
  inferenceProfileId?: string | undefined;
2341
3298
  cacheWriteTtlSeconds?: number | undefined;
@@ -2344,22 +3301,31 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2344
3301
  sourceId: string;
2345
3302
  sourceEntryId: string;
2346
3303
  sourceVersion: string;
2347
- sourceUrl: string;
2348
3304
  observedAt: string;
3305
+ sourceUrl?: string | undefined;
2349
3306
  };
2350
- money: {
2351
- currency: string;
2352
- amountNanos: string;
2353
- };
2354
- components: {
2355
- meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
2356
- quantity: string;
2357
- rateAmountNanosPerMillion: string;
2358
- chargeAmountNanos: string;
2359
- }[];
2360
3307
  ratedAt: string;
3308
+ estimate?: {
3309
+ status: "rated";
3310
+ money: {
3311
+ currency: string;
3312
+ amountNanos: string;
3313
+ };
3314
+ components: {
3315
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3316
+ quantity: string;
3317
+ rateAmountNanosPerMillion: string;
3318
+ chargeAmountNanos: string;
3319
+ }[];
3320
+ } | {
3321
+ status: "unpriceable";
3322
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3323
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3324
+ } | undefined;
2361
3325
  } | {
2362
3326
  status: "unpriceable";
3327
+ source: "unknown" | "provider" | "estimate";
3328
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2363
3329
  pricingContext: {
2364
3330
  mode?: string | undefined;
2365
3331
  serviceTier?: string | undefined;
@@ -2367,25 +3333,611 @@ export declare const AiModelCallAccountingListResponseSchema: z.ZodObject<{
2367
3333
  region?: string | undefined;
2368
3334
  inferenceGeo?: string | undefined;
2369
3335
  routedProviderId?: string | undefined;
3336
+ routedModelId?: string | undefined;
2370
3337
  deploymentId?: string | undefined;
2371
3338
  inferenceProfileId?: string | undefined;
2372
3339
  cacheWriteTtlSeconds?: number | undefined;
2373
3340
  };
2374
- priceSource: {
3341
+ ratedAt: string;
3342
+ estimate?: {
3343
+ status: "rated";
3344
+ money: {
3345
+ currency: string;
3346
+ amountNanos: string;
3347
+ };
3348
+ components: {
3349
+ meter: "tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning";
3350
+ quantity: string;
3351
+ rateAmountNanosPerMillion: string;
3352
+ chargeAmountNanos: string;
3353
+ }[];
3354
+ } | {
3355
+ status: "unpriceable";
3356
+ reason: "missingBillingIdentity" | "missingRateCard" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
3357
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3358
+ } | undefined;
3359
+ missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.input.cacheWrite5m" | "tokens.input.cacheWrite1h" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3360
+ billingIdentity?: {
3361
+ modelId: string;
3362
+ providerId: string;
3363
+ } | undefined;
3364
+ priceSource?: {
2375
3365
  sourceId: string;
2376
3366
  sourceEntryId: string;
2377
3367
  sourceVersion: string;
2378
- sourceUrl: string;
2379
3368
  observedAt: string;
3369
+ sourceUrl?: string | undefined;
3370
+ } | undefined;
3371
+ } | undefined;
3372
+ }[];
3373
+ hasMore: boolean;
3374
+ total: number;
3375
+ }>;
3376
+ export declare const AiModelCallGroupsQuerySchema: z.ZodObject<Omit<{
3377
+ from: z.ZodString;
3378
+ to: z.ZodString;
3379
+ providerId: z.ZodOptional<z.ZodString>;
3380
+ modelId: z.ZodOptional<z.ZodString>;
3381
+ } & {
3382
+ executionId: z.ZodOptional<z.ZodString>;
3383
+ valuationStatus: z.ZodOptional<z.ZodEnum<["rated", "unpriceable", "unvalued"]>>;
3384
+ limit: z.ZodOptional<z.ZodString>;
3385
+ offset: z.ZodOptional<z.ZodString>;
3386
+ }, "executionId">, "strip", z.ZodTypeAny, {
3387
+ from: string;
3388
+ to: string;
3389
+ limit?: string | undefined;
3390
+ offset?: string | undefined;
3391
+ modelId?: string | undefined;
3392
+ providerId?: string | undefined;
3393
+ valuationStatus?: "rated" | "unpriceable" | "unvalued" | undefined;
3394
+ }, {
3395
+ from: string;
3396
+ to: string;
3397
+ limit?: string | undefined;
3398
+ offset?: string | undefined;
3399
+ modelId?: string | undefined;
3400
+ providerId?: string | undefined;
3401
+ valuationStatus?: "rated" | "unpriceable" | "unvalued" | undefined;
3402
+ }>;
3403
+ export declare const AiModelCallGroupsResponseSchema: z.ZodObject<{
3404
+ items: z.ZodArray<z.ZodObject<Omit<{
3405
+ executionId: z.ZodString;
3406
+ attribution: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3407
+ kind: z.ZodLiteral<"agent">;
3408
+ agentRunId: z.ZodString;
3409
+ threadId: z.ZodString;
3410
+ }, "strip", z.ZodTypeAny, {
3411
+ kind: "agent";
3412
+ agentRunId: string;
3413
+ threadId: string;
3414
+ }, {
3415
+ kind: "agent";
3416
+ agentRunId: string;
3417
+ threadId: string;
3418
+ }>, z.ZodObject<{
3419
+ kind: z.ZodLiteral<"workflowAgent">;
3420
+ agentStepId: z.ZodString;
3421
+ nodeRunId: z.ZodString;
3422
+ workflowId: z.ZodString;
3423
+ workflowRunId: z.ZodString;
3424
+ }, "strip", z.ZodTypeAny, {
3425
+ kind: "workflowAgent";
3426
+ workflowId: string;
3427
+ agentStepId: string;
3428
+ nodeRunId: string;
3429
+ workflowRunId: string;
3430
+ }, {
3431
+ kind: "workflowAgent";
3432
+ workflowId: string;
3433
+ agentStepId: string;
3434
+ nodeRunId: string;
3435
+ workflowRunId: string;
3436
+ }>, z.ZodObject<{
3437
+ kind: z.ZodLiteral<"subagent">;
3438
+ subagentRunId: z.ZodString;
3439
+ parentRunId: z.ZodString;
3440
+ }, "strip", z.ZodTypeAny, {
3441
+ kind: "subagent";
3442
+ parentRunId: string;
3443
+ subagentRunId: string;
3444
+ }, {
3445
+ kind: "subagent";
3446
+ parentRunId: string;
3447
+ subagentRunId: string;
3448
+ }>]>>;
3449
+ modelCallCount: z.ZodNumber;
3450
+ totalTokens: z.ZodOptional<z.ZodNumber>;
3451
+ costs: z.ZodObject<{
3452
+ amounts: z.ZodArray<z.ZodObject<{
3453
+ currency: z.ZodString;
3454
+ amountNanos: z.ZodString;
3455
+ }, "strip", z.ZodTypeAny, {
3456
+ currency: string;
3457
+ amountNanos: string;
3458
+ }, {
3459
+ currency: string;
3460
+ amountNanos: string;
3461
+ }>, "many">;
3462
+ ratedCallCount: z.ZodNumber;
3463
+ unpriceableCallCount: z.ZodNumber;
3464
+ unvaluedCallCount: z.ZodNumber;
3465
+ }, "strip", z.ZodTypeAny, {
3466
+ amounts: {
3467
+ currency: string;
3468
+ amountNanos: string;
3469
+ }[];
3470
+ ratedCallCount: number;
3471
+ unpriceableCallCount: number;
3472
+ unvaluedCallCount: number;
3473
+ }, {
3474
+ amounts: {
3475
+ currency: string;
3476
+ amountNanos: string;
3477
+ }[];
3478
+ ratedCallCount: number;
3479
+ unpriceableCallCount: number;
3480
+ unvaluedCallCount: number;
3481
+ }>;
3482
+ firstCallAt: z.ZodString;
3483
+ lastCallAt: z.ZodString;
3484
+ models: z.ZodArray<z.ZodObject<{
3485
+ providerId: z.ZodString;
3486
+ modelId: z.ZodString;
3487
+ }, "strip", z.ZodTypeAny, {
3488
+ modelId: string;
3489
+ providerId: string;
3490
+ }, {
3491
+ modelId: string;
3492
+ providerId: string;
3493
+ }>, "many">;
3494
+ /** Present only when the caller can read the initiating conversation. */
3495
+ label: z.ZodOptional<z.ZodString>;
3496
+ }, "models"> & {
3497
+ executions: z.ZodArray<z.ZodObject<{
3498
+ executionId: z.ZodString;
3499
+ attribution: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3500
+ kind: z.ZodLiteral<"agent">;
3501
+ agentRunId: z.ZodString;
3502
+ threadId: z.ZodString;
3503
+ }, "strip", z.ZodTypeAny, {
3504
+ kind: "agent";
3505
+ agentRunId: string;
3506
+ threadId: string;
3507
+ }, {
3508
+ kind: "agent";
3509
+ agentRunId: string;
3510
+ threadId: string;
3511
+ }>, z.ZodObject<{
3512
+ kind: z.ZodLiteral<"workflowAgent">;
3513
+ agentStepId: z.ZodString;
3514
+ nodeRunId: z.ZodString;
3515
+ workflowId: z.ZodString;
3516
+ workflowRunId: z.ZodString;
3517
+ }, "strip", z.ZodTypeAny, {
3518
+ kind: "workflowAgent";
3519
+ workflowId: string;
3520
+ agentStepId: string;
3521
+ nodeRunId: string;
3522
+ workflowRunId: string;
3523
+ }, {
3524
+ kind: "workflowAgent";
3525
+ workflowId: string;
3526
+ agentStepId: string;
3527
+ nodeRunId: string;
3528
+ workflowRunId: string;
3529
+ }>, z.ZodObject<{
3530
+ kind: z.ZodLiteral<"subagent">;
3531
+ subagentRunId: z.ZodString;
3532
+ parentRunId: z.ZodString;
3533
+ }, "strip", z.ZodTypeAny, {
3534
+ kind: "subagent";
3535
+ parentRunId: string;
3536
+ subagentRunId: string;
3537
+ }, {
3538
+ kind: "subagent";
3539
+ parentRunId: string;
3540
+ subagentRunId: string;
3541
+ }>]>>;
3542
+ modelCallCount: z.ZodNumber;
3543
+ totalTokens: z.ZodOptional<z.ZodNumber>;
3544
+ costs: z.ZodObject<{
3545
+ amounts: z.ZodArray<z.ZodObject<{
3546
+ currency: z.ZodString;
3547
+ amountNanos: z.ZodString;
3548
+ }, "strip", z.ZodTypeAny, {
3549
+ currency: string;
3550
+ amountNanos: string;
3551
+ }, {
3552
+ currency: string;
3553
+ amountNanos: string;
3554
+ }>, "many">;
3555
+ ratedCallCount: z.ZodNumber;
3556
+ unpriceableCallCount: z.ZodNumber;
3557
+ unvaluedCallCount: z.ZodNumber;
3558
+ }, "strip", z.ZodTypeAny, {
3559
+ amounts: {
3560
+ currency: string;
3561
+ amountNanos: string;
3562
+ }[];
3563
+ ratedCallCount: number;
3564
+ unpriceableCallCount: number;
3565
+ unvaluedCallCount: number;
3566
+ }, {
3567
+ amounts: {
3568
+ currency: string;
3569
+ amountNanos: string;
3570
+ }[];
3571
+ ratedCallCount: number;
3572
+ unpriceableCallCount: number;
3573
+ unvaluedCallCount: number;
3574
+ }>;
3575
+ firstCallAt: z.ZodString;
3576
+ lastCallAt: z.ZodString;
3577
+ models: z.ZodArray<z.ZodObject<{
3578
+ providerId: z.ZodString;
3579
+ modelId: z.ZodString;
3580
+ }, "strip", z.ZodTypeAny, {
3581
+ modelId: string;
3582
+ providerId: string;
3583
+ }, {
3584
+ modelId: string;
3585
+ providerId: string;
3586
+ }>, "many">;
3587
+ /** Present only when the caller can read the initiating conversation. */
3588
+ label: z.ZodOptional<z.ZodString>;
3589
+ }, "strip", z.ZodTypeAny, {
3590
+ models: {
3591
+ modelId: string;
3592
+ providerId: string;
3593
+ }[];
3594
+ executionId: string;
3595
+ modelCallCount: number;
3596
+ costs: {
3597
+ amounts: {
3598
+ currency: string;
3599
+ amountNanos: string;
3600
+ }[];
3601
+ ratedCallCount: number;
3602
+ unpriceableCallCount: number;
3603
+ unvaluedCallCount: number;
2380
3604
  };
2381
- ratedAt: string;
2382
- reason: "missingBillingIdentity" | "missingCatalogEntry" | "missingUsageMeter" | "unsupportedPricingDimension" | "invalidUsageForFormula";
2383
- billingIdentity?: {
3605
+ firstCallAt: string;
3606
+ lastCallAt: string;
3607
+ totalTokens?: number | undefined;
3608
+ attribution?: {
3609
+ kind: "agent";
3610
+ agentRunId: string;
3611
+ threadId: string;
3612
+ } | {
3613
+ kind: "workflowAgent";
3614
+ workflowId: string;
3615
+ agentStepId: string;
3616
+ nodeRunId: string;
3617
+ workflowRunId: string;
3618
+ } | {
3619
+ kind: "subagent";
3620
+ parentRunId: string;
3621
+ subagentRunId: string;
3622
+ } | undefined;
3623
+ label?: string | undefined;
3624
+ }, {
3625
+ models: {
3626
+ modelId: string;
2384
3627
  providerId: string;
3628
+ }[];
3629
+ executionId: string;
3630
+ modelCallCount: number;
3631
+ costs: {
3632
+ amounts: {
3633
+ currency: string;
3634
+ amountNanos: string;
3635
+ }[];
3636
+ ratedCallCount: number;
3637
+ unpriceableCallCount: number;
3638
+ unvaluedCallCount: number;
3639
+ };
3640
+ firstCallAt: string;
3641
+ lastCallAt: string;
3642
+ totalTokens?: number | undefined;
3643
+ attribution?: {
3644
+ kind: "agent";
3645
+ agentRunId: string;
3646
+ threadId: string;
3647
+ } | {
3648
+ kind: "workflowAgent";
3649
+ workflowId: string;
3650
+ agentStepId: string;
3651
+ nodeRunId: string;
3652
+ workflowRunId: string;
3653
+ } | {
3654
+ kind: "subagent";
3655
+ parentRunId: string;
3656
+ subagentRunId: string;
3657
+ } | undefined;
3658
+ label?: string | undefined;
3659
+ }>, "many">;
3660
+ canOpenThread: z.ZodBoolean;
3661
+ }, "strip", z.ZodTypeAny, {
3662
+ executionId: string;
3663
+ modelCallCount: number;
3664
+ costs: {
3665
+ amounts: {
3666
+ currency: string;
3667
+ amountNanos: string;
3668
+ }[];
3669
+ ratedCallCount: number;
3670
+ unpriceableCallCount: number;
3671
+ unvaluedCallCount: number;
3672
+ };
3673
+ firstCallAt: string;
3674
+ lastCallAt: string;
3675
+ executions: {
3676
+ models: {
2385
3677
  modelId: string;
3678
+ providerId: string;
3679
+ }[];
3680
+ executionId: string;
3681
+ modelCallCount: number;
3682
+ costs: {
3683
+ amounts: {
3684
+ currency: string;
3685
+ amountNanos: string;
3686
+ }[];
3687
+ ratedCallCount: number;
3688
+ unpriceableCallCount: number;
3689
+ unvaluedCallCount: number;
3690
+ };
3691
+ firstCallAt: string;
3692
+ lastCallAt: string;
3693
+ totalTokens?: number | undefined;
3694
+ attribution?: {
3695
+ kind: "agent";
3696
+ agentRunId: string;
3697
+ threadId: string;
3698
+ } | {
3699
+ kind: "workflowAgent";
3700
+ workflowId: string;
3701
+ agentStepId: string;
3702
+ nodeRunId: string;
3703
+ workflowRunId: string;
3704
+ } | {
3705
+ kind: "subagent";
3706
+ parentRunId: string;
3707
+ subagentRunId: string;
2386
3708
  } | undefined;
2387
- missingMeters?: ("tokens.input.total" | "tokens.input.uncached" | "tokens.input.cacheRead" | "tokens.input.cacheWrite" | "tokens.output.total" | "tokens.output.text" | "tokens.output.reasoning")[] | undefined;
3709
+ label?: string | undefined;
3710
+ }[];
3711
+ canOpenThread: boolean;
3712
+ totalTokens?: number | undefined;
3713
+ attribution?: {
3714
+ kind: "agent";
3715
+ agentRunId: string;
3716
+ threadId: string;
3717
+ } | {
3718
+ kind: "workflowAgent";
3719
+ workflowId: string;
3720
+ agentStepId: string;
3721
+ nodeRunId: string;
3722
+ workflowRunId: string;
3723
+ } | {
3724
+ kind: "subagent";
3725
+ parentRunId: string;
3726
+ subagentRunId: string;
3727
+ } | undefined;
3728
+ label?: string | undefined;
3729
+ }, {
3730
+ executionId: string;
3731
+ modelCallCount: number;
3732
+ costs: {
3733
+ amounts: {
3734
+ currency: string;
3735
+ amountNanos: string;
3736
+ }[];
3737
+ ratedCallCount: number;
3738
+ unpriceableCallCount: number;
3739
+ unvaluedCallCount: number;
3740
+ };
3741
+ firstCallAt: string;
3742
+ lastCallAt: string;
3743
+ executions: {
3744
+ models: {
3745
+ modelId: string;
3746
+ providerId: string;
3747
+ }[];
3748
+ executionId: string;
3749
+ modelCallCount: number;
3750
+ costs: {
3751
+ amounts: {
3752
+ currency: string;
3753
+ amountNanos: string;
3754
+ }[];
3755
+ ratedCallCount: number;
3756
+ unpriceableCallCount: number;
3757
+ unvaluedCallCount: number;
3758
+ };
3759
+ firstCallAt: string;
3760
+ lastCallAt: string;
3761
+ totalTokens?: number | undefined;
3762
+ attribution?: {
3763
+ kind: "agent";
3764
+ agentRunId: string;
3765
+ threadId: string;
3766
+ } | {
3767
+ kind: "workflowAgent";
3768
+ workflowId: string;
3769
+ agentStepId: string;
3770
+ nodeRunId: string;
3771
+ workflowRunId: string;
3772
+ } | {
3773
+ kind: "subagent";
3774
+ parentRunId: string;
3775
+ subagentRunId: string;
3776
+ } | undefined;
3777
+ label?: string | undefined;
3778
+ }[];
3779
+ canOpenThread: boolean;
3780
+ totalTokens?: number | undefined;
3781
+ attribution?: {
3782
+ kind: "agent";
3783
+ agentRunId: string;
3784
+ threadId: string;
3785
+ } | {
3786
+ kind: "workflowAgent";
3787
+ workflowId: string;
3788
+ agentStepId: string;
3789
+ nodeRunId: string;
3790
+ workflowRunId: string;
3791
+ } | {
3792
+ kind: "subagent";
3793
+ parentRunId: string;
3794
+ subagentRunId: string;
3795
+ } | undefined;
3796
+ label?: string | undefined;
3797
+ }>, "many">;
3798
+ total: z.ZodNumber;
3799
+ hasMore: z.ZodBoolean;
3800
+ }, "strip", z.ZodTypeAny, {
3801
+ items: {
3802
+ executionId: string;
3803
+ modelCallCount: number;
3804
+ costs: {
3805
+ amounts: {
3806
+ currency: string;
3807
+ amountNanos: string;
3808
+ }[];
3809
+ ratedCallCount: number;
3810
+ unpriceableCallCount: number;
3811
+ unvaluedCallCount: number;
3812
+ };
3813
+ firstCallAt: string;
3814
+ lastCallAt: string;
3815
+ executions: {
3816
+ models: {
3817
+ modelId: string;
3818
+ providerId: string;
3819
+ }[];
3820
+ executionId: string;
3821
+ modelCallCount: number;
3822
+ costs: {
3823
+ amounts: {
3824
+ currency: string;
3825
+ amountNanos: string;
3826
+ }[];
3827
+ ratedCallCount: number;
3828
+ unpriceableCallCount: number;
3829
+ unvaluedCallCount: number;
3830
+ };
3831
+ firstCallAt: string;
3832
+ lastCallAt: string;
3833
+ totalTokens?: number | undefined;
3834
+ attribution?: {
3835
+ kind: "agent";
3836
+ agentRunId: string;
3837
+ threadId: string;
3838
+ } | {
3839
+ kind: "workflowAgent";
3840
+ workflowId: string;
3841
+ agentStepId: string;
3842
+ nodeRunId: string;
3843
+ workflowRunId: string;
3844
+ } | {
3845
+ kind: "subagent";
3846
+ parentRunId: string;
3847
+ subagentRunId: string;
3848
+ } | undefined;
3849
+ label?: string | undefined;
3850
+ }[];
3851
+ canOpenThread: boolean;
3852
+ totalTokens?: number | undefined;
3853
+ attribution?: {
3854
+ kind: "agent";
3855
+ agentRunId: string;
3856
+ threadId: string;
3857
+ } | {
3858
+ kind: "workflowAgent";
3859
+ workflowId: string;
3860
+ agentStepId: string;
3861
+ nodeRunId: string;
3862
+ workflowRunId: string;
3863
+ } | {
3864
+ kind: "subagent";
3865
+ parentRunId: string;
3866
+ subagentRunId: string;
3867
+ } | undefined;
3868
+ label?: string | undefined;
3869
+ }[];
3870
+ hasMore: boolean;
3871
+ total: number;
3872
+ }, {
3873
+ items: {
3874
+ executionId: string;
3875
+ modelCallCount: number;
3876
+ costs: {
3877
+ amounts: {
3878
+ currency: string;
3879
+ amountNanos: string;
3880
+ }[];
3881
+ ratedCallCount: number;
3882
+ unpriceableCallCount: number;
3883
+ unvaluedCallCount: number;
3884
+ };
3885
+ firstCallAt: string;
3886
+ lastCallAt: string;
3887
+ executions: {
3888
+ models: {
3889
+ modelId: string;
3890
+ providerId: string;
3891
+ }[];
3892
+ executionId: string;
3893
+ modelCallCount: number;
3894
+ costs: {
3895
+ amounts: {
3896
+ currency: string;
3897
+ amountNanos: string;
3898
+ }[];
3899
+ ratedCallCount: number;
3900
+ unpriceableCallCount: number;
3901
+ unvaluedCallCount: number;
3902
+ };
3903
+ firstCallAt: string;
3904
+ lastCallAt: string;
3905
+ totalTokens?: number | undefined;
3906
+ attribution?: {
3907
+ kind: "agent";
3908
+ agentRunId: string;
3909
+ threadId: string;
3910
+ } | {
3911
+ kind: "workflowAgent";
3912
+ workflowId: string;
3913
+ agentStepId: string;
3914
+ nodeRunId: string;
3915
+ workflowRunId: string;
3916
+ } | {
3917
+ kind: "subagent";
3918
+ parentRunId: string;
3919
+ subagentRunId: string;
3920
+ } | undefined;
3921
+ label?: string | undefined;
3922
+ }[];
3923
+ canOpenThread: boolean;
3924
+ totalTokens?: number | undefined;
3925
+ attribution?: {
3926
+ kind: "agent";
3927
+ agentRunId: string;
3928
+ threadId: string;
3929
+ } | {
3930
+ kind: "workflowAgent";
3931
+ workflowId: string;
3932
+ agentStepId: string;
3933
+ nodeRunId: string;
3934
+ workflowRunId: string;
3935
+ } | {
3936
+ kind: "subagent";
3937
+ parentRunId: string;
3938
+ subagentRunId: string;
2388
3939
  } | undefined;
3940
+ label?: string | undefined;
2389
3941
  }[];
2390
3942
  hasMore: boolean;
2391
3943
  total: number;