@oxyhq/contracts 0.28.0 → 0.30.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 (43) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/identity.js +33 -1
  3. package/dist/cjs/index.js +20 -7
  4. package/dist/cjs/inference/aliaModelRelease.js +250 -0
  5. package/dist/cjs/inference/catalogue.js +1 -4
  6. package/dist/cjs/inference/errors.js +108 -9
  7. package/dist/cjs/inference/identifiers.js +23 -3
  8. package/dist/cjs/inference/request.js +188 -5
  9. package/dist/cjs/inference/routingPolicy.js +81 -2
  10. package/dist/cjs/inference/streamEvents.js +38 -1
  11. package/dist/cjs/inference/usage.js +32 -1
  12. package/dist/cjs/inference/version.js +24 -4
  13. package/dist/esm/.tsbuildinfo +1 -1
  14. package/dist/esm/identity.js +32 -0
  15. package/dist/esm/index.js +8 -3
  16. package/dist/esm/inference/aliaModelRelease.js +247 -0
  17. package/dist/esm/inference/catalogue.js +2 -5
  18. package/dist/esm/inference/errors.js +108 -9
  19. package/dist/esm/inference/identifiers.js +22 -2
  20. package/dist/esm/inference/request.js +189 -6
  21. package/dist/esm/inference/routingPolicy.js +81 -2
  22. package/dist/esm/inference/streamEvents.js +38 -1
  23. package/dist/esm/inference/usage.js +32 -1
  24. package/dist/esm/inference/version.js +24 -4
  25. package/dist/types/.tsbuildinfo +1 -1
  26. package/dist/types/identity.d.ts +59 -1
  27. package/dist/types/index.d.ts +7 -5
  28. package/dist/types/inference/accountBilling.d.ts +26 -26
  29. package/dist/types/inference/aliaModelRelease.d.ts +597 -0
  30. package/dist/types/inference/catalogue.d.ts +6 -6
  31. package/dist/types/inference/entitlement.d.ts +4 -4
  32. package/dist/types/inference/errors.d.ts +46 -10
  33. package/dist/types/inference/identifiers.d.ts +20 -2
  34. package/dist/types/inference/money.d.ts +4 -4
  35. package/dist/types/inference/priceVersion.d.ts +14 -14
  36. package/dist/types/inference/providerConnection.d.ts +4 -4
  37. package/dist/types/inference/request.d.ts +291 -5
  38. package/dist/types/inference/routingPolicy.d.ts +109 -13
  39. package/dist/types/inference/streamEvents.d.ts +84 -48
  40. package/dist/types/inference/usage.d.ts +103 -79
  41. package/dist/types/inference/version.d.ts +24 -4
  42. package/dist/types/keyRecovery.d.ts +4 -4
  43. package/package.json +1 -1
@@ -37,9 +37,14 @@ import { z } from 'zod';
37
37
  * PLATFORM's own credential fails every identical retry until an operator
38
38
  * rotates a key, so classifying it as `provider_error` would send every client
39
39
  * into a retry loop against a request that cannot succeed.
40
+ *
41
+ * `provider_billing_refused` is in that group for the same reason and was found
42
+ * the same way — an upstream declining to bill OXY (Anthropic answers 402) has
43
+ * to be distinguishable from the customer's own balance running out, or the
44
+ * error tells them to go and top up an account that is not the one at fault.
40
45
  */
41
- export declare const INFERENCE_ERROR_CODES: readonly ["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "service_unavailable", "internal_error"];
42
- export declare const inferenceErrorCodeSchema: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "service_unavailable", "internal_error"]>;
46
+ export declare const INFERENCE_ERROR_CODES: readonly ["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"];
47
+ export declare const inferenceErrorCodeSchema: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"]>;
43
48
  /**
44
49
  * Codes for which an identical retried request cannot succeed.
45
50
  *
@@ -55,12 +60,43 @@ export declare const inferenceErrorCodeSchema: z.ZodEnum<["invalid_request", "au
55
60
  * one because only the first names an action the customer can take. Both are
56
61
  * non-retryable for the same reason: a credential an upstream has refused keeps
57
62
  * being refused until somebody replaces it.
63
+ *
64
+ * `quota_exceeded` and `provider_billing_refused` divide along the same line:
65
+ * both are money, but one is the CUSTOMER's ceiling and the other is Oxy's
66
+ * account with an upstream. Reporting the second as the first is retryability-
67
+ * correct and diagnostically wrong, which is the worst combination — it reads
68
+ * as actionable and the action does nothing.
58
69
  */
