@ai-sdk/amazon-bedrock 4.0.139 → 4.0.140
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 +10 -0
- package/dist/anthropic/index.js +1 -1
- package/dist/anthropic/index.mjs +1 -1
- package/dist/index.js +2 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/mantle/index.js +1 -1
- package/dist/mantle/index.mjs +1 -1
- package/package.json +3 -3
- package/src/bedrock-chat-language-model.ts +6 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @ai-sdk/amazon-bedrock
|
|
2
2
|
|
|
3
|
+
## 4.0.140
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0608dca: fix (provider/anthropic): use current-generation capability defaults for unrecognized Claude model IDs while retaining conservative defaults for legacy Claude and non-Claude models.
|
|
8
|
+
- Updated dependencies [8100830]
|
|
9
|
+
- Updated dependencies [0608dca]
|
|
10
|
+
- @ai-sdk/openai@3.0.88
|
|
11
|
+
- @ai-sdk/anthropic@3.0.101
|
|
12
|
+
|
|
3
13
|
## 4.0.139
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/anthropic/index.js
CHANGED
|
@@ -35,7 +35,7 @@ var import_provider_utils = require("@ai-sdk/provider-utils");
|
|
|
35
35
|
var import_aws4fetch = require("aws4fetch");
|
|
36
36
|
|
|
37
37
|
// src/version.ts
|
|
38
|
-
var VERSION = true ? "4.0.
|
|
38
|
+
var VERSION = true ? "4.0.140" : "0.0.0-test";
|
|
39
39
|
|
|
40
40
|
// src/bedrock-sigv4-fetch.ts
|
|
41
41
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
package/dist/anthropic/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
import { AwsV4Signer } from "aws4fetch";
|
|
25
25
|
|
|
26
26
|
// src/version.ts
|
|
27
|
-
var VERSION = true ? "4.0.
|
|
27
|
+
var VERSION = true ? "4.0.140" : "0.0.0-test";
|
|
28
28
|
|
|
29
29
|
// src/bedrock-sigv4-fetch.ts
|
|
30
30
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
package/dist/index.js
CHANGED
|
@@ -908,7 +908,7 @@ var BedrockChatLanguageModel = class {
|
|
|
908
908
|
const isAnthropicModel = this.modelId.includes("anthropic");
|
|
909
909
|
const isThinkingEnabled = ((_b = bedrockOptions.reasoningConfig) == null ? void 0 : _b.type) === "enabled" || ((_c = bedrockOptions.reasoningConfig) == null ? void 0 : _c.type) === "adaptive";
|
|
910
910
|
const modelRejectsNativeStructuredOutput = this.modelId.includes("claude-opus-4-7") || this.modelId.includes("claude-opus-4-8") || this.modelId.includes("claude-fable-5") || this.modelId.includes("claude-sonnet-5");
|
|
911
|
-
const modelSupportsStructuredOutput =
|
|
911
|
+
const { supportsStructuredOutput: modelSupportsStructuredOutput } = (0, import_internal2.getModelCapabilities)(this.modelId);
|
|
912
912
|
const useNativeStructuredOutput = isAnthropicModel && !modelRejectsNativeStructuredOutput && (modelSupportsStructuredOutput || isThinkingEnabled) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null;
|
|
913
913
|
const useJsonInstructionForStructuredOutput = isAnthropicModel && (this.modelId.includes("claude-opus-4-7") || this.modelId.includes("claude-opus-4-8")) && (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && tools != null && tools.length > 0;
|
|
914
914
|
const jsonResponseTool = (responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null && !useNativeStructuredOutput && !useJsonInstructionForStructuredOutput ? {
|
|
@@ -1576,9 +1576,6 @@ var BedrockChatLanguageModel = class {
|
|
|
1576
1576
|
return `${this.config.baseUrl()}/model/${encodeURIComponent(modelId)}`;
|
|
1577
1577
|
}
|
|
1578
1578
|
};
|
|
1579
|
-
function bedrockChatModelSupportsStructuredOutput(modelId) {
|
|
1580
|
-
return modelId.includes("claude-opus-4-8") || modelId.includes("claude-opus-4-7") || modelId.includes("claude-fable-5") || modelId.includes("claude-sonnet-5") || modelId.includes("claude-sonnet-4-6") || modelId.includes("claude-opus-4-6") || modelId.includes("claude-sonnet-4-5") || modelId.includes("claude-opus-4-5") || modelId.includes("claude-haiku-4-5") || modelId.includes("claude-opus-4-1");
|
|
1581
|
-
}
|
|
1582
1579
|
var JsonObjectTextExtractor = class {
|
|
1583
1580
|
constructor() {
|
|
1584
1581
|
this.started = false;
|
|
@@ -2142,7 +2139,7 @@ var import_provider_utils7 = require("@ai-sdk/provider-utils");
|
|
|
2142
2139
|
var import_aws4fetch = require("aws4fetch");
|
|
2143
2140
|
|
|
2144
2141
|
// src/version.ts
|
|
2145
|
-
var VERSION = true ? "4.0.
|
|
2142
|
+
var VERSION = true ? "4.0.140" : "0.0.0-test";
|
|
2146
2143
|
|
|
2147
2144
|
// src/bedrock-sigv4-fetch.ts
|
|
2148
2145
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|