File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -3,13 +3,18 @@ import { ProviderAPIConfig } from '../types';
33const AnthropicAPIConfig : ProviderAPIConfig = {
44 getBaseURL : ( ) => 'https://api.anthropic.com/v1' ,
55
6- headers : ( { providerOptions, fn, headers : requestHeaders , gatewayRequestBody } ) => {
6+ headers : ( {
7+ providerOptions,
8+ fn,
9+ headers : requestHeaders ,
10+ gatewayRequestBody,
11+ } ) => {
712 const apiKey =
813 providerOptions . apiKey || requestHeaders ?. [ 'x-api-key' ] || '' ;
914 const headers : Record < string , string > = {
1015 'X-API-Key' : apiKey ,
1116 } ;
12-
17+
1318 // Accept anthropic_beta and anthropic_version in body to support enviroments which cannot send it in headers.
1419 const betaHeader =
1520 providerOptions ?. [ 'anthropicBeta' ] ??
@@ -42,4 +47,4 @@ const AnthropicAPIConfig: ProviderAPIConfig = {
4247 } ,
4348} ;
4449
45- export default AnthropicAPIConfig ;
50+ export default AnthropicAPIConfig ;
You can’t perform that action at this time.
0 commit comments