@ai-sdk/provider-utils 4.0.54 → 4.0.55
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 +8 -0
- package/dist/index.d.mts +7 -2
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/is-url-supported.ts +7 -3
- package/src/types/content-part.ts +6 -0
package/dist/index.mjs
CHANGED
|
@@ -822,7 +822,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
822
822
|
}
|
|
823
823
|
|
|
824
824
|
// src/version.ts
|
|
825
|
-
var VERSION = true ? "4.0.
|
|
825
|
+
var VERSION = true ? "4.0.55" : "0.0.0-test";
|
|
826
826
|
|
|
827
827
|
// src/get-from-api.ts
|
|
828
828
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -958,7 +958,9 @@ function isUrlSupported({
|
|
|
958
958
|
return Object.entries(supportedUrls).map(([key, value]) => {
|
|
959
959
|
const mediaType2 = key.toLowerCase();
|
|
960
960
|
return mediaType2 === "*" || mediaType2 === "*/*" ? { mediaTypePrefix: "", regexes: value } : { mediaTypePrefix: mediaType2.replace(/\*/, ""), regexes: value };
|
|
961
|
-
}).filter(
|
|
961
|
+
}).filter(
|
|
962
|
+
({ mediaTypePrefix }) => mediaTypePrefix === "" || mediaTypePrefix.endsWith("/") ? mediaType.startsWith(mediaTypePrefix) : mediaType === mediaTypePrefix
|
|
963
|
+
).flatMap(({ regexes }) => regexes).some((pattern) => pattern.test(url));
|
|
962
964
|
}
|
|
963
965
|
|
|
964
966
|
// src/load-api-key.ts
|