From 210d9bf4282794eec7cd47bb216ec79229828bc4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 5 Mar 2026 09:32:35 -0800 Subject: [PATCH] revert sign_request content change - request_data expects dict, not bytes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bedrock's sign_request calls json.dumps(request_data) — passing content bytes would TypeError. sign_request should only receive data/json (dict), not raw bytes. --- litellm/passthrough/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/passthrough/main.py b/litellm/passthrough/main.py index ddad3731a6b..e76a222b2ed 100644 --- a/litellm/passthrough/main.py +++ b/litellm/passthrough/main.py @@ -277,7 +277,7 @@ def llm_passthrough_route( headers, signed_json_body = provider_config.sign_request( headers=headers, litellm_params=litellm_params_dict, - request_data=data if data else (json if json else content), + request_data=data if data else json, api_base=str(updated_url), model=model, )