@ai-sdk/provider-utils 5.0.0-beta.10 → 5.0.0-beta.12

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,19 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 5.0.0-beta.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 46d1149: chore(provider-utils,google): fix grammar errors in error and warning messages
8
+
9
+ ## 5.0.0-beta.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 6fd51c0: fix(provider): preserve error type prefix in getErrorMessage
14
+ - Updated dependencies [6fd51c0]
15
+ - @ai-sdk/provider@4.0.0-beta.7
16
+
3
17
  ## 5.0.0-beta.10
4
18
 
5
19
  ### Patch Changes
package/dist/index.js CHANGED
@@ -554,7 +554,7 @@ function getErrorMessage(error) {
554
554
  return error;
555
555
  }
556
556
  if (error instanceof Error) {
557
- return error.message;
557
+ return error.toString();
558
558
  }
559
559
  return JSON.stringify(error);
560
560
  }
@@ -678,7 +678,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
678
678
  }
679
679
 
680
680
  // src/version.ts
681
- var VERSION = true ? "5.0.0-beta.10" : "0.0.0-test";
681
+ var VERSION = true ? "5.0.0-beta.12" : "0.0.0-test";
682
682
 
683
683
  // src/get-from-api.ts
684
684
  var getOriginalFetch = () => globalThis.fetch;
@@ -831,7 +831,7 @@ function loadApiKey({
831
831
  }
832
832
  if (typeof process === "undefined") {
833
833
  throw new import_provider5.LoadAPIKeyError({
834
- message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables is not supported in this environment.`
834
+ message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables are not supported in this environment.`
835
835
  });
836
836
  }
837
837
  apiKey = process.env[environmentVariableName];
@@ -941,7 +941,7 @@ function loadSetting({
941
941
  }
942
942
  if (typeof process === "undefined") {
943
943
  throw new import_provider6.LoadSettingError({
944
- message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables is not supported in this environment.`
944
+ message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables are not supported in this environment.`
945
945
  });
946
946
  }
947
947
  settingValue = process.env[environmentVariableName];