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

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/dist/index.mjs CHANGED
@@ -192,7 +192,7 @@ async function prepareTools({
192
192
  };
193
193
  }
194
194
  const supportedTools = tools.filter((tool) => {
195
- if (tool.type === "provider-defined" && tool.id === "anthropic.web_search_20250305") {
195
+ if (tool.type === "provider" && tool.id === "anthropic.web_search_20250305") {
196
196
  toolWarnings.push({
197
197
  type: "unsupported",
198
198
  feature: "web_search_20250305 tool",
@@ -211,13 +211,11 @@ async function prepareTools({
211
211
  };
212
212
  }
213
213
  const isAnthropicModel = modelId.includes("anthropic.");
214
- const providerDefinedTools = supportedTools.filter(
215
- (t) => t.type === "provider-defined"
216
- );
214
+ const ProviderTools = supportedTools.filter((t) => t.type === "provider");
217
215
  const functionTools = supportedTools.filter((t) => t.type === "function");
218
216
  let additionalTools = void 0;
219
217
  const bedrockTools = [];
220
- const usingAnthropicTools = isAnthropicModel && providerDefinedTools.length > 0;
218
+ const usingAnthropicTools = isAnthropicModel && ProviderTools.length > 0;
221
219
  if (usingAnthropicTools) {
222
220
  if (functionTools.length > 0) {
223
221
  toolWarnings.push({
@@ -231,7 +229,7 @@ async function prepareTools({
231
229
  toolWarnings: anthropicToolWarnings,
232
230
  betas: anthropicBetas
233
231
  } = await prepareAnthropicTools({
234
- tools: providerDefinedTools,
232
+ tools: ProviderTools,
235
233
  toolChoice
236
234
  });
237
235
  toolWarnings.push(...anthropicToolWarnings);
@@ -241,7 +239,7 @@ async function prepareTools({
241
239
  tool_choice: preparedAnthropicToolChoice
242
240
  };
243
241
  }
244
- for (const tool of providerDefinedTools) {
242
+ for (const tool of ProviderTools) {
245
243
  const toolFactory = Object.values(anthropicTools).find((factory) => {
246
244
  const instance = factory({});
247
245
  return instance.id === tool.id;
@@ -261,7 +259,7 @@ async function prepareTools({
261
259
  }
262
260
  }
263
261
  } else {
264
- for (const tool of providerDefinedTools) {
262
+ for (const tool of ProviderTools) {
265
263
  toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
266
264
  }
267
265
  }
@@ -1552,7 +1550,7 @@ import {
1552
1550
  import { AwsV4Signer } from "aws4fetch";
1553
1551
 
1554
1552
  // src/version.ts
1555
- var VERSION = true ? "4.0.0-beta.73" : "0.0.0-test";
1553
+ var VERSION = true ? "4.0.0-beta.75" : "0.0.0-test";
1556
1554
 
1557
1555
  // src/bedrock-sigv4-fetch.ts
1558
1556
  function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {