diff --git a/litellm/tests/test_multiple_deployments.py b/litellm/tests/test_multiple_deployments.py index 76b268514..e4feb88e3 100644 --- a/litellm/tests/test_multiple_deployments.py +++ b/litellm/tests/test_multiple_deployments.py @@ -8,6 +8,7 @@ sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path import pytest +import litellm from litellm import completion messages=[{"role": "user", "content": "Hey, how's it going?"}] diff --git a/litellm/utils.py b/litellm/utils.py index b0bd9e3dd..1a2009672 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -1077,21 +1077,19 @@ class Rules: pass def pre_call_rules(self, input: str, model: str): - model, custom_llm_provider, _, _ = get_llm_provider(model=model) for rule in litellm.pre_call_rules: if callable(rule): decision = rule(input) if decision is False: - raise litellm.APIResponseValidationError(message="LLM Response failed post-call-rule check", llm_provider=custom_llm_provider, model=model) # type: ignore + raise litellm.APIResponseValidationError(message="LLM Response failed post-call-rule check", llm_provider="", model=model) # type: ignore return True def post_call_rules(self, input: str, model: str): - model, custom_llm_provider, _, _ = get_llm_provider(model=model) for rule in litellm.post_call_rules: if callable(rule): decision = rule(input) if decision is False: - raise litellm.APIResponseValidationError(message="LLM Response failed post-call-rule check", llm_provider=custom_llm_provider, model=model) # type: ignore + raise litellm.APIResponseValidationError(message="LLM Response failed post-call-rule check", llm_provider="", model=model) # type: ignore return True ####### CLIENT ###################