@ai-sdk/anthropic 2.0.69 → 2.0.70

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.
@@ -479,6 +479,7 @@ type AnthropicTool = {
479
479
  description: string | undefined;
480
480
  input_schema: JSONSchema7;
481
481
  cache_control: AnthropicCacheControl | undefined;
482
+ eager_input_streaming?: boolean;
482
483
  } | {
483
484
  type: 'code_execution_20250522';
484
485
  name: string;
@@ -479,6 +479,7 @@ type AnthropicTool = {
479
479
  description: string | undefined;
480
480
  input_schema: JSONSchema7;
481
481
  cache_control: AnthropicCacheControl | undefined;
482
+ eager_input_streaming?: boolean;
482
483
  } | {
483
484
  type: 'code_execution_20250522';
484
485
  name: string;
@@ -941,6 +941,7 @@ async function prepareTools({
941
941
  disableParallelToolUse,
942
942
  cacheControlValidator
943
943
  }) {
944
+ var _a;
944
945
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
945
946
  const toolWarnings = [];
946
947
  const betas = /* @__PURE__ */ new Set();
@@ -956,11 +957,14 @@ async function prepareTools({
956
957
  type: "tool definition",
957
958
  canCache: true
958
959
  });
960
+ const anthropicOptions = (_a = tool.providerOptions) == null ? void 0 : _a.anthropic;
961
+ const eagerInputStreaming = anthropicOptions == null ? void 0 : anthropicOptions.eagerInputStreaming;
959
962
  anthropicTools2.push({
960
963
  name: tool.name,
961
964
  description: tool.description,
962
965
  input_schema: tool.inputSchema,
963
- cache_control: cacheControl
966
+ cache_control: cacheControl,
967
+ ...eagerInputStreaming ? { eager_input_streaming: true } : {}
964
968
  });
965
969
  break;
966
970
  }