@oxy.so/contracts 4.6.0 → 4.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/agency.js +49 -0
  3. package/dist/cjs/capabilityInvocation.js +173 -0
  4. package/dist/cjs/index.js +28 -1
  5. package/dist/cjs/inference/catalogue.js +11 -4
  6. package/dist/cjs/inference/decisions.js +245 -0
  7. package/dist/cjs/inference/request.js +46 -1
  8. package/dist/cjs/inference/scopedExecution.js +87 -0
  9. package/dist/cjs/inference/version.js +1 -1
  10. package/dist/esm/.tsbuildinfo +1 -1
  11. package/dist/esm/agency.js +49 -0
  12. package/dist/esm/capabilityInvocation.js +165 -0
  13. package/dist/esm/index.js +4 -0
  14. package/dist/esm/inference/catalogue.js +9 -2
  15. package/dist/esm/inference/decisions.js +239 -0
  16. package/dist/esm/inference/request.js +45 -0
  17. package/dist/esm/inference/scopedExecution.js +83 -0
  18. package/dist/esm/inference/version.js +1 -1
  19. package/dist/types/.tsbuildinfo +1 -1
  20. package/dist/types/agency.d.ts +6 -6
  21. package/dist/types/capabilityInvocation.d.ts +80 -0
  22. package/dist/types/index.d.ts +8 -0
  23. package/dist/types/inference/aliaModelRelease.d.ts +86 -86
  24. package/dist/types/inference/catalogue.d.ts +335 -142
  25. package/dist/types/inference/decisions.d.ts +1833 -0
  26. package/dist/types/inference/modelDocumentation.d.ts +236 -236
  27. package/dist/types/inference/realtime.d.ts +842 -842
  28. package/dist/types/inference/request.d.ts +3186 -419
  29. package/dist/types/inference/routingPolicy.d.ts +16 -16
  30. package/dist/types/inference/scopedExecution.d.ts +202 -0
  31. package/dist/types/inference/streamEvents.d.ts +8 -8
  32. package/dist/types/inference/usage.d.ts +4 -4
  33. package/dist/types/inference/version.d.ts +1 -1
  34. package/package.json +1 -1
@@ -263,10 +263,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
263
263
  accountId: string & z.BRAND<"OxyAccountId">;
264
264
  applicationId: string;
265
265
  };
266
- dedicatedCapacity: "disabled" | "prefer" | "require";
267
- optimiseFor: "price" | "latency" | "throughput" | "balanced";
268
266
  routingPolicyId: string;
269
267
  policyVersion: number;
268
+ dedicatedCapacity: "disabled" | "prefer" | "require";
269
+ optimiseFor: "price" | "latency" | "throughput" | "balanced";
270
270
  providerAllowlist: string[];
271
271
  providerDenylist: string[];
272
272
  allowedRegions: string[];
@@ -311,10 +311,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
311
311
  accountId: string;
312
312
  applicationId: string;
313
313
  };
314
- dedicatedCapacity: "disabled" | "prefer" | "require";
315
- optimiseFor: "price" | "latency" | "throughput" | "balanced";
316
314
  routingPolicyId: string;
317
315
  policyVersion: number;
316
+ dedicatedCapacity: "disabled" | "prefer" | "require";
317
+ optimiseFor: "price" | "latency" | "throughput" | "balanced";
318
318
  requireZeroDataRetention: boolean;
319
319
  prohibitTrainingOnCustomerData: boolean;
320
320
  oxyHostedOnly: boolean;
@@ -359,10 +359,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
359
359
  accountId: string & z.BRAND<"OxyAccountId">;
360
360
  applicationId: string;
361
361
  };
362
- dedicatedCapacity: "disabled" | "prefer" | "require";
363
- optimiseFor: "price" | "latency" | "throughput" | "balanced";
364
362
  routingPolicyId: string;
365
363
  policyVersion: number;
364
+ dedicatedCapacity: "disabled" | "prefer" | "require";
365
+ optimiseFor: "price" | "latency" | "throughput" | "balanced";
366
366
  providerAllowlist: string[];
367
367
  providerDenylist: string[];
368
368
  allowedRegions: string[];
@@ -407,10 +407,10 @@ export declare const routingPolicySchema: z.ZodEffects<z.ZodObject<{
407
407
  accountId: string;
408
408
  applicationId: string;
409
409
  };
