@ai-sdk/anthropic 4.0.91 → 4.0.92

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/anthropic",
3
- "version": "4.0.91",
3
+ "version": "4.0.92",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@ai-sdk/provider": "4.0.34",
39
- "@ai-sdk/provider-utils": "5.0.70"
39
+ "@ai-sdk/provider-utils": "5.0.71"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@ai-sdk/test-server": "2.0.4",
@@ -3667,6 +3667,13 @@ function resolveAnthropicReasoningConfig({
3667
3667
  // `between_tools` is the lowest thinking setting on models that support
3668
3668
  // it: no upfront thinking, only short progress notes between tool calls.
3669
3669
  if (supportsBetweenToolsThinking) {
3670
+ warnings.push({
3671
+ type: 'compatibility',
3672
+ feature: 'reasoning',
3673
+ details:
3674
+ `reasoning 'none' is not supported by ${modelId}; thinking cannot be disabled. ` +
3675
+ `Using 'between_tools' thinking, the lowest thinking setting, instead.`,
3676
+ });
3670
3677
  return { thinking: { type: 'between_tools' } };
3671
3678
  }
3672
3679
 
@@ -3691,11 +3698,10 @@ function resolveAnthropicReasoningConfig({
3691
3698
  const effort = mapReasoningToProviderEffort({
3692
3699
  reasoning,
3693
3700
  effortMap: {
3694
- minimal: 'low' as const,
3695
3701
  low: 'low' as const,
3696
3702
  medium: 'medium' as const,
3697
3703
  high: 'high' as const,
3698
- xhigh: supportsXhighEffort ? ('xhigh' as const) : ('max' as const),
3704
+ ...(supportsXhighEffort && { xhigh: 'xhigh' as const }),
3699
3705
  max: 'max' as const,
3700
3706
  },
3701
3707
  warnings,
@@ -3712,9 +3718,6 @@ function resolveAnthropicReasoningConfig({
3712
3718
  maxReasoningBudget: maxOutputTokensForModel,
3713
3719
  warnings,
3714
3720
  });
3715
- if (budgetTokens == null) {
3716
- return undefined;
3717
- }
3718
3721
  return { thinking: { type: 'enabled', budgetTokens } };
3719
3722
  }
3720
3723