From f5ec303e4167e2783fe2dd27e6d6af53fd651788 Mon Sep 17 00:00:00 2001 From: liracle Date: Sat, 29 Aug 2026 15:35:38 +0800 Subject: [PATCH] test(responses): give the deferred-item tests their own tool call ids call_1 is cached in TOOL_CALLS_CACHE by unrelated tests, and that cache is module-level state no per-test fixture clears under xdist. The ids here are never asserted on, so move them off the shared value. --- .../test_streaming_event_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_litellm/responses/litellm_completion_transformation/test_streaming_event_order.py b/tests/test_litellm/responses/litellm_completion_transformation/test_streaming_event_order.py index c619ef61fa2..036f8bdb504 100644 --- a/tests/test_litellm/responses/litellm_completion_transformation/test_streaming_event_order.py +++ b/tests/test_litellm/responses/litellm_completion_transformation/test_streaming_event_order.py @@ -195,7 +195,7 @@ async def test_tool_call_only_stream_skips_ghost_message_done(): _chunk( tool_calls=[ { - "id": "call_1", + "id": "call_deferred_message", "type": "function", "function": {"name": "do_thing", "arguments": '{"x":1}'}, "index": 0, @@ -241,7 +241,7 @@ async def test_reasoning_after_tool_call_still_gets_item_declaration(): _chunk( tool_calls=[ { - "id": "call_1", + "id": "call_late_reasoning", "type": "function", "function": {"name": "do_thing", "arguments": "{}"}, "index": 0,