@ai-sdk/anthropic 2.0.89 → 2.0.90

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.
@@ -2311,7 +2311,7 @@ var AnthropicMessagesLanguageModel = class {
2311
2311
  topP = void 0;
2312
2312
  }
2313
2313
  }
2314
- const isAnthropicModel = isKnownModel || this.modelId.startsWith("claude-");
2314
+ const isAnthropicModel = isKnownModel || this.modelId.includes("claude-");
2315
2315
  const structureOutputMode = (_a = anthropicOptions == null ? void 0 : anthropicOptions.structuredOutputMode) != null ? _a : "jsonTool";
2316
2316
  const useStructuredOutput = structureOutputMode === "outputFormat" || structureOutputMode === "auto" && supportsStructuredOutput;
2317
2317
  const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useStructuredOutput ? {
@@ -3644,6 +3644,20 @@ function getModelCapabilities(modelId) {
3644
3644
  rejectsSamplingParameters: false,
3645
3645
  isKnownModel: true
3646
3646
  };
3647
+ } else if (/claude-(?:instant(?:-|$)|v?2(?=$|[-.:])|3(?=$|[-.]))/.test(modelId)) {
3648
+ return {
3649
+ maxOutputTokens: 4096,
3650
+ supportsStructuredOutput: false,
3651
+ rejectsSamplingParameters: false,
3652
+ isKnownModel: false
3653
+ };
3654
+ } else if (modelId.includes("claude-")) {
3655
+ return {
3656
+ maxOutputTokens: 128e3,
3657
+ supportsStructuredOutput: true,
3658
+ rejectsSamplingParameters: true,
3659
+ isKnownModel: false
3660
+ };
3647
3661
  } else {
3648
3662
  return {
3649
3663
  maxOutputTokens: 4096,