litellm/tests/test_litellm/llms/vertex_ai/rerank
Mateo Wang 9ab3847c0b
fix(tests): remove importlib.reload of http_handler that breaks client injection in later tests (#34336)
The huggingface embedding test fixture reloaded
litellm.llms.custom_httpx.http_handler, creating a new HTTPHandler class
object. llm_http_handler keeps the class captured at import time, so any
test running later in the same process that injects a client built from
the reloaded class fails the isinstance check and the mock is silently
discarded, causing a real network call. Under pytest-xdist loadscope this
surfaced as a deterministic failure of
test_accept_header_in_completion_request_jwt whenever an unrelated PR
shifted worker distribution.

Also removes the same reload pattern from the vertex rerank integration
test (both were previously removed in a6df01caec and resurrected by a
merge conflict resolution) and hardens the agentcore victim test by
dropping the bare except that swallowed the real error
2026-07-23 01:11:35 +00:00
..
test_vertex_ai_rerank_integration.py fix(tests): remove importlib.reload of http_handler that breaks client injection in later tests (#34336) 2026-07-23 01:11:35 +00:00
test_vertex_ai_rerank_transformation.py Merge branch 'litellm_internal_staging' into litellm_vertex_request_metadata_labels 2026-04-21 09:10:51 +05:30
test_vertex_ai_rerank_userlabels_e2e.py test(vertex_ai): add e2e tests for rerank userLabels propagation 2026-04-30 18:25:38 +00:00