@ai-sdk/anthropic 2.0.43 → 2.0.45

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
@@ -11,7 +11,7 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "2.0.43" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.45" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
@@ -1803,6 +1803,21 @@ var AnthropicMessagesLanguageModel = class {
1803
1803
  setting: "seed"
1804
1804
  });
1805
1805
  }
1806
+ if (temperature != null && temperature > 1) {
1807
+ warnings.push({
1808
+ type: "unsupported-setting",
1809
+ setting: "temperature",
1810
+ details: `${temperature} exceeds anthropic maximum of 1.0. clamped to 1.0`
1811
+ });
1812
+ temperature = 1;
1813
+ } else if (temperature != null && temperature < 0) {
1814
+ warnings.push({
1815
+ type: "unsupported-setting",
1816
+ setting: "temperature",
1817
+ details: `${temperature} is below anthropic minimum of 0. clamped to 0`
1818
+ });
1819
+ temperature = 0;
1820
+ }
1806
1821
  if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
1807
1822
  if (responseFormat.schema == null) {
1808
1823
  warnings.push({