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]

test_message_with_name

Ishaan Jaff0d398c2295e7
diff --git a/tests/llm_translation/base_llm_unit_tests.py b/tests/llm_translation/base_llm_unit_tests.py
index bd2838edb1e..b53a642e6ab 100644
--- a/tests/llm_translation/base_llm_unit_tests.py
+++ b/tests/llm_translation/base_llm_unit_tests.py
@@ -196,15 +196,18 @@ class BaseLLMChatTest(ABC):
assert response is not None
def test_message_with_name(self):
- litellm.set_verbose = True
- base_completion_call_args = self.get_base_completion_call_args()
- messages = [
- {"role": "user", "content": "Hello", "name": "test_name"},
- ]
- response = self.completion_function(
- **base_completion_call_args, messages=messages
- )
- assert response is not None
+ try:
+ litellm.set_verbose = True
+ base_completion_call_args = self.get_base_completion_call_args()
+ messages = [
+ {"role": "user", "content": "Hello", "name": "test_name"},
+ ]
+ response = self.completion_function(
+ **base_completion_call_args, messages=messages
+ )
+ assert response is not None
+ except litellm.RateLimitError:
+ pass
@pytest.mark.parametrize(
"response_format",