mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix(bedrock_httpx.py): support 'Auth' header as extra_header
Fixes https://github.com/BerriAI/litellm/issues/5389#issuecomment-2313677977
This commit is contained in:
parent
1b2f73c220
commit
6431af0678
4 changed files with 25 additions and 2 deletions
|
@ -196,6 +196,11 @@ class SagemakerLLM(BaseAWSLLM):
|
|||
method="POST", url=api_base, data=encoded_data, headers=headers
|
||||
)
|
||||
sigv4.add_auth(request)
|
||||
if (
|
||||
extra_headers is not None and "Authorization" in extra_headers
|
||||
): # prevent sigv4 from overwriting the auth header
|
||||
request.headers["Authorization"] = extra_headers["Authorization"]
|
||||
|
||||
prepped_request = request.prepare()
|
||||
|
||||
return prepped_request
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue