mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-07 05:07:46 +00:00
7d5cb8ebb2
Fixes #16805 When using Gemini models (2.5/3.0) with streaming + tools enabled, the reasoning_content field was missing from stream chunks, even though thinking_blocks were present in non-streaming responses. Changes: - Convert thinking_blocks to reasoning_content for streaming responses - Extract "thinking" field from each thinking_block - Concatenate multiple thinking parts with newlines - Assign to reasoning_content in chat_completion_message for streaming Testing: - Added test_streaming_chunk_with_tool_calls_includes_reasoning_content - Test verifies reasoning_content appears with tool calls in streaming - All 39 existing Gemini tests pass
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.