litellm/tests/test_litellm/proxy/pass_through_endpoints
Ishaan Jaff b281181448
fix(tests): isolate auth in spend logs and vertex passthrough tests (#21810)
* fix(tests): add app.dependency_overrides for auth in spend logs tests

test_ui_view_spend_logs_with_status, test_ui_view_spend_logs_with_model,
test_ui_view_spend_logs_with_model_id, and test_view_spend_logs_summarize_parameter
all send Bearer sk-test without mocking user_api_key_auth. When a prior test
in the same xdist worker sets master_key, the auth check fails for sk-test
and the test fails intermittently.

Fix: use app.dependency_overrides[ps.user_api_key_auth] to bypass auth,
same pattern as other tests in the same file.

* fix(tests): mock user_api_key_auth in test_vertex_passthrough_with_no_default_credentials

vertex_proxy_route calls user_api_key_auth internally. When a prior test in the
same xdist worker sets master_key, the auth check fails for the test request
and create_pass_through_route is never called, causing assert_called_once_with to fail.

Fix: patch user_api_key_auth as an AsyncMock in the with mock.patch() block.
2026-02-21 12:51:38 -08:00
..
llm_provider_handlers
test_llm_pass_through_endpoints.py fix(tests): isolate auth in spend logs and vertex passthrough tests (#21810) 2026-02-21 12:51:38 -08:00
test_method_specific_routing.py Add test got method speicifc routing 2026-02-19 11:58:48 +05:30
test_pass_through_endpoints.py fix: add custom_body parameter to endpoint_func in create_pass_through_route (#20849) 2026-02-13 16:44:40 -08:00
test_passthrough_endpoints_common_utils.py
test_passthrough_guardrails_field_targeting.py
test_passthrough_guardrails.py
test_vertex_ai_batch_passthrough.py Fix batch tests 2026-01-22 19:23:32 +05:30
test_vertex_passthrough_load_balancing.py [Fix] VertexAI Pass through - fix regression that caused vertex ai passthroughs to stop working for router models (#19967) 2026-01-28 16:54:01 -08:00