@broberg/ai-sdk 0.78.3 → 0.78.5

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.
@@ -302,6 +302,9 @@ interface Usage {
302
302
  labels?: Record<string, string>;
303
303
  ts: string;
304
304
  subprocess?: true;
305
+ /** F016.1 — true when `costUsd` is a BATCH price (the provider's async tier, Mistral: 50 % of
306
+ * the live rate), so a dashboard can tell a half-price row from a full-price one. */
307
+ batch?: true;
305
308
  }
306
309
  /** A cost reporter. Fans `Usage` out to Upmetrics / Discord / sqlite / etc.
307
310
  * Implementations must never throw into the caller (F3.3). */
@@ -723,6 +726,10 @@ interface BatchJob {
723
726
  interface BatchResultItem {
724
727
  customId: string;
725
728
  text: string;
729
+ /** F016.1 — what this one request cost, at the provider's batch rate (Mistral: 50 %).
730
+ * Absent when the provider's result line carried no token counts — then the cost is
731
+ * UNKNOWN, not zero. */
732
+ usage?: Usage;
726
733
  }
727
734
  /** The thin contract every provider implements (F4). A provider need only
728
735
  * support the capabilities it offers — `chat` is the baseline; vision/image/
@@ -1 +1 @@
1
- export { q as AvailabilitySource, r as AvailabilityStatus, L as LATEST, N as LatestEntry, W as ModelStatus, X as ModelUnavailableError, a0 as ResolveOptions, a1 as ResolveResult, a3 as TierDescription, aa as describeTier, ab as listLatest, ac as listModels, af as resolveLatest, ag as resolveModel } from './registry-C2Ik6BTM.js';
1
+ export { q as AvailabilitySource, r as AvailabilityStatus, L as LATEST, N as LatestEntry, W as ModelStatus, X as ModelUnavailableError, a0 as ResolveOptions, a1 as ResolveResult, a3 as TierDescription, aa as describeTier, ab as listLatest, ac as listModels, af as resolveLatest, ag as resolveModel } from './registry-UIY_A6GR.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@broberg/ai-sdk",
3
- "version": "0.78.3",
3
+ "version": "0.78.5",
4
4
  "description": "Unified AI/LLM SDK — one facade, all providers, all capabilities, first-class cost control on every call.",
5
5
  "type": "module",
6
6
  "license": "FSL-1.1-Apache-2.0",