@ai-sdk/amazon-bedrock 4.0.191 → 4.0.193
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 +20 -0
- package/dist/anthropic/index.d.mts +1 -1
- package/dist/anthropic/index.d.ts +1 -1
- package/dist/anthropic/index.js +9 -3
- package/dist/anthropic/index.js.map +1 -1
- package/dist/anthropic/index.mjs +9 -3
- package/dist/anthropic/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -3
- package/dist/index.mjs.map +1 -1
- package/dist/mantle/index.js +7 -2
- package/dist/mantle/index.js.map +1 -1
- package/dist/mantle/index.mjs +7 -2
- package/dist/mantle/index.mjs.map +1 -1
- package/docs/08-amazon-bedrock.mdx +1 -0
- package/package.json +2 -2
- package/src/anthropic/bedrock-anthropic-options.ts +2 -0
- package/src/bedrock-anthropic-model-support.ts +1 -0
- package/src/bedrock-chat-options.ts +2 -0
- package/src/bedrock-sigv4-fetch.ts +7 -1
package/dist/index.js
CHANGED
|
@@ -143,7 +143,8 @@ var MODELS_WITHOUT_STRICT_TOOL_SUPPORT = [
|
|
|
143
143
|
"claude-opus-4-8",
|
|
144
144
|
"claude-opus-5",
|
|
145
145
|
"claude-fable-5",
|
|
146
|
-
"claude-sonnet-5"
|
|
146
|
+
"claude-sonnet-5",
|
|
147
|
+
"claude-haiku-5-5"
|
|
147
148
|
];
|
|
148
149
|
var MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT = [
|
|
149
150
|
...MODELS_WITHOUT_STRICT_TOOL_SUPPORT,
|
|
@@ -2359,7 +2360,7 @@ var import_provider_utils8 = require("@ai-sdk/provider-utils");
|
|
|
2359
2360
|
var import_aws4fetch = require("aws4fetch");
|
|
2360
2361
|
|
|
2361
2362
|
// src/version.ts
|
|
2362
|
-
var VERSION = true ? "4.0.
|
|
2363
|
+
var VERSION = true ? "4.0.193" : "0.0.0-test";
|
|
2363
2364
|
|
|
2364
2365
|
// src/bedrock-sigv4-fetch.ts
|
|
2365
2366
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
|
@@ -2396,7 +2397,9 @@ function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
|
|
2396
2397
|
const signer = new import_aws4fetch.AwsV4Signer({
|
|
2397
2398
|
url,
|
|
2398
2399
|
method: "POST",
|
|
2399
|
-
headers: Object.entries(headersWithUserAgent)
|
|
2400
|
+
headers: Object.entries(headersWithUserAgent).filter(
|
|
2401
|
+
([, value]) => isAscii(value)
|
|
2402
|
+
),
|
|
2400
2403
|
body,
|
|
2401
2404
|
region: credentials.region,
|
|
2402
2405
|
accessKeyId: credentials.accessKeyId,
|
|
@@ -2425,6 +2428,9 @@ function prepareBodyString(body) {
|
|
|
2425
2428
|
return JSON.stringify(body);
|
|
2426
2429
|
}
|
|
2427
2430
|
}
|
|
2431
|
+
function isAscii(value) {
|
|
2432
|
+
return !/[\u0080-\uffff]/.test(value);
|
|
2433
|
+
}
|
|
2428
2434
|
function createApiKeyFetchFunction(apiKey, fetch) {
|
|
2429
2435
|
return async (input, init) => {
|
|
2430
2436
|
const effectiveFetch = fetch != null ? fetch : globalThis.fetch;
|