@ai-sdk/provider-utils 3.0.22 → 3.0.23

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.mjs CHANGED
@@ -343,7 +343,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
343
343
  }
344
344
 
345
345
  // src/version.ts
346
- var VERSION = true ? "3.0.22" : "0.0.0-test";
346
+ var VERSION = true ? "3.0.23" : "0.0.0-test";
347
347
 
348
348
  // src/get-from-api.ts
349
349
  var getOriginalFetch = () => globalThis.fetch;
@@ -629,7 +629,7 @@ import { TypeValidationError as TypeValidationError2 } from "@ai-sdk/provider";
629
629
 
630
630
  // src/validator.ts
631
631
  import { TypeValidationError } from "@ai-sdk/provider";
632
- var validatorSymbol = Symbol.for("vercel.ai.validator");
632
+ var validatorSymbol = /* @__PURE__ */ Symbol.for("vercel.ai.validator");
633
633
  function validator(validate) {
634
634
  return { [validatorSymbol]: true, validate };
635
635
  }
@@ -1189,7 +1189,7 @@ var getRelativePath = (pathA, pathB) => {
1189
1189
  };
1190
1190
 
1191
1191
  // src/zod-to-json-schema/options.ts
1192
- var ignoreOverride = Symbol(
1192
+ var ignoreOverride = /* @__PURE__ */ Symbol(
1193
1193
  "Let zodToJsonSchema decide on which parser to use"
1194
1194
  );
1195
1195
  var defaultOptions = {
@@ -2411,7 +2411,7 @@ function zodSchema(zodSchema2, options) {
2411
2411
  }
2412
2412
 
2413
2413
  // src/schema.ts
2414
- var schemaSymbol = Symbol.for("vercel.ai.schema");
2414
+ var schemaSymbol = /* @__PURE__ */ Symbol.for("vercel.ai.schema");
2415
2415
  function lazySchema(createSchema) {
2416
2416
  let schema;
2417
2417
  return () => {
@@ -2477,10 +2477,13 @@ function validateDownloadUrl(url) {
2477
2477
  message: `Invalid URL: ${url}`
2478
2478
  });
2479
2479
  }
2480
+ if (parsed.protocol === "data:") {
2481
+ return;
2482
+ }
2480
2483
  if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
2481
2484
  throw new DownloadError({
2482
2485
  url,
2483
- message: `URL scheme must be http or https, got ${parsed.protocol}`
2486
+ message: `URL scheme must be http, https, or data, got ${parsed.protocol}`
2484
2487
  });
2485
2488
  }
2486
2489
  const hostname = parsed.hostname;