@ai-sdk/amazon-bedrock 3.1.0-beta.11 → 3.1.0-beta.13
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 +18 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
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.1.0-beta.
|
|
11
|
+
var VERSION = true ? "3.1.0-beta.13" : "0.0.0-test";
|
|
12
12
|
|
|
13
13
|
// src/bedrock-provider.ts
|
|
14
14
|
import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
|
|
@@ -329,6 +329,7 @@ async function shouldEnableCitations(providerMetadata) {
|
|
|
329
329
|
return (_b = (_a = bedrockOptions == null ? void 0 : bedrockOptions.citations) == null ? void 0 : _a.enabled) != null ? _b : false;
|
|
330
330
|
}
|
|
331
331
|
async function convertToBedrockChatMessages(prompt) {
|
|
332
|
+
var _a;
|
|
332
333
|
const blocks = groupIntoBlocks(prompt);
|
|
333
334
|
let system = [];
|
|
334
335
|
const messages = [];
|
|
@@ -441,6 +442,11 @@ async function convertToBedrockChatMessages(prompt) {
|
|
|
441
442
|
case "error-text":
|
|
442
443
|
toolResultContent = [{ text: output.value }];
|
|
443
444
|
break;
|
|
445
|
+
case "execution-denied":
|
|
446
|
+
toolResultContent = [
|
|
447
|
+
{ text: (_a = output.reason) != null ? _a : "Tool execution denied." }
|
|
448
|
+
];
|
|
449
|
+
break;
|
|
444
450
|
case "json":
|
|
445
451
|
case "error-json":
|
|
446
452
|
default:
|