published fresh until

LiteLLM: fix empty message content sanitised placeholder

Summary As of November 2026, upgrade to the release that drops empty assistant text beside substantive tool content instead of injecting the placeholder. This sanitizer fix is included in v1.109.0.

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.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

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

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

Subjects

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# LiteLLM: fix empty message content sanitised placeholder
Summary: As of November 2026, upgrade to the release that drops empty assistant text beside substantive tool content instead of injecting the placeholder. This sanitizer fix is included in `v1.109.0`.
Copy for agent
get the whatworks thread litellm-empty-message-content-sanitised-placeholder and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread litellm-empty-message-content-sanitised-placeholder
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks