File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4069,7 +4069,6 @@ async def flush_pending_delta_data(threshold: int = 0):
40694069
40704070 processed_data = {
40714071 'output' : full_output (),
4072- 'content' : serialize_output (full_output ()),
40734072 }
40744073
40754074 # print(data)
@@ -4235,7 +4234,7 @@ async def flush_pending_delta_data(threshold: int = 0):
42354234 {
42364235 'type' : 'chat:completion' ,
42374236 'data' : {
4238- 'content ' : serialize_output ( full_output () + pending_fc_items ) ,
4237+ 'output ' : full_output () + pending_fc_items ,
42394238 },
42404239 }
42414240 )
@@ -4313,7 +4312,7 @@ async def flush_pending_delta_data(threshold: int = 0):
43134312 _pending_reasoning_details .extend (items )
43144313
43154314 if reasoning_content or reasoning_details_chunk :
4316- data = {'content ' : serialize_output ( full_output () )}
4315+ data = {'output ' : full_output ()}
43174316
43184317 if value :
43194318 if (
@@ -4470,7 +4469,7 @@ async def flush_pending_delta_data(threshold: int = 0):
44704469 )
44714470 else :
44724471 data = {
4473- 'content ' : serialize_output ( full_output () ),
4472+ 'output ' : full_output (),
44744473 }
44754474
44764475 if delta :
Original file line number Diff line number Diff line change 18131813 message .sources = sources ;
18141814 }
18151815
1816- if (choices ) {
1816+ // Only accumulate content from choices when there's no structured output
1817+ // (output-based rendering takes priority — avoids redundant serialize/parse round-trip)
1818+ if (choices && ! output ) {
18171819 if (choices [0 ]?.message ?.content ) {
18181820 // Non-stream response
18191821 message .content += choices [0 ]?.message ?.content ;
You can’t perform that action at this time.
0 commit comments