diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 4d5b9074f03..e8483771569 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -140,42 +140,46 @@ jobs: - shard: proxy-endpoints artifact-name: proxy-endpoints test-path: >- - tests/test_litellm/proxy/analytics_endpoints + tests/unit/proxy/analytics_endpoints tests/unit/proxy/management_endpoints - tests/test_litellm/proxy/list_api - tests/test_litellm/proxy/memory + tests/unit/proxy/list_api + tests/unit/proxy/memory tests/unit/proxy/guardrails tests/unit/proxy/management_helpers --ignore=tests/unit/proxy/management_endpoints/test_jwt_key_mapping.py --ignore=tests/unit/proxy/management_endpoints/test_key_generate_prisma.py --ignore=tests/unit/proxy/management_endpoints/test_roi_calculator_endpoints.py --ignore=tests/unit/proxy/management_helpers/test_audit_logs_proxy.py - tests/test_litellm/proxy/anthropic_endpoints - tests/test_litellm/proxy/google_endpoints - tests/test_litellm/proxy/openai_files_endpoint - tests/test_litellm/proxy/batches_endpoints - tests/test_litellm/proxy/container_endpoints - tests/test_litellm/proxy/fine_tuning_endpoints - tests/test_litellm/proxy/vector_store_files_endpoints - tests/test_litellm/proxy/video_endpoints - tests/test_litellm/proxy/response_api_endpoints - tests/test_litellm/proxy/image_endpoints - tests/test_litellm/proxy/ocr_endpoints - tests/test_litellm/proxy/vector_store_endpoints - tests/test_litellm/proxy/agent_endpoints - tests/test_litellm/proxy/a2a - tests/test_litellm/proxy/credential_endpoints - tests/test_litellm/proxy/discovery_endpoints - tests/test_litellm/proxy/health_endpoints - tests/test_litellm/proxy/shutdown - tests/test_litellm/proxy/public_endpoints - tests/test_litellm/proxy/prompts - tests/test_litellm/proxy/rag_endpoints - tests/test_litellm/proxy/rerank_endpoints - tests/test_litellm/proxy/realtime_endpoints - tests/test_litellm/proxy/ui_crud_endpoints - tests/test_litellm/proxy/config_resolvers - tests/test_litellm/proxy/utils + --ignore=tests/unit/proxy/google_endpoints/test_gemini_agents_endpoints.py + --ignore=tests/unit/proxy/google_endpoints/test_google_endpoint_routing.py + --ignore=tests/unit/proxy/google_endpoints/test_google_gemini_proxy_request.py + --ignore=tests/unit/proxy/public_endpoints/test_blog_posts_endpoint.py + tests/unit/proxy/anthropic_endpoints + tests/unit/proxy/google_endpoints + tests/unit/proxy/openai_files_endpoint + tests/unit/proxy/batches_endpoints + tests/unit/proxy/container_endpoints + tests/unit/proxy/fine_tuning_endpoints + tests/unit/proxy/vector_store_files_endpoints + tests/unit/proxy/video_endpoints + tests/unit/proxy/response_api_endpoints + tests/unit/proxy/image_endpoints + tests/unit/proxy/ocr_endpoints + tests/unit/proxy/vector_store_endpoints + tests/unit/proxy/agent_endpoints + tests/unit/proxy/a2a + tests/unit/proxy/credential_endpoints + tests/unit/proxy/discovery_endpoints + tests/unit/proxy/health_endpoints + tests/unit/proxy/shutdown + tests/unit/proxy/public_endpoints + tests/unit/proxy/prompts + tests/unit/proxy/rag_endpoints + tests/unit/proxy/rerank_endpoints + tests/unit/proxy/realtime_endpoints + tests/unit/proxy/ui_crud_endpoints + tests/unit/proxy/config_resolvers + tests/unit/proxy/utils workers: 4 reruns: 2 timeout-minutes: 20 diff --git a/Makefile b/Makefile index b6ce1ebabaf..ed1f9e3e1e5 100644 --- a/Makefile +++ b/Makefile @@ -327,7 +327,7 @@ test-unit-proxy-core: install-test-deps $(UV_RUN) pytest tests/unit/proxy/auth tests/unit/proxy/client tests/test_litellm/proxy/db tests/unit/proxy/hooks tests/unit/proxy/policy_engine --tb=short -vv -n 4 --durations=20 test-unit-proxy-misc: install-test-deps - $(UV_RUN) pytest tests/test_litellm/proxy/_experimental tests/test_litellm/proxy/agent_endpoints tests/test_litellm/proxy/anthropic_endpoints tests/test_litellm/proxy/common_utils tests/test_litellm/proxy/discovery_endpoints tests/test_litellm/proxy/experimental tests/test_litellm/proxy/google_endpoints tests/test_litellm/proxy/health_endpoints tests/test_litellm/proxy/image_endpoints tests/test_litellm/proxy/middleware tests/test_litellm/proxy/openai_files_endpoint tests/test_litellm/proxy/pass_through_endpoints tests/test_litellm/proxy/prompts tests/test_litellm/proxy/public_endpoints tests/test_litellm/proxy/response_api_endpoints tests/test_litellm/proxy/shutdown tests/test_litellm/proxy/spend_tracking tests/test_litellm/proxy/ui_crud_endpoints tests/test_litellm/proxy/vector_store_endpoints tests/test_litellm/proxy/test_*.py tests/unit/proxy/test_proxy_server_endpoints_and_startup.py tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py tests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.py --tb=short -vv -n 4 --durations=20 + $(UV_RUN) pytest tests/test_litellm/proxy/_experimental tests/unit/proxy/agent_endpoints tests/unit/proxy/anthropic_endpoints tests/test_litellm/proxy/common_utils tests/unit/proxy/discovery_endpoints tests/test_litellm/proxy/experimental tests/unit/proxy/google_endpoints tests/unit/proxy/health_endpoints tests/unit/proxy/image_endpoints tests/test_litellm/proxy/middleware tests/unit/proxy/openai_files_endpoint tests/test_litellm/proxy/pass_through_endpoints tests/unit/proxy/prompts tests/unit/proxy/public_endpoints tests/unit/proxy/response_api_endpoints tests/unit/proxy/shutdown tests/test_litellm/proxy/spend_tracking tests/unit/proxy/ui_crud_endpoints tests/unit/proxy/vector_store_endpoints tests/test_litellm/proxy/test_*.py tests/unit/proxy/test_proxy_server_endpoints_and_startup.py tests/unit/proxy/test_proxy_utils_model_creation_and_error_logging.py tests/unit/proxy/_experimental/mcp_server/test_mcp_server_tool_calls_and_headers.py --ignore=tests/unit/proxy/google_endpoints/test_gemini_agents_endpoints.py --ignore=tests/unit/proxy/google_endpoints/test_google_endpoint_routing.py --ignore=tests/unit/proxy/google_endpoints/test_google_gemini_proxy_request.py --ignore=tests/unit/proxy/public_endpoints/test_blog_posts_endpoint.py --tb=short -vv -n 4 --durations=20 test-unit-integrations: install-test-deps $(UV_RUN) pytest tests/unit/integrations --tb=short -vv -n 4 --durations=20 diff --git a/tests/proxy_behavior/spend/test_cache_activity.py b/tests/proxy_behavior/spend/test_cache_activity.py index f4a7e8eb2b2..528764fbf45 100644 --- a/tests/proxy_behavior/spend/test_cache_activity.py +++ b/tests/proxy_behavior/spend/test_cache_activity.py @@ -2,7 +2,7 @@ Behavior tests for the cache analytics queries against a real Postgres. The info-route exclusion and the Unknown grouping live in SQL, so these tests are the ones that exercise them; the endpoint wiring is unit-tested in -tests/test_litellm/proxy/analytics_endpoints/test_analytics_endpoints.py. +tests/unit/proxy/analytics_endpoints/test_analytics_endpoints.py. """ import json diff --git a/tests/test_litellm/proxy/a2a/__init__.py b/tests/unit/proxy/a2a/__init__.py similarity index 100% rename from tests/test_litellm/proxy/a2a/__init__.py rename to tests/unit/proxy/a2a/__init__.py diff --git a/tests/test_litellm/proxy/a2a/test_agent_card.py b/tests/unit/proxy/a2a/test_agent_card.py similarity index 100% rename from tests/test_litellm/proxy/a2a/test_agent_card.py rename to tests/unit/proxy/a2a/test_agent_card.py diff --git a/tests/test_litellm/proxy/a2a/test_discovery.py b/tests/unit/proxy/a2a/test_discovery.py similarity index 100% rename from tests/test_litellm/proxy/a2a/test_discovery.py rename to tests/unit/proxy/a2a/test_discovery.py diff --git a/tests/test_litellm/proxy/a2a/test_version_convert.py b/tests/unit/proxy/a2a/test_version_convert.py similarity index 100% rename from tests/test_litellm/proxy/a2a/test_version_convert.py rename to tests/unit/proxy/a2a/test_version_convert.py diff --git a/tests/test_litellm/proxy/agent_endpoints/__init__.py b/tests/unit/proxy/agent_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/__init__.py rename to tests/unit/proxy/agent_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/agent_endpoints/auth/__init__.py b/tests/unit/proxy/agent_endpoints/auth/__init__.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/auth/__init__.py rename to tests/unit/proxy/agent_endpoints/auth/__init__.py diff --git a/tests/test_litellm/proxy/agent_endpoints/auth/test_agent_access_groups.py b/tests/unit/proxy/agent_endpoints/auth/test_agent_access_groups.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/auth/test_agent_access_groups.py rename to tests/unit/proxy/agent_endpoints/auth/test_agent_access_groups.py diff --git a/tests/test_litellm/proxy/agent_endpoints/auth/test_agent_caller.py b/tests/unit/proxy/agent_endpoints/auth/test_agent_caller.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/auth/test_agent_caller.py rename to tests/unit/proxy/agent_endpoints/auth/test_agent_caller.py diff --git a/tests/test_litellm/proxy/agent_endpoints/auth/test_agent_permission_handler.py b/tests/unit/proxy/agent_endpoints/auth/test_agent_permission_handler.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/auth/test_agent_permission_handler.py rename to tests/unit/proxy/agent_endpoints/auth/test_agent_permission_handler.py diff --git a/tests/test_litellm/proxy/agent_endpoints/auth/test_managed_authorization.py b/tests/unit/proxy/agent_endpoints/auth/test_managed_authorization.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/auth/test_managed_authorization.py rename to tests/unit/proxy/agent_endpoints/auth/test_managed_authorization.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py b/tests/unit/proxy/agent_endpoints/test_a2a_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_a2a_endpoints.py rename to tests/unit/proxy/agent_endpoints/test_a2a_endpoints.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_a2a_version_e2e.py b/tests/unit/proxy/agent_endpoints/test_a2a_version_e2e.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_a2a_version_e2e.py rename to tests/unit/proxy/agent_endpoints/test_a2a_version_e2e.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_agent_header_isolation.py b/tests/unit/proxy/agent_endpoints/test_agent_header_isolation.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_agent_header_isolation.py rename to tests/unit/proxy/agent_endpoints/test_agent_header_isolation.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py b/tests/unit/proxy/agent_endpoints/test_agent_headers.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_agent_headers.py rename to tests/unit/proxy/agent_endpoints/test_agent_headers.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.py b/tests/unit/proxy/agent_endpoints/test_agent_rbac.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_agent_rbac.py rename to tests/unit/proxy/agent_endpoints/test_agent_rbac.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_agent_registry.py b/tests/unit/proxy/agent_endpoints/test_agent_registry.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_agent_registry.py rename to tests/unit/proxy/agent_endpoints/test_agent_registry.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_agent_search.py b/tests/unit/proxy/agent_endpoints/test_agent_search.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_agent_search.py rename to tests/unit/proxy/agent_endpoints/test_agent_search.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_databricks_oauth.py b/tests/unit/proxy/agent_endpoints/test_databricks_oauth.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_databricks_oauth.py rename to tests/unit/proxy/agent_endpoints/test_databricks_oauth.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py b/tests/unit/proxy/agent_endpoints/test_endpoints.py similarity index 99% rename from tests/test_litellm/proxy/agent_endpoints/test_endpoints.py rename to tests/unit/proxy/agent_endpoints/test_endpoints.py index 2cf81892db7..81b6c09ca12 100644 --- a/tests/test_litellm/proxy/agent_endpoints/test_endpoints.py +++ b/tests/unit/proxy/agent_endpoints/test_endpoints.py @@ -150,7 +150,7 @@ class _AgentPersistence: return self.row async def update(self, *, data: Mapping[str, object], **kwargs: object) -> LiteLLM_AgentsTable: - from tests.test_litellm.proxy.agent_endpoints.test_agent_registry import _stored_agent_row + from tests.unit.proxy.agent_endpoints.test_agent_registry import _stored_agent_row self.row = _stored_agent_row({**self.row.model_dump(), **data}) return self.row @@ -163,7 +163,7 @@ def test_identity_settings_edit_preserves_runtime_configuration_on_readback( ) -> None: from litellm.proxy import proxy_server from litellm.proxy.agent_endpoints.agent_registry import AgentRegistry - from tests.test_litellm.proxy.agent_endpoints.test_agent_registry import _stored_agent_row + from tests.unit.proxy.agent_endpoints.test_agent_registry import _stored_agent_row runtime: Final = { "agent_card_params": {} if cardless else _sample_agent_card_params(), @@ -1330,7 +1330,7 @@ def test_identity_providers_honor_issuer_specific_audiences_and_global_fallback( def test_mode_only_edit_requires_the_existing_identity_sso_tenant( monkeypatch: pytest.MonkeyPatch, change: PatchAgentRequest ) -> None: - from tests.test_litellm.proxy.agent_endpoints.test_managed_identity import BINDING, TENANT, managed_agent + from tests.unit.proxy.agent_endpoints.test_managed_identity import BINDING, TENANT, managed_agent monkeypatch.setattr(agent_endpoints, "_trusted_agent_issuers", lambda: (BINDING.issuer,)) monkeypatch.delenv("MICROSOFT_TENANT", raising=False) @@ -1342,7 +1342,7 @@ def test_mode_only_edit_requires_the_existing_identity_sso_tenant( def test_identity_only_edit_preserves_delegated_mode_validation(monkeypatch: pytest.MonkeyPatch) -> None: - from tests.test_litellm.proxy.agent_endpoints.test_managed_identity import BINDING, managed_agent + from tests.unit.proxy.agent_endpoints.test_managed_identity import BINDING, managed_agent monkeypatch.setattr(agent_endpoints, "_trusted_agent_issuers", lambda: (BINDING.issuer,)) monkeypatch.delenv("MICROSOFT_TENANT", raising=False) @@ -1637,7 +1637,7 @@ def test_agent_detail_cache_miss_preserves_admin_identity_visibility(role, monke def test_invalid_identity_and_untrusted_tenant_cannot_be_registered( monkeypatch: pytest.MonkeyPatch, trusted: bool ) -> None: - from tests.test_litellm.proxy.agent_endpoints.test_managed_identity import BINDING + from tests.unit.proxy.agent_endpoints.test_managed_identity import BINDING configuration: Final = BINDING.model_dump( exclude={"agent_id", "issuer", "revision", "last_authenticated_at", "active"} diff --git a/tests/test_litellm/proxy/agent_endpoints/test_identity.py b/tests/unit/proxy/agent_endpoints/test_identity.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_identity.py rename to tests/unit/proxy/agent_endpoints/test_identity.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_identity_store.py b/tests/unit/proxy/agent_endpoints/test_identity_store.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_identity_store.py rename to tests/unit/proxy/agent_endpoints/test_identity_store.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_kill_switch.py b/tests/unit/proxy/agent_endpoints/test_kill_switch.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_kill_switch.py rename to tests/unit/proxy/agent_endpoints/test_kill_switch.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_managed_identity.py b/tests/unit/proxy/agent_endpoints/test_managed_identity.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_managed_identity.py rename to tests/unit/proxy/agent_endpoints/test_managed_identity.py diff --git a/tests/test_litellm/proxy/agent_endpoints/test_model_list_helpers.py b/tests/unit/proxy/agent_endpoints/test_model_list_helpers.py similarity index 100% rename from tests/test_litellm/proxy/agent_endpoints/test_model_list_helpers.py rename to tests/unit/proxy/agent_endpoints/test_model_list_helpers.py diff --git a/tests/test_litellm/proxy/analytics_endpoints/__init__.py b/tests/unit/proxy/analytics_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/analytics_endpoints/__init__.py rename to tests/unit/proxy/analytics_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/analytics_endpoints/test_analytics_endpoints.py b/tests/unit/proxy/analytics_endpoints/test_analytics_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/analytics_endpoints/test_analytics_endpoints.py rename to tests/unit/proxy/analytics_endpoints/test_analytics_endpoints.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/__init__.py b/tests/unit/proxy/anthropic_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/__init__.py rename to tests/unit/proxy/anthropic_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_claude_code_marketplace.py b/tests/unit/proxy/anthropic_endpoints/test_claude_code_marketplace.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_claude_code_marketplace.py rename to tests/unit/proxy/anthropic_endpoints/test_claude_code_marketplace.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_claude_code_skill_access.py b/tests/unit/proxy/anthropic_endpoints/test_claude_code_skill_access.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_claude_code_skill_access.py rename to tests/unit/proxy/anthropic_endpoints/test_claude_code_skill_access.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py b/tests/unit/proxy/anthropic_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_endpoints.py rename to tests/unit/proxy/anthropic_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_gateway_endpoints.py b/tests/unit/proxy/anthropic_endpoints/test_gateway_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_gateway_endpoints.py rename to tests/unit/proxy/anthropic_endpoints/test_gateway_endpoints.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_skills_endpoints.py b/tests/unit/proxy/anthropic_endpoints/test_skills_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_skills_endpoints.py rename to tests/unit/proxy/anthropic_endpoints/test_skills_endpoints.py diff --git a/tests/test_litellm/proxy/anthropic_endpoints/test_streaming_model_restamp.py b/tests/unit/proxy/anthropic_endpoints/test_streaming_model_restamp.py similarity index 100% rename from tests/test_litellm/proxy/anthropic_endpoints/test_streaming_model_restamp.py rename to tests/unit/proxy/anthropic_endpoints/test_streaming_model_restamp.py diff --git a/tests/test_litellm/proxy/batches_endpoints/__init__.py b/tests/unit/proxy/batches_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/batches_endpoints/__init__.py rename to tests/unit/proxy/batches_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/batches_endpoints/test_endpoints.py b/tests/unit/proxy/batches_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/batches_endpoints/test_endpoints.py rename to tests/unit/proxy/batches_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/batches_endpoints/test_litellm_executed_batches.py b/tests/unit/proxy/batches_endpoints/test_litellm_executed_batches.py similarity index 100% rename from tests/test_litellm/proxy/batches_endpoints/test_litellm_executed_batches.py rename to tests/unit/proxy/batches_endpoints/test_litellm_executed_batches.py diff --git a/tests/test_litellm/proxy/container_endpoints/__init__.py b/tests/unit/proxy/config_resolvers/__init__.py similarity index 100% rename from tests/test_litellm/proxy/container_endpoints/__init__.py rename to tests/unit/proxy/config_resolvers/__init__.py diff --git a/tests/test_litellm/proxy/config_resolvers/test_config_resolvers.py b/tests/unit/proxy/config_resolvers/test_config_resolvers.py similarity index 100% rename from tests/test_litellm/proxy/config_resolvers/test_config_resolvers.py rename to tests/unit/proxy/config_resolvers/test_config_resolvers.py diff --git a/tests/test_litellm/proxy/config_resolvers/test_settings_rules.py b/tests/unit/proxy/config_resolvers/test_settings_rules.py similarity index 100% rename from tests/test_litellm/proxy/config_resolvers/test_settings_rules.py rename to tests/unit/proxy/config_resolvers/test_settings_rules.py diff --git a/tests/test_litellm/proxy/config_resolvers/test_settings_store.py b/tests/unit/proxy/config_resolvers/test_settings_store.py similarity index 100% rename from tests/test_litellm/proxy/config_resolvers/test_settings_store.py rename to tests/unit/proxy/config_resolvers/test_settings_store.py diff --git a/tests/unit/proxy/conftest.py b/tests/unit/proxy/conftest.py index 1d0a7475db6..0e8acf3b905 100644 --- a/tests/unit/proxy/conftest.py +++ b/tests/unit/proxy/conftest.py @@ -8,6 +8,7 @@ from collections.abc import Iterator from typing import Dict import pytest +from prisma.errors import ClientNotConnectedError import litellm @@ -15,6 +16,24 @@ import litellm.proxy.proxy_server from tests.unit.litellm_core_utils.fake_secret_vault import FakeSecretVault +class StubClientNotConnectedError(ClientNotConnectedError): + pass + + +class DisconnectedPrisma: + def is_connected(self) -> bool: + return False + + @property + def _engine(self) -> None: + raise StubClientNotConnectedError() + + +@pytest.fixture +def disconnected_prisma() -> DisconnectedPrisma: + return DisconnectedPrisma() + + # Top-level assignments of these types are the ones importlib.reload(litellm) # would have effectively reset. We snapshot them at conftest import time and # deep-copy the snapshot back before every test. diff --git a/tests/test_litellm/proxy/fine_tuning_endpoints/__init__.py b/tests/unit/proxy/container_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/fine_tuning_endpoints/__init__.py rename to tests/unit/proxy/container_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/container_endpoints/test_endpoints.py b/tests/unit/proxy/container_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/container_endpoints/test_endpoints.py rename to tests/unit/proxy/container_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/container_endpoints/test_handler_factory.py b/tests/unit/proxy/container_endpoints/test_handler_factory.py similarity index 100% rename from tests/test_litellm/proxy/container_endpoints/test_handler_factory.py rename to tests/unit/proxy/container_endpoints/test_handler_factory.py diff --git a/tests/test_litellm/proxy/google_endpoints/__init__.py b/tests/unit/proxy/credential_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/google_endpoints/__init__.py rename to tests/unit/proxy/credential_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/credential_endpoints/test_endpoints.py b/tests/unit/proxy/credential_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/credential_endpoints/test_endpoints.py rename to tests/unit/proxy/credential_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/memory/__init__.py b/tests/unit/proxy/discovery_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/memory/__init__.py rename to tests/unit/proxy/discovery_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_archive.py b/tests/unit/proxy/discovery_endpoints/test_agent_skills_archive.py similarity index 100% rename from tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_archive.py rename to tests/unit/proxy/discovery_endpoints/test_agent_skills_archive.py diff --git a/tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py b/tests/unit/proxy/discovery_endpoints/test_agent_skills_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/discovery_endpoints/test_agent_skills_endpoints.py rename to tests/unit/proxy/discovery_endpoints/test_agent_skills_endpoints.py diff --git a/tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py b/tests/unit/proxy/discovery_endpoints/test_ui_discovery_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/discovery_endpoints/test_ui_discovery_endpoints.py rename to tests/unit/proxy/discovery_endpoints/test_ui_discovery_endpoints.py diff --git a/tests/test_litellm/proxy/ocr_endpoints/__init__.py b/tests/unit/proxy/fine_tuning_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/ocr_endpoints/__init__.py rename to tests/unit/proxy/fine_tuning_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/fine_tuning_endpoints/test_endpoints.py b/tests/unit/proxy/fine_tuning_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/fine_tuning_endpoints/test_endpoints.py rename to tests/unit/proxy/fine_tuning_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/google_endpoints/test_endpoints.py b/tests/unit/proxy/google_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/google_endpoints/test_endpoints.py rename to tests/unit/proxy/google_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/google_endpoints/test_google_api_endpoints.py b/tests/unit/proxy/google_endpoints/test_google_api_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/google_endpoints/test_google_api_endpoints.py rename to tests/unit/proxy/google_endpoints/test_google_api_endpoints.py diff --git a/tests/test_litellm/proxy/google_endpoints/test_interactions_agent_param.py b/tests/unit/proxy/google_endpoints/test_interactions_agent_param.py similarity index 100% rename from tests/test_litellm/proxy/google_endpoints/test_interactions_agent_param.py rename to tests/unit/proxy/google_endpoints/test_interactions_agent_param.py diff --git a/tests/test_litellm/proxy/google_endpoints/test_managed_agents_model_param.py b/tests/unit/proxy/google_endpoints/test_managed_agents_model_param.py similarity index 100% rename from tests/test_litellm/proxy/google_endpoints/test_managed_agents_model_param.py rename to tests/unit/proxy/google_endpoints/test_managed_agents_model_param.py diff --git a/tests/test_litellm/proxy/rag_endpoints/__init__.py b/tests/unit/proxy/health_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/rag_endpoints/__init__.py rename to tests/unit/proxy/health_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/health_endpoints/test_graceful_shutdown_endpoints.py b/tests/unit/proxy/health_endpoints/test_graceful_shutdown_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/health_endpoints/test_graceful_shutdown_endpoints.py rename to tests/unit/proxy/health_endpoints/test_graceful_shutdown_endpoints.py diff --git a/tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py b/tests/unit/proxy/health_endpoints/test_health_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py rename to tests/unit/proxy/health_endpoints/test_health_endpoints.py diff --git a/tests/test_litellm/proxy/image_endpoints/__init__.py b/tests/unit/proxy/image_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/image_endpoints/__init__.py rename to tests/unit/proxy/image_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/image_endpoints/test_azure_routes.py b/tests/unit/proxy/image_endpoints/test_azure_routes.py similarity index 100% rename from tests/test_litellm/proxy/image_endpoints/test_azure_routes.py rename to tests/unit/proxy/image_endpoints/test_azure_routes.py diff --git a/tests/test_litellm/proxy/image_endpoints/test_endpoints.py b/tests/unit/proxy/image_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/image_endpoints/test_endpoints.py rename to tests/unit/proxy/image_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/rerank_endpoints/__init__.py b/tests/unit/proxy/list_api/__init__.py similarity index 100% rename from tests/test_litellm/proxy/rerank_endpoints/__init__.py rename to tests/unit/proxy/list_api/__init__.py diff --git a/tests/test_litellm/proxy/list_api/test_common.py b/tests/unit/proxy/list_api/test_common.py similarity index 100% rename from tests/test_litellm/proxy/list_api/test_common.py rename to tests/unit/proxy/list_api/test_common.py diff --git a/tests/test_litellm/proxy/list_api/test_in_memory.py b/tests/unit/proxy/list_api/test_in_memory.py similarity index 100% rename from tests/test_litellm/proxy/list_api/test_in_memory.py rename to tests/unit/proxy/list_api/test_in_memory.py diff --git a/tests/test_litellm/proxy/list_api/test_list_framework.py b/tests/unit/proxy/list_api/test_list_framework.py similarity index 100% rename from tests/test_litellm/proxy/list_api/test_list_framework.py rename to tests/unit/proxy/list_api/test_list_framework.py diff --git a/tests/test_litellm/proxy/response_api_endpoints/__init__.py b/tests/unit/proxy/memory/__init__.py similarity index 100% rename from tests/test_litellm/proxy/response_api_endpoints/__init__.py rename to tests/unit/proxy/memory/__init__.py diff --git a/tests/test_litellm/proxy/memory/test_memory_endpoints.py b/tests/unit/proxy/memory/test_memory_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/memory/test_memory_endpoints.py rename to tests/unit/proxy/memory/test_memory_endpoints.py diff --git a/tests/test_litellm/proxy/utils/__init__.py b/tests/unit/proxy/ocr_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/utils/__init__.py rename to tests/unit/proxy/ocr_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/ocr_endpoints/test_endpoints.py b/tests/unit/proxy/ocr_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/ocr_endpoints/test_endpoints.py rename to tests/unit/proxy/ocr_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/utils/helpers/__init__.py b/tests/unit/proxy/openai_files_endpoint/__init__.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/__init__.py rename to tests/unit/proxy/openai_files_endpoint/__init__.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_batch_guardrails.py b/tests/unit/proxy/openai_files_endpoint/test_batch_guardrails.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_batch_guardrails.py rename to tests/unit/proxy/openai_files_endpoint/test_batch_guardrails.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_batch_file_validation.py b/tests/unit/proxy/openai_files_endpoint/test_files_batch_file_validation.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_files_batch_file_validation.py rename to tests/unit/proxy/openai_files_endpoint/test_files_batch_file_validation.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_common_utils.py b/tests/unit/proxy/openai_files_endpoint/test_files_common_utils.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_files_common_utils.py rename to tests/unit/proxy/openai_files_endpoint/test_files_common_utils.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py b/tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py rename to tests/unit/proxy/openai_files_endpoint/test_files_endpoint.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_general_upload_validation.py b/tests/unit/proxy/openai_files_endpoint/test_general_upload_validation.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_general_upload_validation.py rename to tests/unit/proxy/openai_files_endpoint/test_general_upload_validation.py diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_storage_backend_service.py b/tests/unit/proxy/openai_files_endpoint/test_storage_backend_service.py similarity index 100% rename from tests/test_litellm/proxy/openai_files_endpoint/test_storage_backend_service.py rename to tests/unit/proxy/openai_files_endpoint/test_storage_backend_service.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/__init__.py b/tests/unit/proxy/prompts/__init__.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/__init__.py rename to tests/unit/proxy/prompts/__init__.py diff --git a/tests/test_litellm/proxy/prompts/test_prompt_endpoints.py b/tests/unit/proxy/prompts/test_prompt_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/prompts/test_prompt_endpoints.py rename to tests/unit/proxy/prompts/test_prompt_endpoints.py diff --git a/tests/test_litellm/proxy/prompts/test_prompt_endpoints_crud.py b/tests/unit/proxy/prompts/test_prompt_endpoints_crud.py similarity index 100% rename from tests/test_litellm/proxy/prompts/test_prompt_endpoints_crud.py rename to tests/unit/proxy/prompts/test_prompt_endpoints_crud.py diff --git a/tests/test_litellm/proxy/prompts/test_prompt_environment.py b/tests/unit/proxy/prompts/test_prompt_environment.py similarity index 100% rename from tests/test_litellm/proxy/prompts/test_prompt_environment.py rename to tests/unit/proxy/prompts/test_prompt_environment.py diff --git a/tests/test_litellm/proxy/prompts/test_prompt_registry.py b/tests/unit/proxy/prompts/test_prompt_registry.py similarity index 100% rename from tests/test_litellm/proxy/prompts/test_prompt_registry.py rename to tests/unit/proxy/prompts/test_prompt_registry.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/__init__.py b/tests/unit/proxy/public_endpoints/public_v1/__init__.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/__init__.py rename to tests/unit/proxy/public_endpoints/public_v1/__init__.py diff --git a/tests/test_litellm/proxy/public_endpoints/public_v1/test_model_hub.py b/tests/unit/proxy/public_endpoints/public_v1/test_model_hub.py similarity index 100% rename from tests/test_litellm/proxy/public_endpoints/public_v1/test_model_hub.py rename to tests/unit/proxy/public_endpoints/public_v1/test_model_hub.py diff --git a/tests/test_litellm/proxy/public_endpoints/test_public_endpoints.py b/tests/unit/proxy/public_endpoints/test_public_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/public_endpoints/test_public_endpoints.py rename to tests/unit/proxy/public_endpoints/test_public_endpoints.py diff --git a/tests/test_litellm/proxy/vector_store_files_endpoints/__init__.py b/tests/unit/proxy/rag_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_files_endpoints/__init__.py rename to tests/unit/proxy/rag_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/rag_endpoints/test_rag_endpoints.py b/tests/unit/proxy/rag_endpoints/test_rag_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/rag_endpoints/test_rag_endpoints.py rename to tests/unit/proxy/rag_endpoints/test_rag_endpoints.py diff --git a/tests/test_litellm/proxy/rag_endpoints/test_upload_security.py b/tests/unit/proxy/rag_endpoints/test_upload_security.py similarity index 100% rename from tests/test_litellm/proxy/rag_endpoints/test_upload_security.py rename to tests/unit/proxy/rag_endpoints/test_upload_security.py diff --git a/tests/test_litellm/proxy/video_endpoints/__init__.py b/tests/unit/proxy/realtime_endpoints/__init__.py similarity index 100% rename from tests/test_litellm/proxy/video_endpoints/__init__.py rename to tests/unit/proxy/realtime_endpoints/__init__.py diff --git a/tests/test_litellm/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py b/tests/unit/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py rename to tests/unit/proxy/realtime_endpoints/test_realtime_webrtc_endpoints.py diff --git a/tests/unit/proxy/rerank_endpoints/__init__.py b/tests/unit/proxy/rerank_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/rerank_endpoints/test_endpoints.py b/tests/unit/proxy/rerank_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/rerank_endpoints/test_endpoints.py rename to tests/unit/proxy/rerank_endpoints/test_endpoints.py diff --git a/tests/unit/proxy/response_api_endpoints/__init__.py b/tests/unit/proxy/response_api_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py b/tests/unit/proxy/response_api_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/response_api_endpoints/test_endpoints.py rename to tests/unit/proxy/response_api_endpoints/test_endpoints.py diff --git a/tests/unit/proxy/shutdown/__init__.py b/tests/unit/proxy/shutdown/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/shutdown/test_graceful_shutdown_manager.py b/tests/unit/proxy/shutdown/test_graceful_shutdown_manager.py similarity index 100% rename from tests/test_litellm/proxy/shutdown/test_graceful_shutdown_manager.py rename to tests/unit/proxy/shutdown/test_graceful_shutdown_manager.py diff --git a/tests/test_litellm/proxy/shutdown/test_scheduled_jobs.py b/tests/unit/proxy/shutdown/test_scheduled_jobs.py similarity index 100% rename from tests/test_litellm/proxy/shutdown/test_scheduled_jobs.py rename to tests/unit/proxy/shutdown/test_scheduled_jobs.py diff --git a/tests/unit/proxy/ui_crud_endpoints/__init__.py b/tests/unit/proxy/ui_crud_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/ui_crud_endpoints/test_latest_release_endpoints.py b/tests/unit/proxy/ui_crud_endpoints/test_latest_release_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/ui_crud_endpoints/test_latest_release_endpoints.py rename to tests/unit/proxy/ui_crud_endpoints/test_latest_release_endpoints.py diff --git a/tests/test_litellm/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py b/tests/unit/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py rename to tests/unit/proxy/ui_crud_endpoints/test_proxy_setting_endpoints.py diff --git a/tests/test_litellm/proxy/ui_crud_endpoints/test_user_banner_endpoints.py b/tests/unit/proxy/ui_crud_endpoints/test_user_banner_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/ui_crud_endpoints/test_user_banner_endpoints.py rename to tests/unit/proxy/ui_crud_endpoints/test_user_banner_endpoints.py diff --git a/tests/unit/proxy/utils/__init__.py b/tests/unit/proxy/utils/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/proxy/utils/helpers/__init__.py b/tests/unit/proxy/utils/helpers/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/utils/helpers/test_error_helpers.py b/tests/unit/proxy/utils/helpers/test_error_helpers.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_error_helpers.py rename to tests/unit/proxy/utils/helpers/test_error_helpers.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_guardrail_merge.py b/tests/unit/proxy/utils/helpers/test_guardrail_merge.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_guardrail_merge.py rename to tests/unit/proxy/utils/helpers/test_guardrail_merge.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_misc_helpers.py b/tests/unit/proxy/utils/helpers/test_misc_helpers.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_misc_helpers.py rename to tests/unit/proxy/utils/helpers/test_misc_helpers.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_model_access.py b/tests/unit/proxy/utils/helpers/test_model_access.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_model_access.py rename to tests/unit/proxy/utils/helpers/test_model_access.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_month_end_projection.py b/tests/unit/proxy/utils/helpers/test_month_end_projection.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_month_end_projection.py rename to tests/unit/proxy/utils/helpers/test_month_end_projection.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_premium_user_check.py b/tests/unit/proxy/utils/helpers/test_premium_user_check.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_premium_user_check.py rename to tests/unit/proxy/utils/helpers/test_premium_user_check.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_team_configs.py b/tests/unit/proxy/utils/helpers/test_team_configs.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_team_configs.py rename to tests/unit/proxy/utils/helpers/test_team_configs.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_to_ns.py b/tests/unit/proxy/utils/helpers/test_to_ns.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_to_ns.py rename to tests/unit/proxy/utils/helpers/test_to_ns.py diff --git a/tests/test_litellm/proxy/utils/helpers/test_url_helpers.py b/tests/unit/proxy/utils/helpers/test_url_helpers.py similarity index 100% rename from tests/test_litellm/proxy/utils/helpers/test_url_helpers.py rename to tests/unit/proxy/utils/helpers/test_url_helpers.py diff --git a/tests/unit/proxy/utils/prisma_and_spend/__init__.py b/tests/unit/proxy/utils/prisma_and_spend/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/_harness_smoke_test.py b/tests/unit/proxy/utils/prisma_and_spend/_harness_smoke_test.py similarity index 93% rename from tests/test_litellm/proxy/utils/prisma_and_spend/_harness_smoke_test.py rename to tests/unit/proxy/utils/prisma_and_spend/_harness_smoke_test.py index 2243d46ae7f..dd4bd0f1f72 100644 --- a/tests/test_litellm/proxy/utils/prisma_and_spend/_harness_smoke_test.py +++ b/tests/unit/proxy/utils/prisma_and_spend/_harness_smoke_test.py @@ -15,14 +15,14 @@ from litellm.proxy.utils import PrismaClient def test_normalize_scrubs_volatile_keys() -> None: - from tests.test_litellm.proxy.utils.prisma_and_spend.conftest import normalize + from tests.unit.proxy.utils.prisma_and_spend.conftest import normalize out = normalize({"id": 1, "spend": 2.0, "team_id": "t1"}) assert out == {"id": "", "spend": "", "team_id": "t1"} def test_normalize_recurses_into_lists() -> None: - from tests.test_litellm.proxy.utils.prisma_and_spend.conftest import normalize + from tests.unit.proxy.utils.prisma_and_spend.conftest import normalize out = normalize([{"id": "x"}, {"team_id": "t"}]) assert out == [{"id": ""}, {"team_id": "t"}] diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/conftest.py b/tests/unit/proxy/utils/prisma_and_spend/conftest.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/conftest.py rename to tests/unit/proxy/utils/prisma_and_spend/conftest.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_cache_user_row.py b/tests/unit/proxy/utils/prisma_and_spend/test_cache_user_row.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_cache_user_row.py rename to tests/unit/proxy/utils/prisma_and_spend/test_cache_user_row.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_config_param_cache.py b/tests/unit/proxy/utils/prisma_and_spend/test_config_param_cache.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_config_param_cache.py rename to tests/unit/proxy/utils/prisma_and_spend/test_config_param_cache.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_password_helpers.py b/tests/unit/proxy/utils/prisma_and_spend/test_password_helpers.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_password_helpers.py rename to tests/unit/proxy/utils/prisma_and_spend/test_password_helpers.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_engine_watcher.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_engine_watcher.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_engine_watcher.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_engine_watcher.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_get_data.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_get_data.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_get_data.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_get_data.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_health.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_health.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_health.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_health.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_lifecycle.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_lifecycle.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_lifecycle.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_lifecycle.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_reconnect.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_writes.py b/tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_writes.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_prisma_client_writes.py rename to tests/unit/proxy/utils/prisma_and_spend/test_prisma_client_writes.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_proxy_update_spend.py b/tests/unit/proxy/utils/prisma_and_spend/test_proxy_update_spend.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_proxy_update_spend.py rename to tests/unit/proxy/utils/prisma_and_spend/test_proxy_update_spend.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_send_email.py b/tests/unit/proxy/utils/prisma_and_spend/test_send_email.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_send_email.py rename to tests/unit/proxy/utils/prisma_and_spend/test_send_email.py diff --git a/tests/test_litellm/proxy/utils/prisma_and_spend/test_spend_functions.py b/tests/unit/proxy/utils/prisma_and_spend/test_spend_functions.py similarity index 100% rename from tests/test_litellm/proxy/utils/prisma_and_spend/test_spend_functions.py rename to tests/unit/proxy/utils/prisma_and_spend/test_spend_functions.py diff --git a/tests/unit/proxy/utils/proxy_logging/__init__.py b/tests/unit/proxy/utils/proxy_logging/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/utils/proxy_logging/_harness_smoke_test.py b/tests/unit/proxy/utils/proxy_logging/_harness_smoke_test.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/_harness_smoke_test.py rename to tests/unit/proxy/utils/proxy_logging/_harness_smoke_test.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/conftest.py b/tests/unit/proxy/utils/proxy_logging/conftest.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/conftest.py rename to tests/unit/proxy/utils/proxy_logging/conftest.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_alerting.py b/tests/unit/proxy/utils/proxy_logging/test_alerting.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_alerting.py rename to tests/unit/proxy/utils/proxy_logging/test_alerting.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_callback_capabilities_class.py b/tests/unit/proxy/utils/proxy_logging/test_callback_capabilities_class.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_callback_capabilities_class.py rename to tests/unit/proxy/utils/proxy_logging/test_callback_capabilities_class.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_callback_capabilities_dataclass.py b/tests/unit/proxy/utils/proxy_logging/test_callback_capabilities_dataclass.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_callback_capabilities_dataclass.py rename to tests/unit/proxy/utils/proxy_logging/test_callback_capabilities_dataclass.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_during_call_hook.py b/tests/unit/proxy/utils/proxy_logging/test_during_call_hook.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_during_call_hook.py rename to tests/unit/proxy/utils/proxy_logging/test_during_call_hook.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_guardrail_pipeline.py b/tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_guardrail_pipeline.py rename to tests/unit/proxy/utils/proxy_logging/test_guardrail_pipeline.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_internal_usage_cache.py b/tests/unit/proxy/utils/proxy_logging/test_internal_usage_cache.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_internal_usage_cache.py rename to tests/unit/proxy/utils/proxy_logging/test_internal_usage_cache.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_lifecycle.py b/tests/unit/proxy/utils/proxy_logging/test_lifecycle.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_lifecycle.py rename to tests/unit/proxy/utils/proxy_logging/test_lifecycle.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_mcp_bridging.py b/tests/unit/proxy/utils/proxy_logging/test_mcp_bridging.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_mcp_bridging.py rename to tests/unit/proxy/utils/proxy_logging/test_mcp_bridging.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_module_helpers.py b/tests/unit/proxy/utils/proxy_logging/test_module_helpers.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_module_helpers.py rename to tests/unit/proxy/utils/proxy_logging/test_module_helpers.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_post_call_failure_hook.py b/tests/unit/proxy/utils/proxy_logging/test_post_call_failure_hook.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_post_call_failure_hook.py rename to tests/unit/proxy/utils/proxy_logging/test_post_call_failure_hook.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_post_call_success_hook.py b/tests/unit/proxy/utils/proxy_logging/test_post_call_success_hook.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_post_call_success_hook.py rename to tests/unit/proxy/utils/proxy_logging/test_post_call_success_hook.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_pre_call_hook.py b/tests/unit/proxy/utils/proxy_logging/test_pre_call_hook.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_pre_call_hook.py rename to tests/unit/proxy/utils/proxy_logging/test_pre_call_hook.py diff --git a/tests/test_litellm/proxy/utils/proxy_logging/test_streaming_hooks.py b/tests/unit/proxy/utils/proxy_logging/test_streaming_hooks.py similarity index 100% rename from tests/test_litellm/proxy/utils/proxy_logging/test_streaming_hooks.py rename to tests/unit/proxy/utils/proxy_logging/test_streaming_hooks.py diff --git a/tests/unit/proxy/vector_store_endpoints/__init__.py b/tests/unit/proxy/vector_store_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_access_control.py b/tests/unit/proxy/vector_store_endpoints/test_vector_store_access_control.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_access_control.py rename to tests/unit/proxy/vector_store_endpoints/test_vector_store_access_control.py diff --git a/tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_endpoints.py b/tests/unit/proxy/vector_store_endpoints/test_vector_store_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_endpoints.py rename to tests/unit/proxy/vector_store_endpoints/test_vector_store_endpoints.py diff --git a/tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py b/tests/unit/proxy/vector_store_endpoints/test_vector_store_rbac.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_rbac.py rename to tests/unit/proxy/vector_store_endpoints/test_vector_store_rbac.py diff --git a/tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_tenant_guard.py b/tests/unit/proxy/vector_store_endpoints/test_vector_store_tenant_guard.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_endpoints/test_vector_store_tenant_guard.py rename to tests/unit/proxy/vector_store_endpoints/test_vector_store_tenant_guard.py diff --git a/tests/unit/proxy/vector_store_files_endpoints/__init__.py b/tests/unit/proxy/vector_store_files_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/vector_store_files_endpoints/test_endpoints.py b/tests/unit/proxy/vector_store_files_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/vector_store_files_endpoints/test_endpoints.py rename to tests/unit/proxy/vector_store_files_endpoints/test_endpoints.py diff --git a/tests/unit/proxy/video_endpoints/__init__.py b/tests/unit/proxy/video_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/video_endpoints/test_endpoints.py b/tests/unit/proxy/video_endpoints/test_endpoints.py similarity index 100% rename from tests/test_litellm/proxy/video_endpoints/test_endpoints.py rename to tests/unit/proxy/video_endpoints/test_endpoints.py diff --git a/tests/test_litellm/proxy/video_endpoints/test_utils.py b/tests/unit/proxy/video_endpoints/test_utils.py similarity index 100% rename from tests/test_litellm/proxy/video_endpoints/test_utils.py rename to tests/unit/proxy/video_endpoints/test_utils.py