Pull requests / #886

#886 serve: skip completed empty assistant turns in chat history

closed · @Arthur031221 · 0 comments · View on GitHub

Server & APISecurity

Description

Clients that resend empty assistant replies can get completed turns with no answer or tool call in their next prompt. This skips those turns before rendering and keeps the final message, tool calls, and images.

Based on @jramirez-uab's patch in [#843](https://github.com/Niko1221/Strata/issues/843). Added a regression that checks rendered history through the server's prompt tokenization.

Tested with `.venv/bin/python -m unittest serve.test_frontend -q`.

Fixes #843

Co-authored-by: jramirez-uab <[email protected]>

Related on strata.com

Editorial links to help you install, pick models, or read release notes — not part of the upstream thread.