@ai-sdk/amazon-bedrock 4.0.0-beta.59 → 4.0.0-beta.60
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.js +16 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.60
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 33343c3: fix(amazon-bedrock): clamp temperature to valid 0-1 range with warnings
|
|
8
|
+
- Updated dependencies [1d15673]
|
|
9
|
+
- @ai-sdk/anthropic@3.0.0-beta.54
|
|
10
|
+
|
|
3
11
|
## 4.0.0-beta.59
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -718,6 +718,21 @@ var BedrockChatLanguageModel = class {
|
|
|
718
718
|
setting: "seed"
|
|
719
719
|
});
|
|
720
720
|
}
|
|
721
|
+
if (temperature != null && temperature > 1) {
|
|
722
|
+
warnings.push({
|
|
723
|
+
type: "unsupported-setting",
|
|
724
|
+
setting: "temperature",
|
|
725
|
+
details: `${temperature} exceeds bedrock maximum of 1.0. clamped to 1.0`
|
|
726
|
+
});
|
|
727
|
+
temperature = 1;
|
|
728
|
+
} else if (temperature != null && temperature < 0) {
|
|
729
|
+
warnings.push({
|
|
730
|
+
type: "unsupported-setting",
|
|
731
|
+
setting: "temperature",
|
|
732
|
+
details: `${temperature} is below bedrock minimum of 0. clamped to 0`
|
|
733
|
+
});
|
|
734
|
+
temperature = 0;
|
|
735
|
+
}
|
|
721
736
|
if (responseFormat != null && responseFormat.type !== "text" && responseFormat.type !== "json") {
|
|
722
737
|
warnings.push({
|
|
723
738
|
type: "unsupported-setting",
|
|
@@ -1511,7 +1526,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
|
1511
1526
|
var import_aws4fetch = require("aws4fetch");
|
|
1512
1527
|
|
|
1513
1528
|
// src/version.ts
|
|
1514
|
-
var VERSION = true ? "4.0.0-beta.
|
|
1529
|
+
var VERSION = true ? "4.0.0-beta.60" : "0.0.0-test";
|
|
1515
1530
|
|
|
1516
1531
|
// src/bedrock-sigv4-fetch.ts
|
|
1517
1532
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|