Signed-off-by: omrishiv <327609+omrishiv@users.noreply.github.com>
This commit is contained in:
omrishiv 2025-03-10 20:28:55 -07:00
parent 12e730885b
commit 338722beba

View file

@ -0,0 +1,19 @@
import os
import sys
from litellm.llms.bedrock.chat import BedrockConverseLLM
sys.path.insert(
0, os.path.abspath("../../../../..")
) # 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 = "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