59
- export declare const NON_RETRYABLE_INFERENCE_ERROR_CODES: readonly ["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "provider_credential_invalid"];
70
+ export declare const NON_RETRYABLE_INFERENCE_ERROR_CODES: readonly ["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "provider_credential_invalid", "provider_billing_refused"];
60
71
  /**
61
- * Free text that is safe to hand a customer: bounded, and refused outright if a
62
- * credential marker appears in it. Applied to BOTH the Oxy message and the
72
+ * Free text that is safe to hand a customer: bounded, and refused if it still
73
+ * looks like it carries a credential. Applied to BOTH the Oxy message and the
63
74
  * upstream one — a leak is no less a leak for having been written by a provider.
75
+ *
76
+ * ## This is a last-resort REFUSAL, not protection
77
+ *
78
+ * A pattern over the OUTPUT cannot be the control that keeps a credential out of
79
+ * an error, and a producer that treats it as one has the hole #1027 reported.
80
+ * The only reliable control is redacting the KNOWN SECRET VALUE at the point
81
+ * where the producer still holds the bytes it sent — which is an adapter's job
82
+ * and is available to nobody else. This refinement exists to catch what that
83
+ * control missed, and nothing here is a licence to skip it.
84
+ *
85
+ * Two rules follow, and they are the whole reason this text is longer than the
86
+ * pattern it describes:
87
+ *
88
+ * - **Never redact by replacing the span this pattern matched.** The span is
89
+ * the MARKER; the secret is what follows it. OxyHQ/Relay#3 measured the
90
+ * result: `{x-api-key: <key>}` is refused, `{x-[redacted] <key>}` was
91
+ * accepted, and both carry the key. Redaction made the leak worse by
92
+ * converting "this string is dangerous" into "this string is fine".
93
+ * - **This package deliberately ships no redaction helper.** One keyed on these
94
+ * patterns would rebuild the same defect one layer up, and one that took the
95
+ * secret as an argument would only restate what the producer already has.
96
+ *
97
+ * What it still cannot see, stated so nobody relies on it: a credential with no
98
+ * marker, no issued-token prefix and no placeholder beside it is bytes that look
99
+ * like a request id, and refusing those means refusing request ids.
64
100
  */
65
101
  export declare const safeErrorTextSchema: z.ZodEffects<z.ZodString, string, string>;
66
102
  /**
@@ -110,7 +146,7 @@ export declare const providerErrorPassthroughSchema: z.ZodObject<{
110
146
  export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
111
147
  /** See `version.ts`: this shape appears alone on the wire, so it is versioned. */
112
148
  schemaVersion: z.ZodLiteral<1>;
113
- code: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "service_unavailable", "internal_error"]>;
149
+ code: z.ZodEnum<["invalid_request", "authentication_failed", "permission_denied", "insufficient_scope", "model_not_found", "unsupported_modality", "context_length_exceeded", "request_too_large", "output_limit_exceeded", "idempotency_conflict", "insufficient_balance", "spending_limit_exceeded", "quota_exceeded", "byok_credential_invalid", "policy_violation", "commercial_permission_denied", "no_route_available", "upstream_content_filtered", "cancelled", "rate_limited", "deployment_unavailable", "provider_error", "provider_timeout", "provider_overloaded", "provider_credential_invalid", "provider_billing_refused", "service_unavailable", "internal_error"]>;
114
150
  message: z.ZodEffects<z.ZodString, string, string>;
115
151
  retryable: z.ZodBoolean;
116
152
  requestId: z.ZodString;
@@ -140,7 +176,7 @@ export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
140
176
  status?: number | undefined;
141
177
  }>>;
142
178
  }, "strip", z.ZodTypeAny, {
143
- code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "service_unavailable" | "internal_error";
179
+ code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused" | "service_unavailable" | "internal_error";
144
180
  message: string;
145
181
  requestId: string;
146
182
  schemaVersion: 1;
@@ -155,7 +191,7 @@ export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
155
191
  status?: number | undefined;
156
192
  } | undefined;
