From 39705c8edb97b38b4622f10992c5b8743862ed1f Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 3 Sep 2026 03:35:49 -0700 Subject: [PATCH] test(anthropic_messages): configure the bridged streaming test transport through the env var only The documented DISABLE_AIOHTTP_TRANSPORT env var already selects the httpx transport, so the extra module-global write was redundant. Types the monkeypatch fixture while here. --- .../responses_adapters/test_responses_adapters_handler.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_handler.py b/tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_handler.py index b350ae3dacb..3383813245a 100644 --- a/tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_handler.py +++ b/tests/test_litellm/llms/anthropic/experimental_pass_through/responses_adapters/test_responses_adapters_handler.py @@ -100,7 +100,7 @@ async def test_streaming_message_start_reports_the_provider_local_model(requeste @pytest.mark.asyncio async def test_streaming_hands_the_logging_object_the_message_id_the_caller_is_streamed( - respx_mock: respx.MockRouter, monkeypatch + respx_mock: respx.MockRouter, monkeypatch: pytest.MonkeyPatch ): """ The bridge mints the ``msg_`` id itself, and it is the only request id a streaming @@ -110,7 +110,6 @@ async def test_streaming_hands_the_logging_object_the_message_id_the_caller_is_s monkeypatch.setenv("OPENAI_API_KEY", "sk-lit6825-test") monkeypatch.setenv("DISABLE_AIOHTTP_TRANSPORT", "True") - monkeypatch.setattr(litellm, "disable_aiohttp_transport", True) litellm.in_memory_llm_clients_cache.flush_cache() respx_mock.post("https://api.openai.com/v1/responses").respond( status_code=200,