Files
DeepTutor/tests
Antonio-Faure 88f649283c fix(mastery): keep an unchanged lesson packet in place so requests stay cacheable
prepare_model_request removed and re-appended the lesson packet (and its
original-page images) at the end of every model request. Each tool round
therefore moved ~3.3K tokens of packet and pages behind the new tool
results, and the next turn removed the stored packet from history, so no
request was a prefix extension of the previous one and every round re-paid
the packet and everything after it.

Deliver the packet like a runtime snapshot: an unchanged packet stays at
the position where it was first sent (within the turn and in replayed
history), and only a changed packet replaces it. The page images are
projected right after the packet instead of at the end of the request.

Refs #3186
2026-12-02 17:38:54 +08:00
..
2026-11-06 01:56:39 +08:00