@ai-sdk/provider 2.0.3 → 2.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 2.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 594787e: fix(provider): preserve opaque file URI strings for provider serialization
8
+
9
+ ## 2.0.4
10
+
11
+ ### Patch Changes
12
+
13
+ - c2089a9: Retry unclassified empty image results, preserve completed-attempt diagnostics, add provider-independent result retryability classification, preserve it through the AI Gateway, and mark Google Vertex RAI-filtered results as terminal.
14
+
3
15
  ## 2.0.3
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -496,6 +496,11 @@ type ImageModelV2 = {
496
496
  */
497
497
  images: Array<string> | Array<Uint8Array>;
498
498
  /**
499
+ Whether an unsuccessful result, such as an empty image result, can be
500
+ retried. When omitted, the result is unclassified.
501
+ */
502
+ isRetryable?: boolean;
503
+ /**
499
504
  Warnings for the call, e.g. unsupported settings.
500
505
  */
501
506
  warnings: Array<ImageModelV2CallWarning>;
@@ -649,6 +654,13 @@ interface LanguageModelV2FilePart {
649
654
  */
650
655
  data: LanguageModelV2DataContent;
651
656
  /**
657
+ * The original URL string before it was parsed into a `URL`.
658
+ *
659
+ * This is available when parsing would change the string and a provider
660
+ * needs to preserve an opaque non-HTTP URI exactly.
661
+ */
662
+ originalUrl?: string;
663
+ /**
652
664
  IANA media type of the file.
653
665
 
654
666
  Can support wildcards, e.g. `image/*` (in which case the provider needs to take appropriate action).
package/dist/index.d.ts CHANGED
@@ -496,6 +496,11 @@ type ImageModelV2 = {
496
496
  */
497
497
  images: Array<string> | Array<Uint8Array>;
498
498
  /**
499
+ Whether an unsuccessful result, such as an empty image result, can be
500
+ retried. When omitted, the result is unclassified.
501
+ */
502
+ isRetryable?: boolean;
503
+ /**
499
504
  Warnings for the call, e.g. unsupported settings.
500
505
  */
501
506
  warnings: Array<ImageModelV2CallWarning>;
@@ -649,6 +654,13 @@ interface LanguageModelV2FilePart {
649
654
  */
650
655
  data: LanguageModelV2DataContent;
651
656
  /**
657
+ * The original URL string before it was parsed into a `URL`.
658
+ *
659
+ * This is available when parsing would change the string and a provider
660
+ * needs to preserve an opaque non-HTTP URI exactly.
661
+ */
662
+ originalUrl?: string;
663
+ /**
652
664
  IANA media type of the file.
653
665
 
654
666
  Can support wildcards, e.g. `image/*` (in which case the provider needs to take appropriate action).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",