@broberg/ai-sdk 0.36.4 → 0.36.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.
- package/dist/index.d.ts +14 -3
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,18 @@ declare function regionOfHost(url: string | undefined): Region;
|
|
|
24
24
|
* least defensible. Never throws — a residency reading must not be able to break a
|
|
25
25
|
* call that already succeeded. */
|
|
26
26
|
declare function classifyRegionName(name: string | undefined): Region;
|
|
27
|
-
/** Region for an adapter whose endpoint is fixed. Unknown provider → `"unknown"`.
|
|
27
|
+
/** Region for an adapter whose endpoint is fixed. Unknown provider → `"unknown"`.
|
|
28
|
+
*
|
|
29
|
+
* **DO NOT BUILD A RESIDENCY GUARD ON THIS.** Use {@link regionOfHost} on the base URL
|
|
30
|
+
* the call will actually use. Found by a consumer building exactly that guard (super,
|
|
31
|
+
* 2026-08-30): `regionOfProvider("mistral")` is `"unknown"` — correct, because Mistral
|
|
32
|
+
* takes a `baseUrl` and a name cannot answer for residency — but a guard written as
|
|
33
|
+
* `regionOfProvider(p) === "eu"` therefore REJECTS Mistral, which is the only EU route
|
|
34
|
+
* we have. It fails closed and is useless: it filters out the thing it exists to allow.
|
|
35
|
+
*
|
|
36
|
+
* The trap is invisible from the signature, which is why it is written here rather than
|
|
37
|
+
* only in the docs. This function answers "is this provider's endpoint fixed, and where
|
|
38
|
+
* is it?" — a narrower question than "where will my call go?". */
|
|
28
39
|
declare function regionOfProvider(provider: string): Region;
|
|
29
40
|
|
|
30
41
|
/** How a call reaches the model. `http` = provider REST API; `subprocess` = local
|
|
@@ -2189,8 +2200,8 @@ declare const falStubAdapter: ProviderAdapter;
|
|
|
2189
2200
|
* wires the live adapters. */
|
|
2190
2201
|
declare const stubProviders: Record<string, ProviderAdapter>;
|
|
2191
2202
|
|
|
2192
|
-
declare const VERSION: "0.36.
|
|
2193
|
-
declare const SDK_TAG: "@broberg/ai-sdk@0.36.
|
|
2203
|
+
declare const VERSION: "0.36.5";
|
|
2204
|
+
declare const SDK_TAG: "@broberg/ai-sdk@0.36.5";
|
|
2194
2205
|
|
|
2195
2206
|
/** Built-in defaults. Every entry is overridable via AiConfig.defaults or a
|
|
2196
2207
|
* per-call override.
|
package/dist/index.js
CHANGED
|
@@ -2986,8 +2986,8 @@ var aiConfigSchema = z.object({
|
|
|
2986
2986
|
});
|
|
2987
2987
|
|
|
2988
2988
|
// src/version.ts
|
|
2989
|
-
var VERSION = "0.36.
|
|
2990
|
-
var SDK_TAG = "@broberg/ai-sdk@0.36.
|
|
2989
|
+
var VERSION = "0.36.5";
|
|
2990
|
+
var SDK_TAG = "@broberg/ai-sdk@0.36.5";
|
|
2991
2991
|
|
|
2992
2992
|
// src/cost/sinks/upmetrics.ts
|
|
2993
2993
|
function upmetricsSink(config) {
|