@oxy.so/contracts 4.4.0 → 4.5.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/inference/money.js +13 -0
- package/dist/cjs/inference/version.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/inference/money.js +13 -0
- package/dist/esm/inference/version.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/inference/catalogue.d.ts +7 -7
- package/dist/types/inference/money.d.ts +20 -8
- package/dist/types/inference/priceVersion.d.ts +12 -12
- package/dist/types/inference/realtime.d.ts +24 -24
- package/dist/types/inference/routingPolicy.d.ts +7 -7
- package/dist/types/inference/streamEvents.d.ts +10 -10
- package/dist/types/inference/usage.d.ts +28 -28
- package/dist/types/inference/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -135,6 +135,18 @@ exports.moneySchema = zod_1.z
|
|
|
135
135
|
* reported as tokens and as milliseconds is the double charge this rule exists
|
|
136
136
|
* to prevent.
|
|
137
137
|
*
|
|
138
|
+
* **`session_milliseconds` is session wall-clock time** (added in contract set
|
|
139
|
+
* 3.3.0): wall-clock milliseconds a realtime session was open with the upstream
|
|
140
|
+
* provider; reported only by a provider that bills session time, and never
|
|
141
|
+
* together with a per-audio reading of the same span. xAI's Voice Agent API
|
|
142
|
+
* bills a session using server-side voice activity detection for its whole
|
|
143
|
+
* duration, speech or silence, which is neither audio sent nor audio received:
|
|
144
|
+
* reporting that clock as `audio_input_milliseconds` would misdescribe the
|
|
145
|
+
* charge, and reporting both would bill the same span twice. It is measured by
|
|
146
|
+
* the data plane from the upstream session's open to its close, never
|
|
147
|
+
* estimated from the audio, and a provider billed by the audio it carries (or
|
|
148
|
+
* by tokens) never reports it.
|
|
149
|
+
*
|
|
138
150
|
* No refinement in this package can enforce it, and saying so is part of the
|
|
139
151
|
* rule: a nested report and a disjoint one are the same four non-negative
|
|
140
152
|
* integers, so no predicate over a single report can tell them apart. The two
|
|
@@ -171,6 +183,7 @@ exports.USAGE_UNITS = [
|
|
|
171
183
|
'audio_input_tokens',
|
|
172
184
|
'cached_audio_input_tokens',
|
|
173
185
|
'audio_output_tokens',
|
|
186
|
+
'session_milliseconds',
|
|
174
187
|
];
|
|
175
188
|
exports.usageUnitSchema = zod_1.z.enum(exports.USAGE_UNITS);
|
|
176
189
|
/**
|
|
@@ -102,4 +102,4 @@ exports.INFERENCE_CONTRACT_VERSION = void 0;
|
|
|
102
102
|
* change to, say, the catalogue reject every in-flight inference request; the
|
|
103
103
|
* per-shape `schemaVersion` is what a message is validated against.
|
|
104
104
|
*/
|
|
105
|
-
exports.INFERENCE_CONTRACT_VERSION = '3.
|
|
105
|
+
exports.INFERENCE_CONTRACT_VERSION = '3.3.0';
|