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.
This commit is contained in:
mateo-berri 2026-08-24 13:35:34 -07:00
parent 5d8286c963
commit a8f24c8568

View file

@ -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"",