@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/CHANGELOG.md
CHANGED
package/dist/anthropic/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
|
35
35
|
var import_aws4fetch = require("aws4fetch");
|
|
36
36
|
|
|
37
37
|
// src/version.ts
|
|
38
|
-
var VERSION = true ? "3.0.
|
|
38
|
+
var VERSION = true ? "3.0.116" : "0.0.0-test";
|
|
39
39
|
|
|
40
40
|
// src/bedrock-sigv4-fetch.ts
|
|
41
41
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/anthropic/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { AwsV4Signer } from "aws4fetch";
|
|
25
25
|
|
|
26
26
|
// src/version.ts
|
|
27
|
-
var VERSION = true ? "3.0.
|
|
27
|
+
var VERSION = true ? "3.0.116" : "0.0.0-test";
|
|
28
28
|
|
|
29
29
|
// src/bedrock-sigv4-fetch.ts
|
|
30
30
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
30
30
|
var import_provider_utils8 = require("@ai-sdk/provider-utils");
|
|
31
31
|
|
|
32
32
|
// src/version.ts
|
|
33
|
-
var VERSION = true ? "3.0.
|
|
33
|
+
var VERSION = true ? "3.0.116" : "0.0.0-test";
|
|
34
34
|
|
|
35
35
|
// src/bedrock-provider.ts
|
|
36
36
|
var import_internal3 = require("@ai-sdk/anthropic/internal");
|
|
@@ -606,7 +606,7 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
606
606
|
toolUse: {
|
|
607
607
|
toolUseId: part.toolCallId,
|
|
608
608
|
name: sanitizeToolName(part.toolName),
|
|
609
|
-
input: part.input
|
|
609
|
+
input: toBedrockToolInput(part.input)
|
|
610
610
|
}
|
|
611
611
|
});
|
|
612
612
|
break;
|
|
@@ -628,6 +628,9 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
628
628
|
}
|
|
629
629
|
return { system, messages };
|
|
630
630
|
}
|
|
631
|
+
function toBedrockToolInput(input) {
|
|
632
|
+
return typeof input === "object" && input !== null && !Array.isArray(input) ? input : { rawInvalidInput: input };
|
|
633
|
+
}
|
|
631
634
|
function getBedrockImageFormat(mimeType) {
|
|
632
635
|
if (!mimeType) {
|
|
633
636
|
throw new import_provider3.UnsupportedFunctionalityError({
|