ensures AWS always uses anthropic-version 2023-06-01 parser

This commit is contained in:
nai-degen
2023-10-03 19:43:30 -05:00
parent 4a5fd91da3
commit ba0b20617e
2 changed files with 65 additions and 1 deletions
@@ -36,6 +36,9 @@ export const signAwsRequest: RequestPreprocessor = async (req) => {
const credential = getCredentialParts(req);
const host = AMZ_HOST.replace("%REGION%", credential.region);
// AWS only uses 2023-06-01 and does not actually check this header, but we
// set it so that the stream adapter always selects the correct transformer.
req.headers["anthropic-version"] = "2023-06-01";
// Uses the AWS SDK to sign a request, then modifies our HPM proxy request
// with the headers generated by the SDK.