157
193
  }, {
158
- code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "service_unavailable" | "internal_error";
194
+ code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused" | "service_unavailable" | "internal_error";
159
195
  message: string;
160
196
  requestId: string;
161
197
  schemaVersion: 1;
@@ -170,7 +206,7 @@ export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
170
206
  status?: number | undefined;
171
207
  } | undefined;
172
208
  }>, {
173
- code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "service_unavailable" | "internal_error";
209
+ code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused" | "service_unavailable" | "internal_error";
174
210
  message: string;
175
211
  requestId: string;
176
212
  schemaVersion: 1;
@@ -185,7 +221,7 @@ export declare const inferenceErrorSchema: z.ZodEffects<z.ZodObject<{
185
221
  status?: number | undefined;
186
222
  } | undefined;
187
223
  }, {
188
- code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "service_unavailable" | "internal_error";
224
+ code: "invalid_request" | "authentication_failed" | "permission_denied" | "insufficient_scope" | "model_not_found" | "unsupported_modality" | "context_length_exceeded" | "request_too_large" | "output_limit_exceeded" | "idempotency_conflict" | "insufficient_balance" | "spending_limit_exceeded" | "quota_exceeded" | "byok_credential_invalid" | "policy_violation" | "commercial_permission_denied" | "no_route_available" | "upstream_content_filtered" | "cancelled" | "rate_limited" | "deployment_unavailable" | "provider_error" | "provider_timeout" | "provider_overloaded" | "provider_credential_invalid" | "provider_billing_refused" | "service_unavailable" | "internal_error";
189
225
  message: string;
190
226
  requestId: string;
191
227
  schemaVersion: 1;
@@ -56,8 +56,16 @@ export declare const oxyCredentialIdSchema: z.ZodString;
56
56
  * traceable as one that was served (ADR 0007, and step 1 of ADR 0010's edge
57
57
  * order). It is required on the inbound envelope, which is what makes the data
58
58
  * plane a consumer of this id rather than its source: the data plane echoes it
59
- * on every stream event, on the usage report and on anything it can be asked
60
- * about later.
59
+ * on every stream event, on the usage report, in its response header and on
60
+ * anything it can be asked about later. It never mints one for a request it
61
+ * received.
62
+ *
63
+ * The one case that is NOT an exception to that: an envelope the data plane
64
+ * cannot read or authenticate carries no id to echo, so its rejection is
65
+ * labelled with an id of the data plane's own — visibly local, and never
66
+ * correlated with an Oxy request, because there is no Oxy request it belongs to.
67
+ * Saying so is what stops "consumer, not source" from being read as forbidding
68
+ * the only id such a rejection could have.
61
69
  *
62
70
  * Correlates the Oxy edge, the data plane, the financial ledger and the
63
71
  * customer-visible receipt, so it appears on every stream event and every
@@ -95,6 +103,16 @@ export declare const inferenceTimestampSchema: z.ZodString;
95
103
  export declare const inferenceDateSchema: z.ZodString;
96
104
  /** An absolute https URL, for model cards, licenses and provider documentation. */
97
105
  export declare const inferenceHttpsUrlSchema: z.ZodString;
106
+ /**
107
+ * A content digest, `sha256:<64 lowercase hex>`.
108
+ *
109
+ * ONE spelling, because a digest is compared for equality and nothing else: an
110
+ * uppercase or unprefixed variant of the same hash is a different string, so two
111
+ * records describing the same bytes would not match. Lowercase hex with the
112
+ * algorithm prefix is what the `inference_model_revisions` CHECK stores and what
113
+ * every artifact registry emits.
114
+ */
115
+ export declare const sha256DigestSchema: z.ZodString;
98
116
  /** A publisher slug, e.g. `openai`, `anthropic`, `meta`, `alia`. */
99
117
  export declare const publisherSlugSchema: z.ZodString;
100
118
  /** A model slug within its publisher's namespace, e.g. `gpt-5`, `llama-3.1-70b`. */
@@ -69,11 +69,11 @@ export declare const moneySchema: z.ZodObject<{
69
69
  amount: z.ZodBranded<z.ZodString, "ExactDecimal">;
70
70
  currency: z.ZodString;
71
71
  }, "strict", z.ZodTypeAny, {
72
- amount: string & z.BRAND<"ExactDecimal">;
73
72
  currency: string;
73
+ amount: string & z.BRAND<"ExactDecimal">;
74
74
  }, {
75
- amount: string;
76
75
  currency: string;
76
+ amount: string;
77
77
  }>;
78
78
  /**
79
79
  * The closed set of units inference is metered in.
@@ -166,13 +166,13 @@ export declare const unitPriceSchema: z.ZodObject<{
166
166
  per: z.ZodNumber;
167
167
  currency: z.ZodString;
168
168
  }, "strict", z.ZodTypeAny, {
169
- amount: string & z.BRAND<"ExactDecimal">;
170
169
  currency: string;
170
+ amount: string & z.BRAND<"ExactDecimal">;
171
171
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
172
172
  per: number;
173
173
  }, {
174
- amount: string;
175
174
  currency: string;
175
+ amount: string;
176
176
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
177
177
  per: number;
178
178
  }>;
@@ -46,13 +46,13 @@ export declare const priceVersionSchema: z.ZodEffects<z.ZodObject<{
46
46
  per: z.ZodNumber;
47
47
  currency: z.ZodString;
48
48
  }, "strict", z.ZodTypeAny, {
49
- amount: string & z.BRAND<"ExactDecimal">;
50
49
  currency: string;
50
+ amount: string & z.BRAND<"ExactDecimal">;
51
51
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
52
52
  per: number;
53
53
  }, {
54
- amount: string;
55
54
  currency: string;
55
+ amount: string;
56
56
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
57
57
  per: number;
58
58
  }>, "many">;
@@ -64,15 +64,15 @@ export declare const priceVersionSchema: z.ZodEffects<z.ZodObject<{
64
64
  createdAt: z.ZodString;
65
65
  }, "strip", z.ZodTypeAny, {
66
66
  status: "active" | "superseded" | "draft";
67
- createdAt: string;
68
67
  currency: string;
68
+ createdAt: string;
69
69
  provider: string;
70
70
  schemaVersion: 1;
71
71
  priceVersionId: string;
72
72
  modelReference: string;
73
73
  unitPrices: {
74
- amount: string & z.BRAND<"ExactDecimal">;
75
74
  currency: string;
75
+ amount: string & z.BRAND<"ExactDecimal">;
76
76
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
77
77
  per: number;
78
78
  }[];
@@ -81,15 +81,15 @@ export declare const priceVersionSchema: z.ZodEffects<z.ZodObject<{
81
81
  supersedesPriceVersionId?: string | undefined;
82
82
  }, {
83
83
  status: "active" | "superseded" | "draft";
84
- createdAt: string;
85
84
  currency: string;
85
+ createdAt: string;
86
86
  provider: string;
87
87
  schemaVersion: 1;
88
88
  priceVersionId: string;
89
89
  modelReference: string;
90
90
  unitPrices: {
91
- amount: string;
92
91
  currency: string;
92
+ amount: string;
93
93
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
94
94
  per: number;
95
95
  }[];
@@ -98,15 +98,15 @@ export declare const priceVersionSchema: z.ZodEffects<z.ZodObject<{
98
98
  supersedesPriceVersionId?: string | undefined;
99
99
  }>, {
100
100
  status: "active" | "superseded" | "draft";
101
- createdAt: string;
102
101
  currency: string;
102
+ createdAt: string;
103
103
  provider: string;
104
104
  schemaVersion: 1;
105
105
  priceVersionId: string;
106
106
  modelReference: string;
107
107
  unitPrices: {
108
- amount: string & z.BRAND<"ExactDecimal">;
109
108
  currency: string;
109
+ amount: string & z.BRAND<"ExactDecimal">;
110
110
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
111
111
  per: number;
112
112
  }[];
@@ -115,15 +115,15 @@ export declare const priceVersionSchema: z.ZodEffects<z.ZodObject<{
115
115
  supersedesPriceVersionId?: string | undefined;
116
116
  }, {
117
117
  status: "active" | "superseded" | "draft";
118
- createdAt: string;
119
118
  currency: string;
119
+ createdAt: string;
120
120
  provider: string;
121
121
  schemaVersion: 1;
122
122
  priceVersionId: string;
123
123
  modelReference: string;
124
124
  unitPrices: {
125
- amount: string;
126
125
  currency: string;
126
+ amount: string;
127
127
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
128
128
  per: number;
129
129
  }[];
@@ -148,13 +148,13 @@ export declare const priceSnapshotSchema: z.ZodObject<{
148
148
  per: z.ZodNumber;
149
149
  currency: z.ZodString;
150
150
  }, "strict", z.ZodTypeAny, {
151
- amount: string & z.BRAND<"ExactDecimal">;
152
151
  currency: string;
152
+ amount: string & z.BRAND<"ExactDecimal">;
153
153
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
154
154
  per: number;
155
155
  }, {
156
- amount: string;
157
156
  currency: string;
157
+ amount: string;
158
158
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
159
159
  per: number;
160
160
  }>, "many">;
@@ -162,8 +162,8 @@ export declare const priceSnapshotSchema: z.ZodObject<{
162
162
  currency: string;
163
163
  priceVersionId: string;
164
164
  unitPrices: {
165
- amount: string & z.BRAND<"ExactDecimal">;
166
165
  currency: string;
166
+ amount: string & z.BRAND<"ExactDecimal">;
167
167
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
168
168
  per: number;
169
169
  }[];
@@ -171,8 +171,8 @@ export declare const priceSnapshotSchema: z.ZodObject<{
171
171
  currency: string;
172
172
  priceVersionId: string;
173
173
  unitPrices: {
174
- amount: string;
175
174
  currency: string;
175
+ amount: string;
176
176
  unit: "input_tokens" | "cached_input_tokens" | "output_tokens" | "reasoning_tokens" | "requests" | "images" | "audio_input_milliseconds" | "audio_output_milliseconds" | "video_milliseconds" | "characters" | "embeddings";
177
177
  per: number;
178
178
  }[];
@@ -178,6 +178,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
178
178
  failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
179
179
  };
180
180
  status: "active" | "revoked" | "disabled" | "pending_validation";
181
+ createdAt: string;
181
182
  scope: {
182
183
  kind: "account";
183
184
  accountId: string & z.BRAND<"OxyAccountId">;
@@ -189,7 +190,6 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
189
190
  accountId: string & z.BRAND<"OxyAccountId">;
190
191
  applicationId: string;
191
192
  };
192
- createdAt: string;
193
193
  provider: string;
194
194
  schemaVersion: 1;
195
195
  connectionId: string;
@@ -208,6 +208,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
208
208
  failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
209
209
  };
210
210
  status: "active" | "revoked" | "disabled" | "pending_validation";
211
+ createdAt: string;
211
212
  scope: {
212
213
  kind: "account";
213
214
  accountId: string;
@@ -219,7 +220,6 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
219
220
  accountId: string;
220
221
  applicationId: string;
221
222
  };
222
- createdAt: string;
223
223
  provider: string;
224
224
  schemaVersion: 1;
225
225
  connectionId: string;
@@ -238,6 +238,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
238
238
  failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
239
239
  };
240
240
  status: "active" | "revoked" | "disabled" | "pending_validation";
241
+ createdAt: string;
241
242
  scope: {
242
243
  kind: "account";
243
244
  accountId: string & z.BRAND<"OxyAccountId">;
@@ -249,7 +250,6 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
249
250
  accountId: string & z.BRAND<"OxyAccountId">;
250
251
  applicationId: string;
251
252
  };
252
- createdAt: string;
253
253
  provider: string;
254
254
  schemaVersion: 1;
255
255
  connectionId: string;
@@ -268,6 +268,7 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
268
268
  failureCode?: "unknown" | "network" | "rate_limited" | "unauthorized" | "forbidden" | "not_found" | undefined;
269
269
  };
270
270
  status: "active" | "revoked" | "disabled" | "pending_validation";
271
+ createdAt: string;
271
272
  scope: {
272
273
  kind: "account";
273
274
  accountId: string;
@@ -279,7 +280,6 @@ export declare const providerConnectionSchema: z.ZodEffects<z.ZodObject<{
279
280
  accountId: string;
280
281
  applicationId: string;
281
282
  };
282
- createdAt: string;
283
283
  provider: string;
284
284
  schemaVersion: 1;
285
285
  connectionId: string;