@ai-sdk/amazon-bedrock 4.0.0-beta.72 → 4.0.0-beta.74
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 +19 -0
- package/dist/index.js +7 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 4.0.0-beta.74
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 544d4e8: chore(specification): rename v3 provider defined tool to provider tool
|
|
8
|
+
- Updated dependencies [544d4e8]
|
|
9
|
+
- @ai-sdk/provider-utils@4.0.0-beta.40
|
|
10
|
+
- @ai-sdk/anthropic@3.0.0-beta.66
|
|
11
|
+
- @ai-sdk/provider@3.0.0-beta.22
|
|
12
|
+
|
|
13
|
+
## 4.0.0-beta.73
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [954c356]
|
|
18
|
+
- @ai-sdk/provider-utils@4.0.0-beta.39
|
|
19
|
+
- @ai-sdk/anthropic@3.0.0-beta.65
|
|
20
|
+
- @ai-sdk/provider@3.0.0-beta.21
|
|
21
|
+
|
|
3
22
|
## 4.0.0-beta.72
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -198,7 +198,7 @@ async function prepareTools({
|
|
|
198
198
|
};
|
|
199
199
|
}
|
|
200
200
|
const supportedTools = tools.filter((tool) => {
|
|
201
|
-
if (tool.type === "provider
|
|
201
|
+
if (tool.type === "provider" && tool.id === "anthropic.web_search_20250305") {
|
|
202
202
|
toolWarnings.push({
|
|
203
203
|
type: "unsupported",
|
|
204
204
|
feature: "web_search_20250305 tool",
|
|
@@ -217,13 +217,11 @@ async function prepareTools({
|
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
const isAnthropicModel = modelId.includes("anthropic.");
|
|
220
|
-
const
|
|
221
|
-
(t) => t.type === "provider-defined"
|
|
222
|
-
);
|
|
220
|
+
const ProviderTools = supportedTools.filter((t) => t.type === "provider");
|
|
223
221
|
const functionTools = supportedTools.filter((t) => t.type === "function");
|
|
224
222
|
let additionalTools = void 0;
|
|
225
223
|
const bedrockTools = [];
|
|
226
|
-
const usingAnthropicTools = isAnthropicModel &&
|
|
224
|
+
const usingAnthropicTools = isAnthropicModel && ProviderTools.length > 0;
|
|
227
225
|
if (usingAnthropicTools) {
|
|
228
226
|
if (functionTools.length > 0) {
|
|
229
227
|
toolWarnings.push({
|
|
@@ -237,7 +235,7 @@ async function prepareTools({
|
|
|
237
235
|
toolWarnings: anthropicToolWarnings,
|
|
238
236
|
betas: anthropicBetas
|
|
239
237
|
} = await (0, import_internal.prepareTools)({
|
|
240
|
-
tools:
|
|
238
|
+
tools: ProviderTools,
|
|
241
239
|
toolChoice
|
|
242
240
|
});
|
|
243
241
|
toolWarnings.push(...anthropicToolWarnings);
|
|
@@ -247,7 +245,7 @@ async function prepareTools({
|
|
|
247
245
|
tool_choice: preparedAnthropicToolChoice
|
|
248
246
|
};
|
|
249
247
|
}
|
|
250
|
-
for (const tool of
|
|
248
|
+
for (const tool of ProviderTools) {
|
|
251
249
|
const toolFactory = Object.values(import_internal.anthropicTools).find((factory) => {
|
|
252
250
|
const instance = factory({});
|
|
253
251
|
return instance.id === tool.id;
|
|
@@ -267,7 +265,7 @@ async function prepareTools({
|
|
|
267
265
|
}
|
|
268
266
|
}
|
|
269
267
|
} else {
|
|
270
|
-
for (const tool of
|
|
268
|
+
for (const tool of ProviderTools) {
|
|
271
269
|
toolWarnings.push({ type: "unsupported", feature: `tool ${tool.id}` });
|
|
272
270
|
}
|
|
273
271
|
}
|
|
@@ -1536,7 +1534,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
|
1536
1534
|
var import_aws4fetch = require("aws4fetch");
|
|
1537
1535
|
|
|
1538
1536
|
// src/version.ts
|
|
1539
|
-
var VERSION = true ? "4.0.0-beta.
|
|
1537
|
+
var VERSION = true ? "4.0.0-beta.74" : "0.0.0-test";
|
|
1540
1538
|
|
|
1541
1539
|
// src/bedrock-sigv4-fetch.ts
|
|
1542
1540
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|