@ai-sdk/amazon-bedrock 3.0.32 → 3.0.34
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 +15 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +94 -104
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
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 ? "3.0.
|
|
11
|
+
var VERSION = true ? "3.0.34" : "0.0.0-test";
|
|
12
12
|
|
|
13
13
|
// src/bedrock-provider.ts
|
|
14
14
|
import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
postJsonToApi,
|
|
23
23
|
resolve
|
|
24
24
|
} from "@ai-sdk/provider-utils";
|
|
25
|
-
import
|
|
25
|
+
import { z as z3 } from "zod/v4";
|
|
26
26
|
|
|
27
27
|
// src/bedrock-api-types.ts
|
|
28
28
|
var BEDROCK_CACHE_POINT = {
|
|
@@ -59,7 +59,7 @@ var BEDROCK_DOCUMENT_MIME_TYPES = {
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
// src/bedrock-chat-options.ts
|
|
62
|
-
import
|
|
62
|
+
import { z } from "zod/v4";
|
|
63
63
|
var bedrockFilePartProviderOptions = z.object({
|
|
64
64
|
/**
|
|
65
65
|
* Citation configuration for this document.
|
|
@@ -86,7 +86,7 @@ var bedrockProviderOptions = z.object({
|
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
// src/bedrock-error.ts
|
|
89
|
-
import
|
|
89
|
+
import { z as z2 } from "zod/v4";
|
|
90
90
|
var BedrockErrorSchema = z2.object({
|
|
91
91
|
message: z2.string(),
|
|
92
92
|
type: z2.string().nullish()
|
|
@@ -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
|
});
|
|
@@ -729,7 +729,7 @@ var BedrockChatLanguageModel = class {
|
|
|
729
729
|
description: "Respond with a JSON object.",
|
|
730
730
|
inputSchema: responseFormat.schema
|
|
731
731
|
} : void 0;
|
|
732
|
-
const { toolConfig, additionalTools, toolWarnings, betas } = prepareTools({
|
|
732
|
+
const { toolConfig, additionalTools, toolWarnings, betas } = await prepareTools({
|
|
733
733
|
tools: jsonResponseTool ? [jsonResponseTool, ...tools != null ? tools : []] : tools,
|
|
734
734
|
toolChoice: jsonResponseTool != null ? { type: "tool", toolName: jsonResponseTool.name } : toolChoice,
|
|
735
735
|
modelId: this.modelId
|
|
@@ -1322,7 +1322,7 @@ import {
|
|
|
1322
1322
|
} from "@ai-sdk/provider-utils";
|
|
1323
1323
|
|
|
1324
1324
|
// src/bedrock-embedding-options.ts
|
|
1325
|
-
import
|
|
1325
|
+
import { z as z4 } from "zod/v4";
|
|
1326
1326
|
var bedrockEmbeddingProviderOptions = z4.object({
|
|
1327
1327
|
/**
|
|
1328
1328
|
The number of dimensions the resulting output embeddings should have (defaults to 1024).
|
|
@@ -1337,7 +1337,7 @@ var bedrockEmbeddingProviderOptions = z4.object({
|
|
|
1337
1337
|
});
|
|
1338
1338
|
|
|
1339
1339
|
// src/bedrock-embedding-model.ts
|
|
1340
|
-
import
|
|
1340
|
+
import { z as z5 } from "zod/v4";
|
|
1341
1341
|
var BedrockEmbeddingModel = class {
|
|
1342
1342
|
constructor(modelId, config) {
|
|
1343
1343
|
this.modelId = modelId;
|
|
@@ -1419,7 +1419,7 @@ var modelMaxImagesPerCall = {
|
|
|
1419
1419
|
};
|
|
1420
1420
|
|
|
1421
1421
|
// src/bedrock-image-model.ts
|
|
1422
|
-
import
|
|
1422
|
+
import { z as z6 } from "zod/v4";
|
|
1423
1423
|
var BedrockImageModel = class {
|
|
1424
1424
|
constructor(modelId, config) {
|
|
1425
1425
|
this.modelId = modelId;
|