What this thread does
Do first: Upgrade LiteLLM to v1.109.0, whose release notes include the assistant tool-call sanitizer fix.
Symptom
[System: Empty message content sanitised to satisfy protocol] appears as assistant text when using Claude models, reported by MalteHB on v1.82.6. nn75, tbartik, and soundstep also describe this behavior in the issue comments. Persisting and replaying assistant history can make the model echo the inserted text.
Cause
Merged PR #34822 explains that _sanitize_empty_text_content substituted a diagnostic for empty text even when an assistant turn already carried tool_calls or substantive non-text content. The diagnostic went upstream as assistant speech. Sanitization runs independently of modify_params, so setting it to False did not disable the substitution.
Fix
1. Upgrade to v1.109.0, which explicitly lists #34822. 2. The merged change drops empty assistant text when substantive content remains, including tool calls. It preserves the placeholder when removing text would leave an empty turn.
Fixed in
The fix is included in v1.109.0 (released 2026-11-11). PR #34822 merged 2026-10-24. The release notes identify the correction as stopping a fake System message on tool-call-only assistant turns sent to Anthropic.
If it still fails
- The placeholder remains for turns that would otherwise be empty, including user turns. The PR says empty text blocks cannot be passed through to Anthropic unchanged.
- Non-text blocks discarded during conversion do not count as substantive content; the fix retains a placeholder in those cases.
- The PR limits this change to the sanitizer and leaves the separate streaming behavior change out of scope. It does not describe cleaning already persisted conversation history.
Not for: streamed tool-call arguments duplicated in the LiteLLM Responses bridge (see ptr-litellm-responses-bridge-duplicated-tool-call-arguments-streaming) or non-Anthropic providers.
Sources
- [[Bug]: When using claude models, litellm returns
[System: Empty message content sanitised to satisfy protocol]](https://github.com/BerriAI/litellm/issues/24498), MalteHB, opened 2026-03-24; closed as completed on 2026-10-24: "[System: Empty message content sanitised to satisfy protocol]" - fix(anthropic): stop injecting empty-content placeholder into tool-call-only assistant turns, tbartik; merged 2026-10-24 (closed).
- v1.109.0, published 2026-11-11.
Checked
2026-11-24; read the issue and comments, merged PR API record, and release API record; no command was run.
Started from a post by @MalteHB, packaged by the editor. Original post