From 428cb5889203fea41a15ccffccb4c791ff40a533 Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 30 Sep 2026 01:26:24 +0000 Subject: [PATCH] test(grayswan): normalize the client user agent in the generic body assert Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/integration/observability/test_grayswan_wire.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/integration/observability/test_grayswan_wire.py b/tests/integration/observability/test_grayswan_wire.py index 894a1f76b4c..13d49f1095f 100644 --- a/tests/integration/observability/test_grayswan_wire.py +++ b/tests/integration/observability/test_grayswan_wire.py @@ -146,7 +146,9 @@ def _chat_provider(message: dict[str, JsonValue]): def _normalized_generic_body(body: dict[str, JsonValue]) -> dict[str, JsonValue]: headers: Final = body.get("request_headers") normalized_headers: Final = ( - {**headers, "host": "", "content-length": ""} if isinstance(headers, dict) else headers + {**headers, "host": "", "content-length": "", "user-agent": ""} + if isinstance(headers, dict) + else headers ) return { **body, @@ -1167,7 +1169,7 @@ def test_post_call_generic_guardrail_inputs_unchanged(gateway: Gateway, tmp_path "content-length": "", "content-type": "application/json", "host": "", - "user-agent": "python-httpx/0.28.1", + "user-agent": "", }, "structured_messages": None, "texts": [response_text],