Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

add test

omrishiv338722beba2b
diff --git a/tests/litellm/llms/chat/test_converse_handler.py b/tests/litellm/llms/chat/test_converse_handler.py
new file mode 100644
index 00000000000..0b19ca11471
--- /dev/null
+++ b/tests/litellm/llms/chat/test_converse_handler.py
@@ -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