mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-04 20:39:45 +08:00
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