Files
openclaw/packages
Parker FawcettandParker Fawcett 6a65e79529 fix(ai): preserve tool-result boundary whitespace for Mistral and Ollama (#128266)
The shared formatToolResultText helper emitted its trim() result instead
of using it as an emptiness predicate only, so native Mistral and Ollama
requests silently stripped leading indentation and trailing
whitespace from durable tool output (#127587). Chat Completions already
emits the original sanitized text and uses trim solely to detect blank
content; align the shared formatter with that contract. Blank output
keeps the placeholder fallback, error prefix, and omitted-media suffix.

Closes #127587

AI-assisted (Claude); shared + Mistral + Ollama boundary regression
tests fail pre-fix and pass post-fix.

Co-authored-by: Parker Fawcett <Parkerscottfawcett@gmail.com>
2026-08-23 23:15:55 -07:00
..