From 4982a1e111f5eb262c15c58d9f8a76975ae68973 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Mon, 28 Sep 2026 21:15:27 -0700 Subject: [PATCH] chore(test): keep the backported Vertex safeguards test within the line's test-quality budget Adds a test-quality-ok marker on the one patch.object the picked Vertex test needs, since the GCP token exchange runs before the faked HTTP boundary. Test-only, no runtime change. --- ...st_anthropic_experimental_pass_through_messages_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py b/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py index d92236ba264..7f21b025ed7 100644 --- a/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py +++ b/tests/test_litellm/llms/anthropic/experimental_pass_through/messages/test_anthropic_experimental_pass_through_messages_handler.py @@ -1627,7 +1627,9 @@ async def test_anthropic_messages_forwards_safeguards_and_dangerous_tool_use_bet safeguards, safeguard_results = _claude_code_auto_mode_request() captured: dict[str, object] = {} - with patch.object(VertexBase, "_ensure_access_token", return_value=("test-token", "test-project")): + with patch.object( # test-quality-ok: the GCP token exchange runs before the faked HTTP boundary + VertexBase, "_ensure_access_token", return_value=("test-token", "test-project") + ): response = await handler.anthropic_messages( max_tokens=16, messages=[{"role": "user", "content": "hi"}],