@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.mjs
CHANGED
|
@@ -131,7 +131,8 @@ var MODELS_WITHOUT_STRICT_TOOL_SUPPORT = [
|
|
|
131
131
|
"claude-opus-4-8",
|
|
132
132
|
"claude-opus-5",
|
|
133
133
|
"claude-fable-5",
|
|
134
|
-
"claude-sonnet-5"
|
|
134
|
+
"claude-sonnet-5",
|
|
135
|
+
"claude-haiku-5-5"
|
|
135
136
|
];
|
|
136
137
|
var MODELS_WITHOUT_RELIABLE_NATIVE_STRUCTURED_OUTPUT = [
|
|
137
138
|
...MODELS_WITHOUT_STRICT_TOOL_SUPPORT,
|
|
@@ -2381,7 +2382,7 @@ import {
|
|
|
2381
2382
|
import { AwsV4Signer } from "aws4fetch";
|
|
2382
2383
|
|
|
2383
2384
|
// src/version.ts
|
|
2384
|
-
var VERSION = true ? "4.0.
|
|
2385
|
+
var VERSION = true ? "4.0.193" : "0.0.0-test";
|
|
2385
2386
|
|
|
2386
2387
|
// src/bedrock-sigv4-fetch.ts
|
|
2387
2388
|
function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
|
@@ -2418,7 +2419,9 @@ function createSigV4FetchFunction(getCredentials, fetch, service = "bedrock") {
|
|
|
2418
2419
|
const signer = new AwsV4Signer({
|
|
2419
2420
|
url,
|
|
2420
2421
|
method: "POST",
|
|
2421
|
-
headers: Object.entries(headersWithUserAgent)
|
|
2422
|
+
headers: Object.entries(headersWithUserAgent).filter(
|
|
2423
|
+
([, value]) => isAscii(value)
|
|
2424
|
+
),
|
|
2422
2425
|
body,
|
|
2423
2426
|
region: credentials.region,
|
|
2424
2427
|
accessKeyId: credentials.accessKeyId,
|
|
@@ -2447,6 +2450,9 @@ function prepareBodyString(body) {
|
|
|
2447
2450
|
return JSON.stringify(body);
|
|
2448
2451
|
}
|
|
2449
2452
|
}
|
|
2453
|
+
function isAscii(value) {
|
|
2454
|
+
return !/[\u0080-\uffff]/.test(value);
|
|
2455
|
+
}
|
|
2450
2456
|
function createApiKeyFetchFunction(apiKey, fetch) {
|
|
2451
2457
|
return async (input, init) => {
|
|
2452
2458
|
const effectiveFetch = fetch != null ? fetch : globalThis.fetch;
|