From 71a18ff2ff8c4cffc6032c8aadc62575d3c1ba6c Mon Sep 17 00:00:00 2001 From: cthomas Date: Tue, 25 Mar 2025 09:41:45 -0700 Subject: [PATCH] fix: anthropic empty response check (#1397) --- letta/llm_api/anthropic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/letta/llm_api/anthropic.py b/letta/llm_api/anthropic.py index fd8d1195..50f789ad 100644 --- a/letta/llm_api/anthropic.py +++ b/letta/llm_api/anthropic.py @@ -352,7 +352,7 @@ def convert_anthropic_response_to_chatcompletion( redacted_reasoning_content = None tool_calls = None - if len(response.content) > 1: + if len(response.content) > 0: for content_part in response.content: if content_part.type == "text": content = strip_xml_tags(string=content_part.text, tag=inner_thoughts_xml_tag)