From 9db7da0e1d57dd25d0922790b19180f06256c4c7 Mon Sep 17 00:00:00 2001 From: Charbel Toumieh Date: Fri, 5 Jun 2026 10:11:10 +0100 Subject: [PATCH] test(bedrock): revert test case 8 to standard transform request call --- .../test_anthropic_claude3_transformation.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/test_litellm/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py b/tests/test_litellm/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py index 4230bbe9386..6bfd656568a 100644 --- a/tests/test_litellm/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py +++ b/tests/test_litellm/llms/bedrock/messages/invoke_transformations/test_anthropic_claude3_transformation.py @@ -1818,16 +1818,21 @@ def test_bedrock_anthropic_messages_system_role_transformation(): assert "system" not in req # 8. Test case: existing_system is empty string - req_data = { - "messages": [ + req = config.transform_anthropic_messages_request( + model="bedrock/us.anthropic.claude-sonnet-4-5-20250929-v1:0", + messages=[ {"role": "system", "content": "System message"}, {"role": "user", "content": "Hello"}, ], - "system": "", - } - config._extract_system_messages_from_messages(req_data) - assert req_data["messages"] == [{"role": "user", "content": "Hello"}] - assert req_data["system"] == [{"type": "text", "text": "System message"}] + anthropic_messages_optional_request_params={ + "max_tokens": 100, + "system": "", + }, + litellm_params={}, + headers={}, + ) + assert req["messages"] == [{"role": "user", "content": "Hello"}] + assert req["system"] == [{"type": "text", "text": "System message"}] # 9. Test case: existing_system is list req = config.transform_anthropic_messages_request(