fix(critical): chatbot detection was checking filtered content
**The Bug:**
Chatbot detection was running AFTER safeguards filtered code blocks from content.
By the time _contains_unexecuted_code() ran, the code blocks were already gone,
so detection always failed!
**The Fix:**
Check response_content (original) instead of content (filtered).
Now detects numbered steps, code blocks, and tutorial patterns correctly.
**Why This Matters:**
Without this fix, even large models like Mixtral would slip into chatbot mode
and never get corrected because the detection was blind.
**Added:**
- Debug logging to trace detection decisions
- Check original content before filtering
- Visibility into what content is being evaluated
Chatbot detection was running AFTER safeguards filtered code blocks from content.
By the time _contains_unexecuted_code() ran, the code blocks were already gone,
so detection always failed!
**The Fix:**
Check response_content (original) instead of content (filtered).
Now detects numbered steps, code blocks, and tutorial patterns correctly.
**Why This Matters:**
Without this fix, even large models like Mixtral would slip into chatbot mode
and never get corrected because the detection was blind.
**Added:**
- Debug logging to trace detection decisions
- Check original content before filtering
- Visibility into what content is being evaluated
- SHA
a953bb4ab3b8d865dcf1df1376f1c8a986e92c1e- Parents
-
a97c3af - Tree
a22af7c