From 1c9af0428a1f47bd84eac504b583a1f8925f98b4 Mon Sep 17 00:00:00 2001 From: Connor Graham Date: Tue, 19 May 2026 10:51:42 -0400 Subject: [PATCH] fix(bedrock/base_aws_llm): fix Authorization override guard after header normalization After lowercasing all header keys, the Authorization override guard was checking for uppercase "Authorization" (always False) and the key lookup would also fail. Update both to use lowercase "authorization" to match the post-normalization dict. Caught by Greptile review on PR #28257. --- litellm/llms/bedrock/base_aws_llm.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/llms/bedrock/base_aws_llm.py b/litellm/llms/bedrock/base_aws_llm.py index 90cd882aa85..9c43c010f57 100644 --- a/litellm/llms/bedrock/base_aws_llm.py +++ b/litellm/llms/bedrock/base_aws_llm.py @@ -1523,9 +1523,7 @@ class BaseAWSLLM: for header_name, header_value in headers.items(): if header_value is not None: request_headers_dict[header_name] = header_value - if ( - headers is not None and "Authorization" in headers - ): # prevent sigv4 from overwriting the auth header - request_headers_dict["Authorization"] = headers["Authorization"] + if "authorization" in headers: # prevent sigv4 from overwriting the auth header + request_headers_dict["Authorization"] = headers["authorization"] return request_headers_dict, request.body