From 1f3dd43c2765ad5c1f7b0be4a8c1a8a632a328e4 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 28 Aug 2024 10:08:09 -0700 Subject: [PATCH] fix pass through rerank requests tests --- litellm/tests/test_pass_through_endpoints.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litellm/tests/test_pass_through_endpoints.py b/litellm/tests/test_pass_through_endpoints.py index 69869fe0e5a..28e6acda9fd 100644 --- a/litellm/tests/test_pass_through_endpoints.py +++ b/litellm/tests/test_pass_through_endpoints.py @@ -25,8 +25,17 @@ async def mock_request(*args, **kwargs): return mock_response +def remove_rerank_route(): + for route in app.routes: + if route.path == "/v1/rerank" and "POST" in route.methods: + app.routes.remove(route) + print("Rerank route removed successfully") + print("ALL Routes on app=", app.routes) + + @pytest.fixture def client(): + remove_rerank_route() # remove the native rerank route on the litellm proxy - since we're testing the pass through endpoints return TestClient(app)