PR #3566 intentionally routes suppressed content to stream_delta_callback when tool calls are present, so reasoning tag extraction can fire during streaming. The test was still asserting the old behavior where content after tool calls was fully suppressed from the callback. Updated the assertion to match: content IS delivered to the callback (for tag extraction), with display-level suppression handled by the CLI's _stream_delta.
This commit is contained in:
@@ -362,9 +362,11 @@ class TestStreamingCallbacks:
|
|||||||
|
|
||||||
# Text before tool call IS fired (we don't know yet it will have tools)
|
# Text before tool call IS fired (we don't know yet it will have tools)
|
||||||
assert "thinking..." in deltas
|
assert "thinking..." in deltas
|
||||||
# Text after tool call is NOT fired
|
# Text after tool call IS still routed to stream_delta_callback so that
|
||||||
assert " more text" not in deltas
|
# reasoning tag extraction can fire (PR #3566). Display-level suppression
|
||||||
# But content is still accumulated in the response
|
# of non-reasoning text happens in the CLI's _stream_delta, not here.
|
||||||
|
assert " more text" in deltas
|
||||||
|
# Content is still accumulated in the response
|
||||||
assert response.choices[0].message.content == "thinking... more text"
|
assert response.choices[0].message.content == "thinking... more text"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user