diff --git a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py index d3e24cdd11d..df57d8b8521 100644 --- a/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py +++ b/litellm/llms/anthropic/experimental_pass_through/adapters/transformation.py @@ -635,6 +635,9 @@ class LiteLLMAnthropicMessagesAdapter: ) ): assistant_message["thinking_blocks"] = thinking_blocks + elif len(thinking_blocks) == 0: + # Preserve the existing response shape for ordinary assistant turns. + assistant_message["thinking_blocks"] = None reasoning_content = reasoning_content_from_thinking_blocks(thinking_blocks) if reasoning_content: assistant_message["reasoning_content"] = reasoning_content