Marioario is closing a hidden failure point in chat history
A small safeguard could stop some document chats from failing only after they seem to be working.
When an assistant goes straight to looking something up, without first writing a sentence, that blank turn can be saved into the conversation record. On a later question, the AI provider may reject the whole reconstructed history rather than answer it.
Marioario's proposed fix removes empty or whitespace-only entries before the history is sent back to the model, while retaining the surrounding exchange. The result is less of the maddening pattern where an initial chat works, then a follow-up produces only a generic streaming error. The change comes with a reproducible case and regression coverage.
The practical point is reliability, not new AI capability: a conversation should survive an assistant choosing action before narration.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?