Skip to content

Commit 618de89

Browse files
authored
Update google genai streaming test (#2630)
1 parent d9e0aba commit 618de89

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

integrations/google_genai/tests/test_chat_generator.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,17 +1300,14 @@ def test_aggregate_streaming_chunks_with_reasoning(monkeypatch):
13001300
chunk1.tool_calls = []
13011301
chunk1.meta = {"usage": {"prompt_tokens": 10, "completion_tokens": 5}}
13021302
chunk1.component_info = component_info
1303+
chunk1.reasoning = None
13031304

13041305
chunk2 = Mock()
13051306
chunk2.content = " world"
13061307
chunk2.tool_calls = []
13071308
chunk2.meta = {"usage": {"prompt_tokens": 10, "completion_tokens": 8}}
13081309
chunk2.component_info = component_info
1309-
1310-
# Mock the reasoning content that would be extracted
1311-
mock_reasoning = Mock()
1312-
mock_reasoning.reasoning_text = "I should greet the user politely"
1313-
mock_reasoning.reasoning_type = "REASONING_TYPE_UNSPECIFIED"
1310+
chunk2.reasoning = None
13141311

13151312
# Mock the final chunk with reasoning
13161313
final_chunk = Mock()
@@ -1321,6 +1318,7 @@ def test_aggregate_streaming_chunks_with_reasoning(monkeypatch):
13211318
"model": "gemini-2.5-pro",
13221319
}
13231320
final_chunk.component_info = component_info
1321+
final_chunk.reasoning = ReasoningContent(reasoning_text="I should greet the user politely")
13241322

13251323
# Add reasoning deltas to the final chunk meta (this is how the real method works)
13261324
final_chunk.meta["reasoning_deltas"] = [{"type": "reasoning", "content": "I should greet the user politely"}]

0 commit comments

Comments
 (0)