@ai-sdk/amazon-bedrock 4.0.64 → 4.0.66
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 +12 -0
- package/dist/anthropic/index.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/bedrock-api-types.ts +1 -0
- package/src/bedrock-prepare-tools.ts +7 -2
package/dist/index.mjs
CHANGED
|
@@ -273,11 +273,13 @@ async function prepareTools({
|
|
|
273
273
|
toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
const filteredFunctionTools = (toolChoice == null ? void 0 : toolChoice.type) === "tool" ? functionTools.filter((t) => t.name === toolChoice.toolName) : functionTools;
|
|
277
|
+
for (const tool of filteredFunctionTools) {
|
|
277
278
|
bedrockTools.push({
|
|
278
279
|
toolSpec: {
|
|
279
280
|
name: tool.name,
|
|
280
281
|
...((_a = tool.description) == null ? void 0 : _a.trim()) !== "" ? { description: tool.description } : {},
|
|
282
|
+
...tool.strict != null ? { strict: tool.strict } : {},
|
|
281
283
|
inputSchema: {
|
|
282
284
|
json: tool.inputSchema
|
|
283
285
|
}
|
|
@@ -1949,7 +1951,7 @@ import {
|
|
|
1949
1951
|
import { AwsV4Signer } from "aws4fetch";
|
|
1950
1952
|
|
|
1951
1953
|
// src/version.ts
|
|
1952
|
-
var VERSION = true ? "4.0.
|
|
1954
|
+
var VERSION = true ? "4.0.66" : "0.0.0-test";
|
|
1953
1955
|
|
|
1954
1956
|
// src/bedrock-sigv4-fetch.ts
|
|
1955
1957
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|