@ai-sdk/amazon-bedrock 3.0.138 → 3.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 +19 -0
- package/dist/anthropic/index.d.mts +1 -1
- package/dist/anthropic/index.d.ts +1 -1
- package/dist/anthropic/index.js +7 -2
- package/dist/anthropic/index.js.map +1 -1
- package/dist/anthropic/index.mjs +7 -2
- 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 +7 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "@ai-sdk/provider-utils";
|
|
8
8
|
|
|
9
9
|
// src/version.ts
|
|
10
|
-
var VERSION = true ? "3.0.
|
|
10
|
+
var VERSION = true ? "3.0.140" : "0.0.0-test";
|
|
11
11
|
|
|
12
12
|
// src/bedrock-provider.ts
|
|
13
13
|
import { anthropicTools as anthropicTools2 } from "@ai-sdk/anthropic/internal";
|
|
@@ -1925,7 +1925,9 @@ function createSigV4FetchFunction(getCredentials, fetch = globalThis.fetch) {
|
|
|
1925
1925
|
const signer = new AwsV4Signer({
|
|
1926
1926
|
url,
|
|
1927
1927
|
method: "POST",
|
|
1928
|
-
headers: Object.entries(headersWithUserAgent)
|
|
1928
|
+
headers: Object.entries(headersWithUserAgent).filter(
|
|
1929
|
+
([, value]) => isAscii(value)
|
|
1930
|
+
),
|
|
1929
1931
|
body,
|
|
1930
1932
|
region: credentials.region,
|
|
1931
1933
|
accessKeyId: credentials.accessKeyId,
|
|
@@ -1954,6 +1956,9 @@ function prepareBodyString(body) {
|
|
|
1954
1956
|
return JSON.stringify(body);
|
|
1955
1957
|
}
|
|
1956
1958
|
}
|
|
1959
|
+
function isAscii(value) {
|
|
1960
|
+
return !/[\u0080-\uffff]/.test(value);
|
|
1961
|
+
}
|
|
1957
1962
|
function createApiKeyFetchFunction(apiKey, fetch = globalThis.fetch) {
|
|
1958
1963
|
return async (input, init) => {
|
|
1959
1964
|
const originalHeaders = normalizeHeaders(init == null ? void 0 : init.headers);
|