@ai-sdk/amazon-bedrock 4.0.0-beta.18 → 4.0.0-beta.20

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
@@ -8,7 +8,7 @@ import {
8
8
  } from "@ai-sdk/provider-utils";
9
9
 
10
10
  // src/version.ts
11
- var VERSION = true ? "4.0.0-beta.18" : "0.0.0-test";
11
+ var VERSION = true ? "4.0.0-beta.20" : "0.0.0-test";
12
12
 
13
13
  // src/bedrock-provider.ts
14
14
  import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
@@ -176,7 +176,7 @@ import {
176
176
  anthropicTools,
177
177
  prepareTools as prepareAnthropicTools
178
178
  } from "@ai-sdk/anthropic/internal";
179
- function prepareTools({
179
+ async function prepareTools({
180
180
  tools,
181
181
  toolChoice,
182
182
  modelId
@@ -230,7 +230,7 @@ function prepareTools({
230
230
  toolChoice: preparedAnthropicToolChoice,
231
231
  toolWarnings: anthropicToolWarnings,
232
232
  betas: anthropicBetas
233
- } = prepareAnthropicTools({
233
+ } = await prepareAnthropicTools({
234
234
  tools: providerDefinedTools,
235
235
  toolChoice
236
236
  });
@@ -252,7 +252,7 @@ function prepareTools({
252
252
  toolSpec: {
253
253
  name: tool.name,
254
254
  inputSchema: {
255
- json: asSchema(fullToolDefinition.inputSchema).jsonSchema
255
+ json: await asSchema(fullToolDefinition.inputSchema).jsonSchema
256
256
  }
257
257
  }
258
258
  });
@@ -734,7 +734,7 @@ var BedrockChatLanguageModel = class {
734
734
  description: "Respond with a JSON object.",
735
735
  inputSchema: responseFormat.schema
736
736
  } : void 0;
737
- const { toolConfig, additionalTools, toolWarnings, betas } = prepareTools({
737
+ const { toolConfig, additionalTools, toolWarnings, betas } = await prepareTools({
738
738
  tools: jsonResponseTool ? [jsonResponseTool, ...tools != null ? tools : []] : tools,
739
739
  toolChoice: jsonResponseTool != null ? { type: "tool", toolName: jsonResponseTool.name } : toolChoice,
740
740
  modelId: this.modelId