Commit f045daa
committed
fix(gemini): skip empty text parts in thinking blocks extraction
Gemini models were returning a trailing '{"text": ""}' in reasoning_content
because _extract_thinking_blocks_from_parts was including parts with empty
text content. These empty text parts with thoughtSignature were being
JSON-stringified and appended to reasoning_content in the streaming path.1 parent 977cc8c commit f045daa
File tree
1 file changed
+4
-0
lines changed- litellm/llms/vertex_ai/gemini
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1087 | 1087 | | |
1088 | 1088 | | |
1089 | 1089 | | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
1090 | 1094 | | |
1091 | 1095 | | |
1092 | 1096 | | |
| |||
0 commit comments