From 4931bac3dac87bde032447c55074cd340a5fb78b Mon Sep 17 00:00:00 2001 From: Sameer Kankute Date: Thu, 12 Feb 2026 21:16:33 +0530 Subject: [PATCH] =?UTF-8?q?Revert=20"Fix=20#20557:=20Fix=20Gemini=20multi-?= =?UTF-8?q?turn=20tool=20calling=20message=20formatting=20(#2=E2=80=A6"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 49078b3c6b854c5428b2dfd8e1aa4eba5d554cde. --- litellm/llms/vertex_ai/gemini/transformation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/llms/vertex_ai/gemini/transformation.py b/litellm/llms/vertex_ai/gemini/transformation.py index e595d8e6164..00b461dcda0 100644 --- a/litellm/llms/vertex_ai/gemini/transformation.py +++ b/litellm/llms/vertex_ai/gemini/transformation.py @@ -500,7 +500,7 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915 messages[msg_i]["role"] not in tool_call_message_roles ): if len(tool_call_responses) > 0: - contents.append(ContentType(role="user", parts=tool_call_responses)) + contents.append(ContentType(parts=tool_call_responses)) tool_call_responses = [] if msg_i == init_msg_i: # prevent infinite loops @@ -510,7 +510,7 @@ def _gemini_convert_messages_with_history( # noqa: PLR0915 ) ) if len(tool_call_responses) > 0: - contents.append(ContentType(role="user", parts=tool_call_responses)) + contents.append(ContentType(parts=tool_call_responses)) if len(contents) == 0: verbose_logger.warning(