From b4419f2a2100b53ebc8dec2eb561610a00bda1d0 Mon Sep 17 00:00:00 2001 From: Saleh Alghusson Date: Fri, 28 Aug 2026 12:15:32 -0400 Subject: [PATCH] Address Perplexity attribution test review --- .../chat/test_perplexity_chat_transformation.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/test_litellm/llms/perplexity/chat/test_perplexity_chat_transformation.py b/tests/test_litellm/llms/perplexity/chat/test_perplexity_chat_transformation.py index 7966f60d683..5e835e44917 100644 --- a/tests/test_litellm/llms/perplexity/chat/test_perplexity_chat_transformation.py +++ b/tests/test_litellm/llms/perplexity/chat/test_perplexity_chat_transformation.py @@ -21,15 +21,21 @@ class TestPerplexityChatTransformation: ("headers", "expected"), [({}, "litellm"), ({"x-pplx-integration": "custom"}, "custom")], ) - def test_integration_header_default_is_caller_overridable(self, headers, expected): - headers = PerplexityChatConfig().validate_environment( + def test_integration_header_default_is_caller_overridable( + self, headers: dict[str, str], expected: str + ): + validated_headers = PerplexityChatConfig().validate_environment( headers=headers, model="sonar", messages=[], optional_params={}, litellm_params={}, ) - request = httpx.Request("POST", "https://api.perplexity.ai/chat/completions", headers=headers) + request = httpx.Request( + "POST", + "https://api.perplexity.ai/chat/completions", + headers=validated_headers, + ) assert request.headers.get_list("x-pplx-integration") == [expected]