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]

fix delete callbacks

Ishaan Jaffer8a9fe7b056f6
diff --git a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py
index 5c2f84cd872..d6cf24f6568 100644
--- a/tests/test_litellm/litellm_core_utils/test_litellm_logging.py
+++ b/tests/test_litellm/litellm_core_utils/test_litellm_logging.py
@@ -585,7 +585,7 @@ async def test_e2e_generate_cold_storage_object_key_successful():
# Verify the S3 function was called with correct parameters
mock_get_s3_key.assert_called_once_with(
s3_path="", # Empty path as default
- team_alias_prefix="", # No team alias prefix for cold storage
+ prefix="", # No prefix for cold storage
start_time=start_time,
s3_file_name="time-10-30-45-123456_chatcmpl-test-12345",
)
diff --git a/tests/test_litellm/proxy/client/test_chat.py b/tests/test_litellm/proxy/client/test_chat.py
index 868d9287692..4de58723761 100644
--- a/tests/test_litellm/proxy/client/test_chat.py
+++ b/tests/test_litellm/proxy/client/test_chat.py
@@ -3,13 +3,14 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client.chat import ChatClient
from litellm.proxy.client.exceptions import UnauthorizedError
diff --git a/tests/test_litellm/proxy/client/test_credentials.py b/tests/test_litellm/proxy/client/test_credentials.py
index 702872a5896..580bbb39dc0 100644
--- a/tests/test_litellm/proxy/client/test_credentials.py
+++ b/tests/test_litellm/proxy/client/test_credentials.py
@@ -3,13 +3,14 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client.credentials import CredentialsManagementClient
from litellm.proxy.client.exceptions import UnauthorizedError
diff --git a/tests/test_litellm/proxy/client/test_http_client.py b/tests/test_litellm/proxy/client/test_http_client.py
index b85724139be..3d8fe44438a 100644
--- a/tests/test_litellm/proxy/client/test_http_client.py
+++ b/tests/test_litellm/proxy/client/test_http_client.py
@@ -6,13 +6,14 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client.http_client import HTTPClient
diff --git a/tests/test_litellm/proxy/client/test_http_commands.py b/tests/test_litellm/proxy/client/test_http_commands.py
index d1dea3a5541..16579cfffbc 100644
--- a/tests/test_litellm/proxy/client/test_http_commands.py
+++ b/tests/test_litellm/proxy/client/test_http_commands.py
@@ -5,7 +5,6 @@ import os
import sys
import pytest
-import responses
from click.testing import CliRunner
sys.path.insert(
@@ -13,6 +12,8 @@ sys.path.insert(
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client.cli.commands.http import http
diff --git a/tests/test_litellm/proxy/client/test_keys.py b/tests/test_litellm/proxy/client/test_keys.py
index 06cedf13104..136408e01ac 100644
--- a/tests/test_litellm/proxy/client/test_keys.py
+++ b/tests/test_litellm/proxy/client/test_keys.py
@@ -3,13 +3,14 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client.exceptions import UnauthorizedError
from litellm.proxy.client.keys import KeysManagementClient
diff --git a/tests/test_litellm/proxy/client/test_model_groups.py b/tests/test_litellm/proxy/client/test_model_groups.py
index 3a4f1b157c3..1c87672e723 100644
--- a/tests/test_litellm/proxy/client/test_model_groups.py
+++ b/tests/test_litellm/proxy/client/test_model_groups.py
@@ -3,13 +3,14 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
) # Adds the parent directory to the system path
+import responses
+
from litellm.proxy.client import Client, ModelGroupsManagementClient
from litellm.proxy.client.exceptions import UnauthorizedError
diff --git a/tests/test_litellm/proxy/client/test_models.py b/tests/test_litellm/proxy/client/test_models.py
index ffb6d89f577..0957c98f9e2 100644
--- a/tests/test_litellm/proxy/client/test_models.py
+++ b/tests/test_litellm/proxy/client/test_models.py
@@ -3,7 +3,6 @@ import sys
import pytest
import requests
-import responses
sys.path.insert(
0, os.path.abspath("../../..")
@@ -11,6 +10,8 @@ sys.path.insert(
+import responses
+
from litellm.proxy.client import Client, ModelsManagementClient
from litellm.proxy.client.exceptions import NotFoundError, UnauthorizedError
diff --git a/tests/test_litellm/proxy/management_endpoints/test_delete_callbacks_endpoint.py b/tests/test_litellm/proxy/management_endpoints/test_delete_callbacks_endpoint.py
index 4d6a81b481a..9dac72aac44 100644
--- a/tests/test_litellm/proxy/management_endpoints/test_delete_callbacks_endpoint.py
+++ b/tests/test_litellm/proxy/management_endpoints/test_delete_callbacks_endpoint.py
@@ -9,7 +9,12 @@ sys.path.insert(
0, os.path.abspath("../../../..")
)
-from litellm.proxy._types import CallbackDelete, ConfigYAML, LitellmUserRoles, UserAPIKeyAuth
+from litellm.proxy._types import (
+ CallbackDelete,
+ ConfigYAML,
+ LitellmUserRoles,
+ UserAPIKeyAuth,
+)
from litellm.proxy.proxy_server import app
client = TestClient(app)
@@ -101,11 +106,11 @@ def mock_prisma():
return MockPrismaClient()
-def mock_encrypt_value_helper(value):
+def mock_encrypt_value_helper(value, key=None, new_encryption_key=None):
"""Mock encryption - just return the value as-is for testing"""
return value
-def mock_decrypt_value_helper(value):
+def mock_decrypt_value_helper(value, key=None, return_original_value=False):
"""Mock decryption - just return the value as-is for testing"""
return value