@broberg/ai-sdk 0.41.0 → 0.42.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/{chunk-B74RSBT5.js → chunk-OWXXPBKN.js} +3 -3
- package/dist/{chunk-B74RSBT5.js.map → chunk-OWXXPBKN.js.map} +1 -1
- package/dist/index.d.ts +32 -4
- package/dist/index.js +25 -8
- package/dist/index.js.map +1 -1
- package/dist/pricing.d.ts +13 -6
- package/dist/pricing.js +1 -1
- package/package.json +2 -2
package/dist/pricing.d.ts
CHANGED
|
@@ -90,14 +90,21 @@ interface MediaModelPrice extends BasePrice {
|
|
|
90
90
|
/** The price, in USD, for one of whatever `unit` names. ALWAYS set on a media row —
|
|
91
91
|
* read this rather than the unit-specific aliases below. */
|
|
92
92
|
usd: number;
|
|
93
|
-
/**
|
|
93
|
+
/** @deprecated Read {@link MediaModelPrice.usd} with {@link MediaModelPrice.unit}.
|
|
94
|
+
* Kept working because it shipped in 0.40.0 and consumers read it.
|
|
94
95
|
*
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
96
|
+
* USD per second, set ONLY when `unit === "per_sec"` — and DERIVED from `usd`, never
|
|
97
|
+
* stored twice. super's point, and the precedent is on the fleet's books: two fields
|
|
98
|
+
* that must be kept equal are not wrong the day they are written, they are wrong the
|
|
99
|
+
* day one of them is corrected. (torrent-search-api F013.4: a duplicated counter
|
|
100
|
+
* showed two different numbers a week after the fix landed on one of its two sites.)
|
|
101
|
+
*
|
|
102
|
+
* It also carries this repo's own scar: 0.40.0 set this-or-`perImage` from a TWO-armed
|
|
103
|
+
* ternary over SIX units, so every non-per-second price was labelled `perImage` —
|
|
104
|
+
* `azure:tts` reported `perImage: 0.016` for a price that is per 1000 CHARACTERS. */
|
|
99
105
|
perSec?: number;
|
|
100
|
-
/**
|
|
106
|
+
/** @deprecated Read {@link MediaModelPrice.usd} with {@link MediaModelPrice.unit}.
|
|
107
|
+
* USD per generated image, set ONLY when `unit === "per_image"`, derived from `usd`. */
|
|
101
108
|
perImage?: number;
|
|
102
109
|
}
|
|
103
110
|
/** A price row. Narrow on `unit` before reading rates:
|
package/dist/pricing.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@broberg/ai-sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Unified AI/LLM SDK
|
|
3
|
+
"version": "0.42.0",
|
|
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",
|
|
7
7
|
"author": "Christian Broberg <cb@webhouse.dk>",
|