diff --git a/tests/unit/rust_bridge/__init__.py b/tests/unit/rust_bridge/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/rust_bridge/ocr/__init__.py b/tests/unit/rust_bridge/ocr/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/rust_bridge/ocr/test_route_host.py b/tests/unit/rust_bridge/ocr/test_route_host.py similarity index 100% rename from tests/test_litellm/rust_bridge/ocr/test_route_host.py rename to tests/unit/rust_bridge/ocr/test_route_host.py diff --git a/tests/unit/rust_bridge/responses/__init__.py b/tests/unit/rust_bridge/responses/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/rust_bridge/responses/test_route_host.py b/tests/unit/rust_bridge/responses/test_route_host.py similarity index 100% rename from tests/test_litellm/rust_bridge/responses/test_route_host.py rename to tests/unit/rust_bridge/responses/test_route_host.py diff --git a/tests/unit/sandbox/__init__.py b/tests/unit/sandbox/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/sandbox/test_e2b_sandbox.py b/tests/unit/sandbox/test_e2b_sandbox.py similarity index 100% rename from tests/test_litellm/sandbox/test_e2b_sandbox.py rename to tests/unit/sandbox/test_e2b_sandbox.py diff --git a/tests/test_litellm/sandbox/test_opensandbox_sandbox.py b/tests/unit/sandbox/test_opensandbox_sandbox.py similarity index 100% rename from tests/test_litellm/sandbox/test_opensandbox_sandbox.py rename to tests/unit/sandbox/test_opensandbox_sandbox.py diff --git a/tests/test_litellm/sandbox/test_sandbox_tools.py b/tests/unit/sandbox/test_sandbox_tools.py similarity index 100% rename from tests/test_litellm/sandbox/test_sandbox_tools.py rename to tests/unit/sandbox/test_sandbox_tools.py diff --git a/tests/unit/skills/__init__.py b/tests/unit/skills/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/skills/test_skills_main.py b/tests/unit/skills/test_skills_main.py similarity index 100% rename from tests/test_litellm/skills/test_skills_main.py rename to tests/unit/skills/test_skills_main.py diff --git a/tests/unit/test_router/__init__.py b/tests/unit/test_router/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/test_router/test_enforce_model_rate_limits.py b/tests/unit/test_router/test_enforce_model_rate_limits.py similarity index 100% rename from tests/test_litellm/test_router/test_enforce_model_rate_limits.py rename to tests/unit/test_router/test_enforce_model_rate_limits.py diff --git a/tests/test_litellm/test_router/test_io_token_rate_limits.py b/tests/unit/test_router/test_io_token_rate_limits.py similarity index 97% rename from tests/test_litellm/test_router/test_io_token_rate_limits.py rename to tests/unit/test_router/test_io_token_rate_limits.py index 3cef1c7bb63..a5a68271111 100644 --- a/tests/test_litellm/test_router/test_io_token_rate_limits.py +++ b/tests/unit/test_router/test_io_token_rate_limits.py @@ -1039,31 +1039,3 @@ class TestContextSlotRetention: assert deployment is not None router._update_kwargs_with_deployment(deployment=deployment.model_dump(), kwargs=kwargs) assert get_io_token_rate_limit_request_kwargs() is kwargs - - -@pytest.mark.asyncio -async def test_the_deployment_itpm_reservation_counts_the_request_off_the_event_loop(): - from litellm.utils import get_utc_datetime - from tests.large_text import text - from tests.test_litellm.litellm_core_utils.event_loop_lag import ( - assert_loop_stayed_free, - timed_with_loop_lags, - warm_tokenizer, - ) - - dual_cache = DualCache() - check = ModelRateLimitingCheck(dual_cache=dual_cache) - warm_tokenizer("anthropic/claude-fable-5") - deployment = { - "litellm_params": {"model": "anthropic/claude-fable-5", "itpm": 10_000_000}, - "model_info": {"id": "io-loop-id"}, - "model_name": "claude", - } - set_io_token_rate_limit_request_kwargs({"messages": [{"role": "user", "content": text * 100}], "metadata": {}}) - - _, took, lags = await timed_with_loop_lags(lambda: check.async_pre_call_check(deployment)) - - minute = get_utc_datetime().strftime("%H-%M") - reserved = await dual_cache.async_get_cache(key=f"global_router:io-loop-id:anthropic/claude-fable-5:itpm:{minute}") - assert reserved > 100_000 - assert_loop_stayed_free(took, lags) diff --git a/tests/unit/types/__init__.py b/tests/unit/types/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/types/llms/__init__.py b/tests/unit/types/llms/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/types/llms/test_types_llms_bedrock.py b/tests/unit/types/llms/test_types_llms_bedrock.py similarity index 100% rename from tests/test_litellm/types/llms/test_types_llms_bedrock.py rename to tests/unit/types/llms/test_types_llms_bedrock.py diff --git a/tests/test_litellm/types/llms/test_types_llms_openai.py b/tests/unit/types/llms/test_types_llms_openai.py similarity index 100% rename from tests/test_litellm/types/llms/test_types_llms_openai.py rename to tests/unit/types/llms/test_types_llms_openai.py diff --git a/tests/unit/types/proxy/__init__.py b/tests/unit/types/proxy/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/unit/types/proxy/policy_engine/__init__.py b/tests/unit/types/proxy/policy_engine/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/types/proxy/policy_engine/test_pipeline_types.py b/tests/unit/types/proxy/policy_engine/test_pipeline_types.py similarity index 100% rename from tests/test_litellm/types/proxy/policy_engine/test_pipeline_types.py rename to tests/unit/types/proxy/policy_engine/test_pipeline_types.py diff --git a/tests/test_litellm/types/proxy/policy_engine/test_policy_types.py b/tests/unit/types/proxy/policy_engine/test_policy_types.py similarity index 100% rename from tests/test_litellm/types/proxy/policy_engine/test_policy_types.py rename to tests/unit/types/proxy/policy_engine/test_policy_types.py diff --git a/tests/test_litellm/types/proxy/policy_engine/test_resolver_types.py b/tests/unit/types/proxy/policy_engine/test_resolver_types.py similarity index 100% rename from tests/test_litellm/types/proxy/policy_engine/test_resolver_types.py rename to tests/unit/types/proxy/policy_engine/test_resolver_types.py diff --git a/tests/unit/videos/__init__.py b/tests/unit/videos/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/videos/test_main.py b/tests/unit/videos/test_main.py similarity index 100% rename from tests/test_litellm/videos/test_main.py rename to tests/unit/videos/test_main.py diff --git a/tests/test_litellm/videos/test_utils.py b/tests/unit/videos/test_utils.py similarity index 95% rename from tests/test_litellm/videos/test_utils.py rename to tests/unit/videos/test_utils.py index 57fb549c23d..728644cdda5 100644 --- a/tests/test_litellm/videos/test_utils.py +++ b/tests/unit/videos/test_utils.py @@ -169,18 +169,6 @@ def test_optional__extra_body_overrides_mapped_and_is_removed(): assert "extra_body" not in result -def test_optional__no_extra_body_returns_mapped_unchanged(): - config = _config({"seconds": "8"}) - - result = get_optional( - model="sora-2", - video_generation_provider_config=config, - video_generation_optional_params={"seconds": "8"}, - ) - - assert result == {"seconds": "8"} - - def test_optional__non_dict_extra_body_ignored(): config = _config({"seconds": "8"})