diff --git a/litellm/llms/bedrock_httpx.py b/litellm/llms/bedrock_httpx.py index df4cafe6e6..d5088f3842 100644 --- a/litellm/llms/bedrock_httpx.py +++ b/litellm/llms/bedrock_httpx.py @@ -834,14 +834,6 @@ class BedrockLLM(BaseLLM): status_code=response.status_code, message=response.text ) - ## LOGGING - logging_obj.post_call( - input=messages, - api_key="", - original_response=response.text, - additional_args={"complete_input_dict": data}, - ) - decoder = AWSEventStreamDecoder(model=model) completion_stream = decoder.iter_bytes(response.iter_bytes(chunk_size=1024)) @@ -851,6 +843,14 @@ class BedrockLLM(BaseLLM): custom_llm_provider="bedrock", logging_obj=logging_obj, ) + + ## LOGGING + logging_obj.post_call( + input=messages, + api_key="", + original_response=streaming_response, + additional_args={"complete_input_dict": data}, + ) return streaming_response response = self.client.post(url=prepped.url, headers=prepped.headers, data=data) # type: ignore