From 7057dce156bb24abeb722276e4382aff4f7d078a Mon Sep 17 00:00:00 2001 From: Ari Webb Date: Tue, 21 Oct 2025 15:35:35 -0700 Subject: [PATCH] feat: add support for reasoning for Claude Haiku 4.5 [LET-5735] (#5585) frontend and backend changes Co-authored-by: Ari Webb --- letta/llm_api/anthropic_client.py | 1 + letta/schemas/llm_config.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/letta/llm_api/anthropic_client.py b/letta/llm_api/anthropic_client.py index 6d920b5d..322c6a5a 100644 --- a/letta/llm_api/anthropic_client.py +++ b/letta/llm_api/anthropic_client.py @@ -439,6 +439,7 @@ class AnthropicClient(LLMClientBase): llm_config.model.startswith("claude-3-7-sonnet") or llm_config.model.startswith("claude-sonnet-4") or llm_config.model.startswith("claude-opus-4") + or llm_config.model.startswith("claude-haiku-4-5") ) @trace_method diff --git a/letta/schemas/llm_config.py b/letta/schemas/llm_config.py index bebfb950..2c2f4503 100644 --- a/letta/schemas/llm_config.py +++ b/letta/schemas/llm_config.py @@ -154,7 +154,10 @@ class LLMConfig(BaseModel): values["put_inner_thoughts_in_kwargs"] = False if values.get("model_endpoint_type") == "anthropic" and ( - model.startswith("claude-3-7-sonnet") or model.startswith("claude-sonnet-4") or model.startswith("claude-opus-4") + model.startswith("claude-3-7-sonnet") + or model.startswith("claude-sonnet-4") + or model.startswith("claude-opus-4") + or model.startswith("claude-haiku-4-5") ): values["put_inner_thoughts_in_kwargs"] = False @@ -242,7 +245,7 @@ class LLMConfig(BaseModel): config.model.startswith("claude-opus-4") or config.model.startswith("claude-sonnet-4") or config.model.startswith("claude-3-7-sonnet") - or config.model.startswith("claude-4-5-haiku") + or config.model.startswith("claude-haiku-4-5") ) @classmethod