@ai-sdk/provider-utils 3.0.33 → 3.0.35
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/CHANGELOG.md +13 -0
- package/dist/index.d.mts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -154,6 +154,11 @@ var DownloadError = class extends (_b = AISDKError, _a = symbol, _b) {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
|
|
157
|
+
// src/embedding-model-capabilities.ts
|
|
158
|
+
var EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL = /* @__PURE__ */ Symbol.for(
|
|
159
|
+
"vercel.ai.embeddingModel.maxInputBytesPerCall"
|
|
160
|
+
);
|
|
161
|
+
|
|
157
162
|
// src/cancel-response-body.ts
|
|
158
163
|
async function cancelResponseBody(response) {
|
|
159
164
|
var _a2;
|
|
@@ -368,6 +373,9 @@ async function getDefaultDownloadFetch() {
|
|
|
368
373
|
return safeNodeFetchPromise != null ? safeNodeFetchPromise : safeNodeFetchPromise = createSafeNodeFetch();
|
|
369
374
|
}
|
|
370
375
|
function isNodeDefaultFetch(fetch) {
|
|
376
|
+
if (typeof fetch !== "function") {
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
371
379
|
const source = Function.prototype.toString.call(fetch);
|
|
372
380
|
return source.includes("internal/deps/undici") || source.includes("lazy loading of undici");
|
|
373
381
|
}
|
|
@@ -652,7 +660,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
652
660
|
}
|
|
653
661
|
|
|
654
662
|
// src/version.ts
|
|
655
|
-
var VERSION = true ? "3.0.
|
|
663
|
+
var VERSION = true ? "3.0.35" : "0.0.0-test";
|
|
656
664
|
|
|
657
665
|
// src/get-from-api.ts
|
|
658
666
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -1514,7 +1522,8 @@ import * as z4 from "zod/v4";
|
|
|
1514
1522
|
// src/add-additional-properties-to-json-schema.ts
|
|
1515
1523
|
function addAdditionalPropertiesToJsonSchema(jsonSchema2) {
|
|
1516
1524
|
if (jsonSchema2.type === "object") {
|
|
1517
|
-
|
|
1525
|
+
const { additionalProperties } = jsonSchema2;
|
|
1526
|
+
jsonSchema2.additionalProperties = additionalProperties != null && typeof additionalProperties !== "boolean" ? addAdditionalPropertiesToJsonSchema(additionalProperties) : false;
|
|
1518
1527
|
const properties = jsonSchema2.properties;
|
|
1519
1528
|
if (properties != null) {
|
|
1520
1529
|
for (const property in properties) {
|
|
@@ -2836,6 +2845,7 @@ export {
|
|
|
2836
2845
|
DEFAULT_MAX_DOWNLOAD_SIZE,
|
|
2837
2846
|
DelayedPromise,
|
|
2838
2847
|
DownloadError,
|
|
2848
|
+
EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL as EXPERIMENTAL_EMBEDDING_MODEL_MAX_INPUT_BYTES_PER_CALL,
|
|
2839
2849
|
EventSourceParserStream2 as EventSourceParserStream,
|
|
2840
2850
|
VERSION,
|
|
2841
2851
|
asSchema,
|