Repository navigation
Conversation
added 7 commits
November 20, 2026 18:21
… stream delta assert_sse_stream_strict now fails when one delta carries both non-empty reasoning_content and tool_calls. 02_12 gains a tool_after_reasoning scenario (reasoning_effort=high) that crosses the reasoning-to-tool-call boundary.
… 10-run case 02_25 Follow the 02_07 loop shape: send the request 10 times and fail on the first violating run. 02_12 keeps its original scenarios.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
TestSSEStream::test_02_25_reasoning_content_and_tool_calls_not_coexist_in_chunkto the M3.1-Flash stream suite: a stream delta that carriestool_callsmust not carryreasoning_content.The M3 stream emits reasoning and the assistant turn in separate phases (see 02_07 for
content). A delta that mixes the tail of the reasoning with a tool-call fragment breaks clients that handle one field per delta (for exampleif reasoning_content ... elif tool_calls ...): either the reasoning text or the tool-call fragment is dropped, and a dropped first fragment loses the call'sidandname. It can also deliver reasoning after the tool call has started.Case design
reasoning_effort=highwith theechotool and a prompt that asks for reasoning followed directly by the tool call with no text around it, so the stream crosses the reasoning-to-tool-call boundary.Assertions
tool_callstogether withreasoning_content; the field must be absent or null, and an empty string counts as present (clients that branch on the field's presence would otherwise take the reasoning path and drop the tool-call fragment).trace_idand the offending deltas.Docs
docs/m3_stream_cases.mdanddocs/m3_stream_cases_en.mdgain the 02_25 row and mention it in theTestSSEStreamscope.