410
- dedicatedCapacity: "disabled" | "prefer" | "require";
411
- optimiseFor: "price" | "latency" | "throughput" | "balanced";
412
410
  routingPolicyId: string;
413
411
  policyVersion: number;
412
+ dedicatedCapacity: "disabled" | "prefer" | "require";
413
+ optimiseFor: "price" | "latency" | "throughput" | "balanced";
414
414
  requireZeroDataRetention: boolean;
415
415
  prohibitTrainingOnCustomerData: boolean;
416
416
  oxyHostedOnly: boolean;
@@ -509,8 +509,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
509
509
  }, "strict", z.ZodTypeAny, {
510
510
  provider: string;
511
511
  modelReference: string;
512
- regions: string[];
513
512
  deploymentId: string;
513
+ regions: string[];
514
514
  substitution: "same_model";
515
515
  customerProviderCredential?: {
516
516
  environment: "development" | "staging" | "production";
@@ -522,8 +522,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
522
522
  }, {
523
523
  provider: string;
524
524
  modelReference: string;
525
- regions: string[];
526
525
  deploymentId: string;
526
+ regions: string[];
527
527
  substitution: "same_model";
528
528
  customerProviderCredential?: {
529
529
  environment: "development" | "staging" | "production";
@@ -562,8 +562,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
562
562
  }, "strict", z.ZodTypeAny, {
563
563
  provider: string;
564
564
  modelReference: string;
565
- regions: string[];
566
565
  deploymentId: string;
566
+ regions: string[];
567
567
  substitution: "cross_model";
568
568
  authorizedByPolicy: true;
569
569
  customerProviderCredential?: {
@@ -576,8 +576,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
576
576
  }, {
577
577
  provider: string;
578
578
  modelReference: string;
579
- regions: string[];
580
579
  deploymentId: string;
580
+ regions: string[];
581
581
  substitution: "cross_model";
582
582
  authorizedByPolicy: true;
583
583
  customerProviderCredential?: {
@@ -590,8 +590,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
590
590
  }>]>, {
591
591
  provider: string;
592
592
  modelReference: string;
593
- regions: string[];
594
593
  deploymentId: string;
594
+ regions: string[];
595
595
  substitution: "same_model";
596
596
  customerProviderCredential?: {
597
597
  environment: "development" | "staging" | "production";
@@ -603,8 +603,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
603
603
  } | {
604
604
  provider: string;
605
605
  modelReference: string;
606
- regions: string[];
607
606
  deploymentId: string;
607
+ regions: string[];
608
608
  substitution: "cross_model";
609
609
  authorizedByPolicy: true;
610
610
  customerProviderCredential?: {
@@ -617,8 +617,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
617
617
  }, {
618
618
  provider: string;
619
619
  modelReference: string;
620
- regions: string[];
621
620
  deploymentId: string;
621
+ regions: string[];
622
622
  substitution: "same_model";
623
623
  customerProviderCredential?: {
624
624
  environment: "development" | "staging" | "production";
@@ -630,8 +630,8 @@ export declare const authorizedRouteSchema: z.ZodEffects<z.ZodDiscriminatedUnion
630
630
  } | {
631
631
  provider: string;
632
632
  modelReference: string;
633
- regions: string[];
634
633
  deploymentId: string;
634
+ regions: string[];
635
635
  substitution: "cross_model";
636
636
  authorizedByPolicy: true;
637
637
  customerProviderCredential?: {
@@ -0,0 +1,202 @@
1
+ import { z } from "zod";
2
+ /** Explicit extension negotiation; never replaces the legacy 3.5 handshake. */
3
+ export declare const SCOPED_EXECUTION_CONTRACT_VERSION: "3.6.0";
4
+ /** Scoped only; normal envelope v2 and metadata 3.5 remain unchanged. */
5
+ export declare const SCOPED_REQUEST_ENVELOPE_VERSION: 3;
6
+ /** Restriction only: none of these identities grants catalogue eligibility. */
7
+ export declare const scopedExecutionAudienceSchema: z.ZodObject<{
8
+ permitId: z.ZodString;
9
+ idempotencyKey: z.ZodString;
10
+ fixtureSha256: z.ZodString;
11
+ expiresAt: z.ZodString;
12
+ principal: z.ZodObject<{
13
+ accountId: z.ZodString;
14
+ applicationId: z.ZodString;
15
+ credentialId: z.ZodString;
16
+ environment: z.ZodEnum<["development", "staging", "production"]>;
17
+ }, "strict", z.ZodTypeAny, {
18
+ accountId: string;
19
+ applicationId: string;
20
+ credentialId: string;
21
+ environment: "development" | "staging" | "production";
22
+ }, {
23
+ accountId: string;
24
+ applicationId: string;
25
+ credentialId: string;
26
+ environment: "development" | "staging" | "production";
27
+ }>;
28
+ policy: z.ZodObject<{
29
+ routingPolicyId: z.ZodString;
30
+ policyVersion: z.ZodNumber;
31
+ }, "strict", z.ZodTypeAny, {
32
+ routingPolicyId: string;
33
+ policyVersion: number;
34
+ }, {
35
+ routingPolicyId: string;
36
+ policyVersion: number;
37
+ }>;
38
+ deploymentId: z.ZodString;
39
+ provider: z.ZodString;
40
+ keyId: z.ZodString;
41
+ modelReference: z.ZodEffects<z.ZodString, string, string>;
42
+ upstreamModelId: z.ZodString;
43
+ priceVersionId: z.ZodString;
44
+ providerRateCardVersionId: z.ZodString;
45
+ providerSourceVersion: z.ZodString;
46
+ maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
47
+ }, "strict", z.ZodTypeAny, {
48
+ permitId: string;
49
+ idempotencyKey: string;
50
+ fixtureSha256: string;
51
+ expiresAt: string;
52
+ principal: {
53
+ accountId: string;
54
+ applicationId: string;
55
+ credentialId: string;
56
+ environment: "development" | "staging" | "production";
57
+ };
58
+ policy: {
59
+ routingPolicyId: string;
60
+ policyVersion: number;
61
+ };
62
+ deploymentId: string;
63
+ provider: string;
64
+ keyId: string;
65
+ modelReference: string;
66
+ upstreamModelId: string;
67
+ priceVersionId: string;
68
+ providerRateCardVersionId: string;
69
+ providerSourceVersion: string;
70
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
71
+ }, {
72
+ permitId: string;
73
+ idempotencyKey: string;
74
+ fixtureSha256: string;
75
+ expiresAt: string;
76
+ principal: {
77
+ accountId: string;
78
+ applicationId: string;
79
+ credentialId: string;
80
+ environment: "development" | "staging" | "production";
81
+ };
82
+ policy: {
83
+ routingPolicyId: string;
84
+ policyVersion: number;
85
+ };
86
+ deploymentId: string;
87
+ provider: string;
88
+ keyId: string;
89
+ modelReference: string;
90
+ upstreamModelId: string;
91
+ priceVersionId: string;
92
+ providerRateCardVersionId: string;
93
+ providerSourceVersion: string;
94
+ maxCostUsd: string;
95
+ }>;
96
+ export declare const scopedExecutionSchema: z.ZodObject<{
97
+ permitId: z.ZodString;
98
+ idempotencyKey: z.ZodString;
99
+ fixtureSha256: z.ZodString;
100
+ expiresAt: z.ZodString;
101
+ principal: z.ZodObject<{
102
+ accountId: z.ZodString;
103
+ applicationId: z.ZodString;
104
+ credentialId: z.ZodString;
105
+ environment: z.ZodEnum<["development", "staging", "production"]>;
106
+ }, "strict", z.ZodTypeAny, {
107
+ accountId: string;
108
+ applicationId: string;
109
+ credentialId: string;
110
+ environment: "development" | "staging" | "production";
111
+ }, {
112
+ accountId: string;
113
+ applicationId: string;
114
+ credentialId: string;
115
+ environment: "development" | "staging" | "production";
116
+ }>;
117
+ policy: z.ZodObject<{
118
+ routingPolicyId: z.ZodString;
119
+ policyVersion: z.ZodNumber;
120
+ }, "strict", z.ZodTypeAny, {
121
+ routingPolicyId: string;
122
+ policyVersion: number;
123
+ }, {
124
+ routingPolicyId: string;
125
+ policyVersion: number;
126
+ }>;
127
+ deploymentId: z.ZodString;
128
+ provider: z.ZodString;
129
+ keyId: z.ZodString;
130
+ modelReference: z.ZodEffects<z.ZodString, string, string>;
131
+ upstreamModelId: z.ZodString;
132
+ priceVersionId: z.ZodString;
133
+ providerRateCardVersionId: z.ZodString;
134
+ providerSourceVersion: z.ZodString;
135
+ maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
136
+ } & {
137
+ requestId: z.ZodString;
138
+ snapshotId: z.ZodString;
139
+ catalogueEvidenceHash: z.ZodString;
140
+ }, "strict", z.ZodTypeAny, {
141
+ permitId: string;
142
+ idempotencyKey: string;
143
+ fixtureSha256: string;
144
+ expiresAt: string;
145
+ principal: {
146
+ accountId: string;
147
+ applicationId: string;
148
+ credentialId: string;
149
+ environment: "development" | "staging" | "production";
150
+ };
151
+ policy: {
152
+ routingPolicyId: string;
153
+ policyVersion: number;
154
+ };
155
+ deploymentId: string;
156
+ provider: string;
157
+ keyId: string;
158
+ modelReference: string;
159
+ upstreamModelId: string;
160
+ priceVersionId: string;
161
+ providerRateCardVersionId: string;
162
+ providerSourceVersion: string;
163
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
164
+ requestId: string;
165
+ snapshotId: string;
166
+ catalogueEvidenceHash: string;
167
+ }, {
168
+ permitId: string;
169
+ idempotencyKey: string;
170
+ fixtureSha256: string;
171
+ expiresAt: string;
172
+ principal: {
173
+ accountId: string;
174
+ applicationId: string;
175
+ credentialId: string;
176
+ environment: "development" | "staging" | "production";
177
+ };
178
+ policy: {
179
+ routingPolicyId: string;
180
+ policyVersion: number;
181
+ };
182
+ deploymentId: string;
183
+ provider: string;
184
+ keyId: string;
185
+ modelReference: string;
186
+ upstreamModelId: string;
187
+ priceVersionId: string;
188
+ providerRateCardVersionId: string;
189
+ providerSourceVersion: string;
190
+ maxCostUsd: string;
191
+ requestId: string;
192
+ snapshotId: string;
193
+ catalogueEvidenceHash: string;
194
+ }>;
195
+ export type ScopedExecutionAudience = z.infer<typeof scopedExecutionAudienceSchema>;
196
+ export type ScopedExecution = z.infer<typeof scopedExecutionSchema>;
197
+ /**
198
+ * Canonical JSON wire bytes: recursive UTF-16 key order, JSON string/number
199
+ * encoding, arrays in order, no whitespace. Hash the whole signed input, not a
200
+ * reparsed/defaulted decision. Reject non-JSON values rather than dropping them.
201
+ */
202
+ export declare function canonicalScopedExecutionJson(value: unknown): string;
@@ -46,8 +46,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
46
46
  requestId: string;
47
47
  resolvedModelReference: string;
48
48
  servingProvider: string;
49
- sequence: number;
50
49
  startedAt: string;
50
+ sequence: number;
51
51
  generationId?: string | undefined;
52
52
  }, {
53
53
  type: "start";
@@ -55,8 +55,8 @@ export declare const inferenceStreamStartEventSchema: z.ZodObject<{
55
55
  requestId: string;
56
56
  resolvedModelReference: string;
57
57
  servingProvider: string;
58
- sequence: number;
59
58
  startedAt: string;
59
+ sequence: number;
60
60
  generationId?: string | undefined;
61
61
  }>;
62
62
  /**
@@ -225,23 +225,23 @@ export declare const inferenceStreamUsageEventSchema: z.ZodObject<{
225
225
  schemaVersion: 2;
226
226
  requestId: string;
227
227
  deploymentId: string;
228
- sequence: number;
229
228
  units: {
230
229
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
231
230
  quantity: number;
232
231
  }[];
233
232
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
233
+ sequence: number;
234
234
  }, {
235
235
  type: "usage";
236
236
  schemaVersion: 2;
237
237
  requestId: string;
238
238
  deploymentId: string;
239
- sequence: number;
240
239
  units: {
241
240
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
242
241
  quantity: number;
243
242
  }[];
244
243
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
244
+ sequence: number;
245
245
  }>;
246
246
  /**
247
247
  * What kind of re-route happened.
@@ -609,8 +609,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
609
609
  requestId: string;
610
610
  resolvedModelReference: string;
611
611
  servingProvider: string;
612
- sequence: number;
613
612
  startedAt: string;
613
+ sequence: number;
614
614
  generationId?: string | undefined;
615
615
  }, {
616
616
  type: "start";
@@ -618,8 +618,8 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
618
618
  requestId: string;
619
619
  resolvedModelReference: string;
620
620
  servingProvider: string;
621
- sequence: number;
622
621
  startedAt: string;
622
+ sequence: number;
623
623
  generationId?: string | undefined;
624
624
  }>, z.ZodObject<{
625
625
  /** See `version.ts`: each stream event is a whole message on the wire. */
@@ -730,23 +730,23 @@ export declare const inferenceStreamEventSchema: z.ZodDiscriminatedUnion<"type",
730
730
  schemaVersion: 2;
731
731
  requestId: string;
732
732
  deploymentId: string;
733
- sequence: number;
734
733
  units: {
735
734
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
736
735
  quantity: number;
737
736
  }[];
738
737
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
738
+ sequence: number;
739
739
  }, {
740
740
  type: "usage";
741
741
  schemaVersion: 2;
742
742
  requestId: string;
743
743
  deploymentId: string;
744
- sequence: number;
745
744
  units: {
746
745
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
747
746
  quantity: number;
748
747
  }[];
749
748
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
749
+ sequence: number;
750
750
  }>, z.ZodObject<{
751
751
  /** See `version.ts`: each stream event is a whole message on the wire. */
752
752
  schemaVersion: z.ZodLiteral<1>;
@@ -509,13 +509,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
509
509
  };
510
510
  deploymentId: string;
511
511
  completedAt: string;
512
- startedAt: string;
513
512
  units: {
514
513
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
515
514
  quantity: number;
516
515
  }[];
517
516
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
518
517
  routeSwitches: number;
518
+ startedAt: string;
519
519
  generationId?: string | undefined;
520
520
  timeToFirstTokenMs?: number | undefined;
521
521
  }, {
@@ -540,13 +540,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
540
540
  };
541
541
  deploymentId: string;
542
542
  completedAt: string;
543
- startedAt: string;
544
543
  units: {
545
544
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
546
545
  quantity: number;
547
546
  }[];
548
547
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
549
548
  routeSwitches: number;
549
+ startedAt: string;
550
550
  generationId?: string | undefined;
551
551
  timeToFirstTokenMs?: number | undefined;
552
552
  }>, {
@@ -571,13 +571,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
571
571
  };
572
572
  deploymentId: string;
573
573
  completedAt: string;
574
- startedAt: string;
575
574
  units: {
576
575
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
577
576
  quantity: number;
578
577
  }[];
579
578
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
580
579
  routeSwitches: number;
580
+ startedAt: string;
581
581
  generationId?: string | undefined;
582
582
  timeToFirstTokenMs?: number | undefined;
583
583
  }, {
@@ -602,13 +602,13 @@ export declare const normalizedUsageReportSchema: z.ZodEffects<z.ZodObject<{
602
602
  };
603
603
  deploymentId: string;
604
604
  completedAt: string;
605
- startedAt: string;
606
605
  units: {
607
606
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings" | "audio_input_tokens" | "cached_audio_input_tokens" | "audio_output_tokens" | "session_milliseconds";
608
607
  quantity: number;
609
608
  }[];
610
609
  usageSource: "provider_reported" | "oxy_measured" | "estimated";
611
610
  routeSwitches: number;
611
+ startedAt: string;
612
612
  generationId?: string | undefined;
613
613
  timeToFirstTokenMs?: number | undefined;
614
614
  }>;
@@ -99,4 +99,4 @@
99
99
  * change to, say, the catalogue reject every in-flight inference request; the
100
100
  * per-shape `schemaVersion` is what a message is validated against.
101
101
  */
102
- export declare const INFERENCE_CONTRACT_VERSION = "3.4.0";
102
+ export declare const INFERENCE_CONTRACT_VERSION = "3.5.0";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/contracts",
3
- "version": "4.6.0",
3
+ "version": "4.8.0",
4
4
  "description": "OxyHQ API contracts — single source of truth for request/response Zod schemas and inferred types, shared by the backend and the client SDKs",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",