@ai-sdk/amazon-bedrock 4.0.0-beta.73 → 4.0.0-beta.74

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,15 @@
1
1
  # @ai-sdk/amazon-bedrock
2
2
 
3
+ ## 4.0.0-beta.74
4
+
5
+ ### Patch Changes
6
+
7
+ - 544d4e8: chore(specification): rename v3 provider defined tool to provider tool
8
+ - Updated dependencies [544d4e8]
9
+ - @ai-sdk/provider-utils@4.0.0-beta.40
10
+ - @ai-sdk/anthropic@3.0.0-beta.66
11
+ - @ai-sdk/provider@3.0.0-beta.22
12
+
3
13
  ## 4.0.0-beta.73
4
14
 
5
15
  ### Patch Changes
package/dist/index.js CHANGED
@@ -198,7 +198,7 @@ async function prepareTools({
198
198
  };
199
199
  }
200
200
  const supportedTools = tools.filter((tool) => {
201
- if (tool.type === "provider-defined" && tool.id === "anthropic.web_search_20250305") {
201
+ if (tool.type === "provider" && tool.id === "anthropic.web_search_20250305") {
202
202
  toolWarnings.push({
203
203
  type: "unsupported",
204
204
  feature: "web_search_20250305 tool",
@@ -217,13 +217,11 @@ async function prepareTools({
217
217
  };
218
218
  }
219
219
  const isAnthropicModel = modelId.includes("anthropic.");
220
- const providerDefinedTools = supportedTools.filter(
221
- (t) => t.type === "provider-defined"
222
- );
220
+ const ProviderTools = supportedTools.filter((t) => t.type === "provider");
223
221
  const functionTools = supportedTools.filter((t) => t.type === "function");
224
222
  let additionalTools = void 0;
225
223
  const bedrockTools = [];
226
- const usingAnthropicTools = isAnthropicModel && providerDefinedTools.length > 0;
224
+ const usingAnthropicTools = isAnthropicModel && ProviderTools.length > 0;
227
225
  if (usingAnthropicTools) {
228
226
  if (functionTools.length > 0) {
229
227
  toolWarnings.push({
@@ -237,7 +235,7 @@ async function prepareTools({
237
235
  toolWarnings: anthropicToolWarnings,
238
236
  betas: anthropicBetas
239
237
  } = await (0, import_internal.prepareTools)({
240
- tools: providerDefinedTools,
238
+ tools: ProviderTools,
241
239
  toolChoice
242
240
  });
243
241
  toolWarnings.push(...anthropicToolWarnings);
@@ -247,7 +245,7 @@ async function prepareTools({
247
245
  tool_choice: preparedAnthropicToolChoice
248
246
  };
249
247
  }
250
- for (const tool of providerDefinedTools) {
248
+ for (const tool of ProviderTools) {
251
249
  const toolFactory = Object.values(import_internal.anthropicTools).find((factory) => {
252
250
  const instance = factory({});
253
251
  return instance.id === tool.id;
@@ -267,7 +265,7 @@ async function prepareTools({
267
265
  }
268
266
  }
269
267
  } else {
270
- for (const tool of providerDefinedTools) {
268
+ for (const tool of ProviderTools) {
271
269
  toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
272
270
  }
273
271
  }
@@ -1536,7 +1534,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
1536
1534
  var import_aws4fetch = require("aws4fetch");
1537
1535
 
1538
1536
  // src/version.ts
1539
- var VERSION = true ? "4.0.0-beta.73" : "0.0.0-test";
1537
+ var VERSION = true ? "4.0.0-beta.74" : "0.0.0-test";
1540
1538
 
1541
1539
  // src/bedrock-sigv4-fetch.ts
1542
1540
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {