@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
|
@@ -132,6 +132,18 @@ export const moneySchema = z
|
|
|
132
132
|
* reported as tokens and as milliseconds is the double charge this rule exists
|
|
133
133
|
* to prevent.
|
|
134
134
|
*
|
|
135
|
+
* **`session_milliseconds` is session wall-clock time** (added in contract set
|
|
136
|
+
* 3.3.0): wall-clock milliseconds a realtime session was open with the upstream
|
|
137
|
+
* provider; reported only by a provider that bills session time, and never
|
|
138
|
+
* together with a per-audio reading of the same span. xAI's Voice Agent API
|
|
139
|
+
* bills a session using server-side voice activity detection for its whole
|
|
140
|
+
* duration, speech or silence, which is neither audio sent nor audio received:
|
|
141
|
+
* reporting that clock as `audio_input_milliseconds` would misdescribe the
|
|
142
|
+
* charge, and reporting both would bill the same span twice. It is measured by
|
|
143
|
+
* the data plane from the upstream session's open to its close, never
|
|
144
|
+
* estimated from the audio, and a provider billed by the audio it carries (or
|
|
145
|
+
* by tokens) never reports it.
|
|
146
|
+
*
|
|
135
147
|
* No refinement in this package can enforce it, and saying so is part of the
|
|
136
148
|
* rule: a nested report and a disjoint one are the same four non-negative
|
|
137
149
|
* integers, so no predicate over a single report can tell them apart. The two
|
|
@@ -168,6 +180,7 @@ export const USAGE_UNITS = [
|
|
|
168
180
|
'audio_input_tokens',
|
|
169
181
|
'cached_audio_input_tokens',
|
|
170
182
|
'audio_output_tokens',
|
|
183
|
+
'session_milliseconds',
|
|
171
184
|
];
|
|
172
185
|
export const usageUnitSchema = z.enum(USAGE_UNITS);
|
|
173
186
|
/**
|
|
@@ -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 const INFERENCE_CONTRACT_VERSION = '3.
|
|
102
|
+
export const INFERENCE_CONTRACT_VERSION = '3.3.0';
|