Protect fenced and inline Markdown examples while stripping real closed, mixed-spelling, and interrupted reasoning blocks; add regressions for literal tags and code inside reasoning.
A response part shaped {"text": None} was stringified, so a provider that
streams an empty text field injected the literal word "None" into the reply,
or "Nonehi" when a real part followed it.
Parts whose text is null now contribute nothing. A part with no text key
already behaved that way; this makes an explicit null match it. Empty strings
and numeric content are unchanged.
Two inputs lost text that should have been shown:
- a reply that names the tag in prose ("Use <think> to start a reasoning
block.") matched the unterminated-block rule, which deletes from the tag to
the end of the text, so only the words before it survived;
- a block opened with one spelling and closed with the other
("<think>...</thinking>") matched neither pattern, fell through to the same
rule, and took the answer after the closing tag with it.
The unterminated rule now applies only to a tag that starts a line, which is
what a truncated scratchpad actually looks like, and either spelling closes a
block. A closed block still disappears; a mid-sentence mention now survives.
Stability release after v1.3.0 covering safer RAG/KB routing, stronger
embedding validation, more reliable Docker/TutorBot restarts, Web UX
fixes, and Windows/encoding hardening. See assets/releases/ver1-3-1.md
for the full notes.
Made-with: Cursor