@ai-sdk/anthropic 4.0.18 → 4.0.19

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.
@@ -3647,7 +3647,7 @@ var AnthropicLanguageModel = class _AnthropicLanguageModel {
3647
3647
  topP = void 0;
3648
3648
  }
3649
3649
  }
3650
- const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
3650
+ const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
3651
3651
  const supportsStructuredOutput = ((_a = this.config.supportsNativeStructuredOutput) != null ? _a : true) && modelSupportsStructuredOutput;
3652
3652
  const supportsStrictTools = ((_b = this.config.supportsStrictTools) != null ? _b : true) && modelSupportsStructuredOutput;
3653
3653
  const structureOutputMode = (_c = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _c : "auto";
@@ -5493,6 +5493,24 @@ function getModelCapabilities(modelId) {
5493
5493
  supportsXhighEffort: false,
5494
5494
  isKnownModel: true
5495
5495
  };
5496
+ } else if (/claude-(?:instant(?:-|$)|v?2(?=$|[-.:])|3(?=$|[-.]))/.test(modelId)) {
5497
+ return {
5498
+ maxOutputTokens: 4096,
5499
+ supportsStructuredOutput: false,
5500
+ supportsAdaptiveThinking: false,
5501
+ rejectsSamplingParameters: false,
5502
+ supportsXhighEffort: false,
5503
+ isKnownModel: false
5504
+ };
5505
+ } else if (modelId.includes("claude-")) {
5506
+ return {
5507
+ maxOutputTokens: 128e3,
5508
+ supportsStructuredOutput: true,
5509
+ supportsAdaptiveThinking: true,
5510
+ rejectsSamplingParameters: true,
5511
+ supportsXhighEffort: true,
5512
+ isKnownModel: false
5513
+ };
5496
5514
  } else {
5497
5515
  return {
5498
5516
  maxOutputTokens: 4096,