Slightly off-topic, but I'm curious if you've compared storing the chat history as a sequence of alternating User and Assistant Messages (the natural/expected form) vs just putting everything into a single User Message so the prompt is always just 1 System and 1 User Message.
Chat History Storage: Alternating vs Single Message Architecture
By
–