@ai-sdk/amazon-bedrock 5.0.0-beta.2 → 5.0.0-beta.4
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 +16 -0
- package/dist/anthropic/index.d.mts +4 -4
- package/dist/anthropic/index.d.ts +4 -4
- package/dist/anthropic/index.js +5 -5
- package/dist/anthropic/index.js.map +1 -1
- package/dist/anthropic/index.mjs +2 -2
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/index.d.mts +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +11 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/docs/08-amazon-bedrock.mdx +5 -0
- package/package.json +4 -4
- package/src/anthropic/bedrock-anthropic-provider.ts +6 -6
- package/src/bedrock-chat-language-model.ts +26 -26
- package/src/bedrock-embedding-model.ts +5 -5
- package/src/bedrock-image-model.ts +9 -9
- package/src/bedrock-prepare-tools.ts +7 -6
- package/src/bedrock-provider.ts +17 -17
- package/src/convert-bedrock-usage.ts +2 -2
- package/src/convert-to-bedrock-chat-messages.ts +10 -10
- package/src/map-bedrock-finish-reason.ts +2 -2
- package/src/reranking/bedrock-reranking-model.ts +5 -5
package/dist/index.mjs
CHANGED
|
@@ -240,7 +240,8 @@ async function prepareTools({
|
|
|
240
240
|
} = await prepareAnthropicTools({
|
|
241
241
|
tools: ProviderTools,
|
|
242
242
|
toolChoice,
|
|
243
|
-
supportsStructuredOutput: false
|
|
243
|
+
supportsStructuredOutput: false,
|
|
244
|
+
supportsStrictTools: false
|
|
244
245
|
});
|
|
245
246
|
toolWarnings.push(...anthropicToolWarnings);
|
|
246
247
|
anthropicBetas.forEach((beta) => betas.add(beta));
|
|
@@ -749,7 +750,7 @@ var BedrockChatLanguageModel = class {
|
|
|
749
750
|
constructor(modelId, config) {
|
|
750
751
|
this.modelId = modelId;
|
|
751
752
|
this.config = config;
|
|
752
|
-
this.specificationVersion = "
|
|
753
|
+
this.specificationVersion = "v4";
|
|
753
754
|
this.provider = "amazon-bedrock";
|
|
754
755
|
this.supportedUrls = {
|
|
755
756
|
// no supported urls for bedrock
|
|
@@ -1626,7 +1627,7 @@ var BedrockEmbeddingModel = class {
|
|
|
1626
1627
|
constructor(modelId, config) {
|
|
1627
1628
|
this.modelId = modelId;
|
|
1628
1629
|
this.config = config;
|
|
1629
|
-
this.specificationVersion = "
|
|
1630
|
+
this.specificationVersion = "v4";
|
|
1630
1631
|
this.provider = "amazon-bedrock";
|
|
1631
1632
|
this.maxEmbeddingsPerCall = 1;
|
|
1632
1633
|
this.supportsParallelCalls = true;
|
|
@@ -1766,7 +1767,7 @@ var BedrockImageModel = class {
|
|
|
1766
1767
|
constructor(modelId, config) {
|
|
1767
1768
|
this.modelId = modelId;
|
|
1768
1769
|
this.config = config;
|
|
1769
|
-
this.specificationVersion = "
|
|
1770
|
+
this.specificationVersion = "v4";
|
|
1770
1771
|
this.provider = "amazon-bedrock";
|
|
1771
1772
|
}
|
|
1772
1773
|
get maxImagesPerCall() {
|
|
@@ -1969,7 +1970,7 @@ import {
|
|
|
1969
1970
|
import { AwsV4Signer } from "aws4fetch";
|
|
1970
1971
|
|
|
1971
1972
|
// src/version.ts
|
|
1972
|
-
var VERSION = true ? "5.0.0-beta.
|
|
1973
|
+
var VERSION = true ? "5.0.0-beta.4" : "0.0.0-test";
|
|
1973
1974
|
|
|
1974
1975
|
// src/bedrock-sigv4-fetch.ts
|
|
1975
1976
|
function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
|
@@ -2102,7 +2103,7 @@ var BedrockRerankingModel = class {
|
|
|
2102
2103
|
constructor(modelId, config) {
|
|
2103
2104
|
this.modelId = modelId;
|
|
2104
2105
|
this.config = config;
|
|
2105
|
-
this.specificationVersion = "
|
|
2106
|
+
this.specificationVersion = "v4";
|
|
2106
2107
|
this.provider = "amazon-bedrock";
|
|
2107
2108
|
}
|
|
2108
2109
|
async doRerank({
|
|
@@ -2306,7 +2307,7 @@ Original error: ${errorMessage}`
|
|
|
2306
2307
|
headers: getHeaders,
|
|
2307
2308
|
fetch: fetchFunction
|
|
2308
2309
|
});
|
|
2309
|
-
provider.specificationVersion = "
|
|
2310
|
+
provider.specificationVersion = "v4";
|
|
2310
2311
|
provider.languageModel = createChatModel;
|
|
2311
2312
|
provider.embedding = createEmbeddingModel;
|
|
2312
2313
|
provider.embeddingModel = createEmbeddingModel;
|