Skip to content

Commit d361777

Browse files
committed
fix(server): keep done/finish_reason on combined tool_call+done SSE chunk
The streaming SSE consumer short-circuited with after emitting a tool_call delta, so a publisher that carries done + finish_reason in the same chunk as its final tool_call delta had them silently dropped: finish_reason came out as "stop" and auto-resolve mode never fired the capability. Fall through to the done check instead, matching the separate-chunk path.
1 parent c0258b7 commit d361777

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

zhub/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,9 @@ async def event_stream():
17601760
"finish_reason": None}],
17611761
}
17621762
yield f"data: {json.dumps(sse)}\n\n"
1763-
continue
1763+
# fall through: a publisher may carry done/finish_reason
1764+
# in the same chunk as its final tool_call delta, so the
1765+
# done check below must still run.
17641766
if text:
17651767
sse = {
17661768
"id": completion_id,

0 commit comments

Comments
 (0)