@ai-sdk/anthropic 3.0.0-beta.57 → 3.0.0-beta.59

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.
@@ -641,7 +641,11 @@ var anthropicProviderOptions = z3.object({
641
641
  *
642
642
  * @default true
643
643
  */
644
- toolStreaming: z3.boolean().optional()
644
+ toolStreaming: z3.boolean().optional(),
645
+ /**
646
+ * @default 'high'
647
+ */
648
+ effort: z3.enum(["low", "medium", "high"]).optional()
645
649
  });
646
650
 
647
651
  // src/anthropic-prepare-tools.ts
@@ -2003,6 +2007,9 @@ var AnthropicMessagesLanguageModel = class {
2003
2007
  ...isThinking && {
2004
2008
  thinking: { type: "enabled", budget_tokens: thinkingBudget }
2005
2009
  },
2010
+ ...(anthropicOptions == null ? void 0 : anthropicOptions.effort) && {
2011
+ output_config: { effort: anthropicOptions.effort }
2012
+ },
2006
2013
  // structured output:
2007
2014
  ...useStructuredOutput && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && {
2008
2015
  output_format: {
@@ -2096,6 +2103,9 @@ var AnthropicMessagesLanguageModel = class {
2096
2103
  });
2097
2104
  }
2098
2105
  }
2106
+ if (anthropicOptions == null ? void 0 : anthropicOptions.effort) {
2107
+ betas.add("effort-2025-11-24");
2108
+ }
2099
2109
  if (stream && ((_f = anthropicOptions == null ? void 0 : anthropicOptions.toolStreaming) != null ? _f : true)) {
2100
2110
  betas.add("fine-grained-tool-streaming-2025-05-14");
2101
2111
  }
@@ -2979,7 +2989,7 @@ var AnthropicMessagesLanguageModel = class {
2979
2989
  }
2980
2990
  };
2981
2991
  function getModelCapabilities(modelId) {
2982
- if (modelId.includes("claude-sonnet-4-5")) {
2992
+ if (modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5")) {
2983
2993
  return {
2984
2994
  maxOutputTokens: 64e3,
2985
2995
  supportsStructuredOutput: true,