We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 977cc8c + f045daa commit ca5add3Copy full SHA for ca5add3
litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py
@@ -1087,6 +1087,10 @@ def _extract_thinking_blocks_from_parts(
1087
thinking_blocks: List[ChatCompletionThinkingBlock] = []
1088
for part in parts:
1089
if "thoughtSignature" in part:
1090
+ # Skip parts with empty text content to avoid adding '{"text": ""}' to reasoning_content
1091
+ text_content = part.get("text", "")
1092
+ if not text_content:
1093
+ continue
1094
part_copy = part.copy()
1095
part_copy.pop("thoughtSignature")
1096
thinking_blocks.append(
0 commit comments