mirror of
https://github.com/bitbaum/openclaw.git
synced 2026-12-04 22:17:28 +01:00
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>