adds anthropic-version header in all cases

This commit is contained in:
nai-degen
2023-09-07 20:23:34 -05:00
parent a558920ccf
commit 63542bfabb
+1
View File
@@ -60,6 +60,7 @@ export const addKey: ProxyRequestMiddleware = (proxyReq, req) => {
// TODO: KeyProvider should assemble all necessary headers
if (assignedKey.service === "anthropic") {
proxyReq.setHeader("X-API-Key", assignedKey.key);
proxyReq.setHeader("anthropic-version", "2023-01-01");
} else if (assignedKey.service === "openai") {
const key: OpenAIKey = assignedKey as OpenAIKey;
if (key.organizationId) {