@ai-sdk/amazon-bedrock 4.0.63 → 4.0.65

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/amazon-bedrock",
3
- "version": "4.0.63",
3
+ "version": "4.0.65",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
@@ -38,17 +38,17 @@
38
38
  "@smithy/eventstream-codec": "^4.0.1",
39
39
  "@smithy/util-utf8": "^4.0.0",
40
40
  "aws4fetch": "^1.0.20",
41
- "@ai-sdk/anthropic": "3.0.46",
42
- "@ai-sdk/provider-utils": "4.0.15",
43
- "@ai-sdk/provider": "3.0.8"
41
+ "@ai-sdk/anthropic": "3.0.47",
42
+ "@ai-sdk/provider": "3.0.8",
43
+ "@ai-sdk/provider-utils": "4.0.15"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@types/node": "20.17.24",
47
47
  "tsup": "^8.3.0",
48
48
  "typescript": "5.8.3",
49
49
  "zod": "3.25.76",
50
- "@vercel/ai-tsconfig": "0.0.0",
51
- "@ai-sdk/test-server": "1.0.3"
50
+ "@ai-sdk/test-server": "1.0.3",
51
+ "@vercel/ai-tsconfig": "0.0.0"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "zod": "^3.25.76 || ^4.1.8"
@@ -124,8 +124,12 @@ export async function prepareTools({
124
124
  }
125
125
  }
126
126
 
127
- // Handle standard function tools for all models
128
- for (const tool of functionTools) {
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,