@ai-sdk/anthropic 2.0.76 → 2.0.78

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,12 +11,11 @@ import {
11
11
  } from "@ai-sdk/provider-utils";
12
12
 
13
13
  // src/version.ts
14
- var VERSION = true ? "2.0.76" : "0.0.0-test";
14
+ var VERSION = true ? "2.0.78" : "0.0.0-test";
15
15
 
16
16
  // src/anthropic-messages-language-model.ts
17
17
  import {
18
- APICallError,
19
- UnsupportedFunctionalityError as UnsupportedFunctionalityError3
18
+ APICallError
20
19
  } from "@ai-sdk/provider";
21
20
  import {
22
21
  combineHeaders,
@@ -2252,9 +2251,15 @@ var AnthropicMessagesLanguageModel = class {
2252
2251
  };
2253
2252
  if (isThinking) {
2254
2253
  if (thinkingType === "enabled" && thinkingBudget == null) {
2255
- throw new UnsupportedFunctionalityError3({
2256
- functionality: "thinking requires a budget"
2254
+ warnings.push({
2255
+ type: "other",
2256
+ message: "thinking budget is required when thinking is enabled. using default budget of 1024 tokens."
2257
2257
  });
2258
+ baseArgs.thinking = {
2259
+ type: "enabled",
2260
+ budget_tokens: 1024
2261
+ };
2262
+ thinkingBudget = 1024;
2258
2263
  }
2259
2264
  if (baseArgs.temperature != null) {
2260
2265
  baseArgs.temperature = void 0;