* better handling of too many images in chat
* address review: handle no-user-message fallback, assert filter output, cover tool-role images
* factor filterHistoryImages into a pure helper with direct tests
* restore validateAndFilterImages delegate so existing tests are unchanged
* address comments, throw early