From d25693b96cecddc4c3ebdc38eb4e61337b1345cc Mon Sep 17 00:00:00 2001 From: omrishiv <327609+omrishiv@users.noreply.github.com> Date: Mon, 10 Mar 2025 20:34:52 -0700 Subject: [PATCH] update test Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com> --- tests/litellm/llms/chat/test_converse_handler.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/litellm/llms/chat/test_converse_handler.py b/tests/litellm/llms/chat/test_converse_handler.py index 0b19ca1147..9d8371c04d 100644 --- a/tests/litellm/llms/chat/test_converse_handler.py +++ b/tests/litellm/llms/chat/test_converse_handler.py @@ -8,12 +8,13 @@ sys.path.insert( ) # Adds the parent directory to the system path import litellm + def test_encode_model_id_with_inference_profile(): """ - Tests to make sure model name is being escaped correctly when used with an inference profile - :return: + Test instance profile is properly encoded when used as a model """ - test = "bedrock/converse/arn:aws:bedrock:us-east-1:12345678910:application-inference-profile/ujdtmcirjhevpi" - expected = "bedrock/converse/arn%3Aaws%3Abedrock%3Aus-east-1%3A12345678910%3Aapplication-inference-profile%2Fujdtmcirjhevpi" - got = BedrockConverseLLM.encode_model_id(test) - assert expected == got + test_model = "arn:aws:bedrock:us-east-1:12345678910:application-inference-profile/ujdtmcirjhevpi" + expected_model = "arn%3Aaws%3Abedrock%3Aus-east-1%3A12345678910%3Aapplication-inference-profile%2Fujdtmcirjhevpi" + bedrock_converse_llm = BedrockConverseLLM() + returned_model = bedrock_converse_llm.encode_model_id(test_model) + assert expected_model == returned_model