From a8f24c856820ec013fed4e15b2e834797b70ee82 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Mon, 24 Aug 2026 13:35:34 -0700 Subject: [PATCH] test(vertex-passthrough): send the virtual key via x-litellm-api-key in streaming tests The LIT-4761 streaming-classification tests passed only the bring-your-own Google OAuth token in Authorization and mocked get_litellm_virtual_key, a shape that cannot authenticate in production. The credential-less filter now resolves the caller key by auth precedence, so a lone Authorization value reads as the key and is stripped. Send the virtual key in x-litellm-api-key, matching a real request, so Authorization is preserved and the classification assertions run. --- .../pass_through_endpoints/test_llm_pass_through_endpoints.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py b/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py index 243aadfc981..4ace18c927b 100644 --- a/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py +++ b/tests/test_litellm/proxy/pass_through_endpoints/test_llm_pass_through_endpoints.py @@ -3311,6 +3311,7 @@ class TestVertexRawPredictStreamingClassification: "path": f"/vertex_ai/{endpoint}", "headers": [ (b"content-type", b"application/json"), + (b"x-litellm-api-key", b"test-key"), (b"authorization", b"Bearer ya29.byo-google-oauth"), ], "query_string": b"",