@ai-sdk/anthropic 2.0.76 → 2.0.77

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.
@@ -1,7 +1,6 @@
1
1
  // src/anthropic-messages-language-model.ts
2
2
  import {
3
- APICallError,
4
- UnsupportedFunctionalityError as UnsupportedFunctionalityError3
3
+ APICallError
5
4
  } from "@ai-sdk/provider";
6
5
  import {
7
6
  combineHeaders,
@@ -2237,9 +2236,15 @@ var AnthropicMessagesLanguageModel = class {
2237
2236
  };
2238
2237
  if (isThinking) {
2239
2238
  if (thinkingType === "enabled" && thinkingBudget == null) {
2240
- throw new UnsupportedFunctionalityError3({
2241
- functionality: "thinking requires a budget"
2239
+ warnings.push({
2240
+ type: "other",
2241
+ message: "thinking budget is required when thinking is enabled. using default budget of 1024 tokens."
2242
2242
  });
2243
+ baseArgs.thinking = {
2244
+ type: "enabled",
2245
+ budget_tokens: 1024
2246
+ };
2247
+ thinkingBudget = 1024;
2243
2248
  }
2244
2249
  if (baseArgs.temperature != null) {
2245
2250
  baseArgs.temperature = void 0;