From c603680d2a97bb4b5132638cba28552784b91c39 Mon Sep 17 00:00:00 2001 From: Krish Dholakia Date: Wed, 16 Apr 2025 10:11:47 -0700 Subject: [PATCH] fix(stream_chunk_builder_utils.py): don't set index on modelresponse (#10063) * fix(stream_chunk_builder_utils.py): don't set index on modelresponse * test: update tests --- litellm/litellm_core_utils/streaming_chunk_builder_utils.py | 1 - .../litellm_core_utils/test_streaming_chunk_builder_utils.py | 3 --- 2 files changed, 4 deletions(-) diff --git a/litellm/litellm_core_utils/streaming_chunk_builder_utils.py b/litellm/litellm_core_utils/streaming_chunk_builder_utils.py index 024324a697..198b71cad3 100644 --- a/litellm/litellm_core_utils/streaming_chunk_builder_utils.py +++ b/litellm/litellm_core_utils/streaming_chunk_builder_utils.py @@ -161,7 +161,6 @@ class ChunkProcessor: name=tool_call_data["name"], ), type=tool_call_data["type"] or "function", - index=index, ) ) diff --git a/tests/litellm/litellm_core_utils/test_streaming_chunk_builder_utils.py b/tests/litellm/litellm_core_utils/test_streaming_chunk_builder_utils.py index 97300fadd8..2c4d4364b8 100644 --- a/tests/litellm/litellm_core_utils/test_streaming_chunk_builder_utils.py +++ b/tests/litellm/litellm_core_utils/test_streaming_chunk_builder_utils.py @@ -135,7 +135,6 @@ def test_get_combined_tool_content(): name="get_current_weather", ), type="function", - index=0, ), ChatCompletionMessageToolCall( id="call_rrns", @@ -144,7 +143,6 @@ def test_get_combined_tool_content(): name="get_current_weather", ), type="function", - index=1, ), ChatCompletionMessageToolCall( id="call_0k29", @@ -153,6 +151,5 @@ def test_get_combined_tool_content(): name="get_current_weather", ), type="function", - index=2, ), ]