@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.
@@ -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.2.0';
102
+ export const INFERENCE_CONTRACT_VERSION = '3.3.0';