@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/package.json
CHANGED
package/src/bedrock-api-types.ts
CHANGED
|
@@ -124,14 +124,19 @@ export async function prepareTools({
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
const filteredFunctionTools =
|
|
128
|
+
toolChoice?.type === 'tool'
|
|
129
|
+
? functionTools.filter(t => t.name === toolChoice.toolName)
|
|
130
|
+
: functionTools;
|
|
131
|
+
|
|
132
|
+
for (const tool of filteredFunctionTools) {
|
|
129
133
|
bedrockTools.push({
|
|
130
134
|
toolSpec: {
|
|
131
135
|
name: tool.name,
|
|
132
136
|
...(tool.description?.trim() !== ''
|
|
133
137
|
? { description: tool.description }
|
|
134
138
|
: {}),
|
|
139
|
+
...(tool.strict != null ? { strict: tool.strict } : {}),
|
|
135
140
|
inputSchema: {
|
|
136
141
|
json: tool.inputSchema as JSONObject,
|
|
137
142
|
},
|