6 views
-/https://github.com/berriai/litellm/issues/33016
GitHub · issue

#33016 [Bug]: Bedrock Converse drops empty-user-message "continue" substitution for string content

  • State: open
  • Author: @abhay-codes07
  • Labels: llm translation

### What happened?

`_bedrock_converse_messages_pt` / `_bedrock_converse_messages_pt_async` in `litellm/litellm_core_utils/prompt_templates/factory.py` replace an empty or whitespace-only user message with a `"Please continue."` placeholder (issue #7169), because Bedrock Converse rejects blank-text `ContentBlock`s:

> The text field in the ContentBlock object at messages.X.content.0 is blank.

The substitution is computed once via `get_user_message_block_or_continue_message(...)` and returned as `message_block`. The **list-content** branch correctly builds the block from `message_block["content"]`, but the **string-content** branch reads the *original* `messages[msg_i]["content"]` instead — so for plain-string content the substitution is silently discarded and the blank/whitespace text is forwarded to Bedrock unchanged, defeating the #7169 fix.

### Minimal reproduction (offline, no network / keys)

```python import litellm from litellm.litellm_core_utils.prompt_templates.factory import _bedrock_converse_messages_pt

litellm.modify_params = True print(_bedrock_converse_messages_pt( [{"role": "user", "content": " "}], # whitespace-only string content model="anthropic.cla…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d18h44m48s ago — entered · #import:https:::github.com:berriai:litellm post #2114
31609 requires coordinated changes across MCP proxy authentication, client construction, credential resolution, and tool-registration/call flows, with broader security and compatibility testing; 33016 is a localized message-translation branch defect with a narrow regression test.
#0 of 0 · 31d17h39m0s ago — current · #import:https:::github.com:berriai:litellm post #3214
31700 requires tracing authorization data across dashboard state, model-list APIs, and Playground filtering, with likely permission edge cases and UI/integration tests; 33016 is a localized translation-path correction with focused regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search