@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 +14 -0
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/get-error-message.ts +1 -1
- package/src/load-api-key.ts +1 -1
- package/src/load-setting.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -453,7 +453,7 @@ function getErrorMessage(error) {
|
|
|
453
453
|
return error;
|
|
454
454
|
}
|
|
455
455
|
if (error instanceof Error) {
|
|
456
|
-
return error.
|
|
456
|
+
return error.toString();
|
|
457
457
|
}
|
|
458
458
|
return JSON.stringify(error);
|
|
459
459
|
}
|
|
@@ -577,7 +577,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
|
|
|
577
577
|
}
|
|
578
578
|
|
|
579
579
|
// src/version.ts
|
|
580
|
-
var VERSION = true ? "5.0.0-beta.
|
|
580
|
+
var VERSION = true ? "5.0.0-beta.12" : "0.0.0-test";
|
|
581
581
|
|
|
582
582
|
// src/get-from-api.ts
|
|
583
583
|
var getOriginalFetch = () => globalThis.fetch;
|
|
@@ -730,7 +730,7 @@ function loadApiKey({
|
|
|
730
730
|
}
|
|
731
731
|
if (typeof process === "undefined") {
|
|
732
732
|
throw new LoadAPIKeyError({
|
|
733
|
-
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables
|
|
733
|
+
message: `${description} API key is missing. Pass it using the '${apiKeyParameterName}' parameter. Environment variables are not supported in this environment.`
|
|
734
734
|
});
|
|
735
735
|
}
|
|
736
736
|
apiKey = process.env[environmentVariableName];
|
|
@@ -840,7 +840,7 @@ function loadSetting({
|
|
|
840
840
|
}
|
|
841
841
|
if (typeof process === "undefined") {
|
|
842
842
|
throw new LoadSettingError({
|
|
843
|
-
message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables
|
|
843
|
+
message: `${description} setting is missing. Pass it using the '${settingName}' parameter. Environment variables are not supported in this environment.`
|
|
844
844
|
});
|
|
845
845
|
}
|
|
846
846
|
settingValue = process.env[environmentVariableName];
|