@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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/anthropic
2
2
 
3
+ ## 2.0.70
4
+
5
+ ### Patch Changes
6
+
7
+ - a9a7f73: feat(anthropic): support eagerInputStreaming option for fine-grained tool streaming
8
+
3
9
  ## 2.0.69
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -31,7 +31,7 @@ var import_provider4 = require("@ai-sdk/provider");
31
31
  var import_provider_utils20 = require("@ai-sdk/provider-utils");
32
32
 
33
33
  // src/version.ts
34
- var VERSION = true ? "2.0.69" : "0.0.0-test";
34
+ var VERSION = true ? "2.0.70" : "0.0.0-test";
35
35
 
36
36
  // src/anthropic-messages-language-model.ts
37
37
  var import_provider3 = require("@ai-sdk/provider");
@@ -948,6 +948,7 @@ async function prepareTools({
948
948
  disableParallelToolUse,
949
949
  cacheControlValidator
950
950
  }) {
951
+ var _a;
951
952
  tools = (tools == null ? void 0 : tools.length) ? tools : void 0;
952
953
  const toolWarnings = [];
953
954
  const betas = /* @__PURE__ */ new Set();
@@ -963,11 +964,14 @@ async function prepareTools({
963
964
  type: "tool definition",
964
965
  canCache: true
965
966
  });
967
+ const anthropicOptions = (_a = tool.providerOptions) == null ? void 0 : _a.anthropic;
968
+ const eagerInputStreaming = anthropicOptions == null ? void 0 : anthropicOptions.eagerInputStreaming;
966
969
  anthropicTools2.push({
967
970
  name: tool.name,
968
971
  description: tool.description,
969
972
  input_schema: tool.inputSchema,
970
- cache_control: cacheControl
973
+ cache_control: cacheControl,
974
+ ...eagerInputStreaming ? { eager_input_streaming: true } : {}
971
975
  });
972
976
  break;
973
977
  }