fix(core): patch default reasoning for letta-free on letta v1 (#4953)

* fix(core): patch default reasoning for letta-free on letta v1

* fix: patch (unrelated?) bug w/ missing required for empty tools like reset_research
This commit is contained in:
Charles Packer
2025-09-25 21:57:35 -07:00
committed by Caren Thomas
parent 79b1287c06
commit 9fd901c3a5
2 changed files with 15 additions and 11 deletions

View File

@@ -294,7 +294,8 @@ class AnthropicClient(LLMClientBase):
if "tools" in data:
for tool in data["tools"]:
tool["input_schema"]["properties"].pop(REQUEST_HEARTBEAT_PARAM, None)
if REQUEST_HEARTBEAT_PARAM in tool["input_schema"]["required"]:
if "required" in tool["input_schema"] and REQUEST_HEARTBEAT_PARAM in tool["input_schema"]["required"]:
# NOTE: required is not always present
tool["input_schema"]["required"].remove(REQUEST_HEARTBEAT_PARAM)
else: