@ai-sdk/amazon-bedrock 3.0.115 → 3.0.116
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 +6 -0
- package/dist/anthropic/index.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
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.116" : "0.0.0-test";
|
|
12
12
|
|
|
13
13
|
// src/bedrock-provider.ts
|
|
14
14
|
import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
|
|
@@ -602,7 +602,7 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
602
602
|
toolUse: {
|
|
603
603
|
toolUseId: part.toolCallId,
|
|
604
604
|
name: sanitizeToolName(part.toolName),
|
|
605
|
-
input: part.input
|
|
605
|
+
input: toBedrockToolInput(part.input)
|
|
606
606
|
}
|
|
607
607
|
});
|
|
608
608
|
break;
|
|
@@ -624,6 +624,9 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
624
624
|
}
|
|
625
625
|
return { system, messages };
|
|
626
626
|
}
|
|
627
|
+
function toBedrockToolInput(input) {
|
|
628
|
+
return typeof input === "object" && input !== null && !Array.isArray(input) ? input : { rawInvalidInput: input };
|
|
629
|
+
}
|
|
627
630
|
function getBedrockImageFormat(mimeType) {
|
|
628
631
|
if (!mimeType) {
|
|
629
632
|
throw new UnsupportedFunctionalityError2({
|