@@ -879,7 +879,6 @@ async def execute_stream(
879879 ]
880880
881881 # Stream the LLM response
882- full_response = ""
883882 try :
884883 async for chunk in llm .stream (
885884 messages = messages ,
@@ -889,7 +888,6 @@ async def execute_stream(
889888 temperature = 0.3 ,
890889 stage = "basic.answer" ,
891890 ):
892- full_response += chunk
893891 yield StreamEvent .content (chunk )
894892 except Exception as e :
895893 logger .error ("basic_streaming_error" , error = str (e ))
@@ -903,28 +901,12 @@ async def execute_stream(
903901 preamble = scope .scope_note ,
904902 )
905903 yield StreamEvent .content (answer )
906- full_response = answer
907904
908- # Defense-in-depth copyright filter on the full streamed
909- # response. For action="log" we just emit a warning log; for
910- # quote/strip/rewrite we emit a "revision" event after the
911- # answer with the corrected text — clients may render it or
912- # ignore. Does not retract the already-streamed content.
913- try :
914- revised = await _apply_copyright_filter (
915- answer = full_response , paper_results = paper_results , llm = llm ,
916- config = self .config ,
917- )
918- if revised != full_response :
919- yield StreamEvent (
920- event = "revision" ,
921- data = json .dumps ({
922- "kind" : "copyright_filter" ,
923- "revised_content" : revised ,
924- }),
925- )
926- except Exception as exc :
927- logger .warning ("copyright_filter_stream_failed" , error = str (exc ))
905+ # The synchronous copyright-detection pass is intentionally NOT run on
906+ # the streaming (GUI) path. The body has already streamed to the client
907+ # and the client ignores the "revision" event, so it only added a
908+ # visible mid-stream stall before the references with no user-facing
909+ # effect. The non-streaming execute() path still runs it for compliance.
928910
929911 # Append references section after streaming completes
930912 if sources :
0 commit comments