Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: update Anthropic Haiku test model after 3.5 retirement (#9569)

jnjpngf10440b49c88
diff --git a/letta/schemas/llm_config_overrides.py b/letta/schemas/llm_config_overrides.py
index 407c73a29..6978938df 100644
--- a/letta/schemas/llm_config_overrides.py
+++ b/letta/schemas/llm_config_overrides.py
@@ -3,6 +3,7 @@ from typing import Dict
LLM_HANDLE_OVERRIDES: Dict[str, Dict[str, str]] = {
"anthropic": {
"claude-3-5-haiku-20241022": "claude-3-5-haiku",
+ "claude-haiku-4-5-20251001": "claude-haiku-4-5",
"claude-3-5-sonnet-20241022": "claude-3-5-sonnet",
"claude-3-opus-20240229": "claude-3-opus",
},
diff --git a/tests/configs/llm_model_configs/claude-3-5-haiku.json b/tests/configs/llm_model_configs/claude-3-5-haiku.json
index 89f4e0c50..bdda9f62d 100644
--- a/tests/configs/llm_model_configs/claude-3-5-haiku.json
+++ b/tests/configs/llm_model_configs/claude-3-5-haiku.json
@@ -1,6 +1,6 @@
{
"context_window": 200000,
- "model": "claude-3-5-haiku-20241022",
+ "model": "claude-haiku-4-5-20251001",
"model_endpoint_type": "anthropic",
"model_endpoint": "https://api.anthropic.com/v1",
"model_wrapper": null,
diff --git a/tests/integration_test_clickhouse_llm_traces.py b/tests/integration_test_clickhouse_llm_traces.py
index f928c0980..7d41a26c2 100644
--- a/tests/integration_test_clickhouse_llm_traces.py
+++ b/tests/integration_test_clickhouse_llm_traces.py
@@ -48,7 +48,7 @@ def _require_clickhouse_env() -> dict[str, str]:
def _anthropic_llm_config() -> LLMConfig:
return LLMConfig(
- model="claude-3-5-haiku-20241022",
+ model="claude-haiku-4-5-20251001",
model_endpoint_type="anthropic",
model_endpoint="https://api.anthropic.com/v1",
context_window=200000,
diff --git a/tests/manual_test_many_messages.py b/tests/manual_test_many_messages.py
index bafeb3b4f..3594f9231 100644
--- a/tests/manual_test_many_messages.py
+++ b/tests/manual_test_many_messages.py
@@ -94,7 +94,7 @@ def create_send_message(agent_id, organization_id, assistant_text, tool_call_id,
"content": [{"type": "text", "text": f"Assistant reply generated at {timestamp.strftime('%Y-%m-%d %I:%M:%S %p PST-0800')}."}],
"organization_id": organization_id,
"agent_id": agent_id,
- "model": "claude-3-5-haiku-20241022",
+ "model": "claude-haiku-4-5-20251001",
"name": None,
"tool_calls": [
{
@@ -126,7 +126,7 @@ def create_tool_message(agent_id, organization_id, tool_call_id, timestamp):
],
"organization_id": organization_id,
"agent_id": agent_id,
- "model": "claude-3-5-haiku-20241022",
+ "model": "claude-haiku-4-5-20251001",
"name": "send_message",
"tool_calls": None,
"tool_call_id": tool_call_id,
diff --git a/tests/test_client.py b/tests/test_client.py
index 61c4faa52..b50165a4b 100644
--- a/tests/test_client.py
+++ b/tests/test_client.py
@@ -168,7 +168,7 @@ def agent(client: Letta):
agent_state = client.agents.create(
name="test_client",
memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
@@ -184,7 +184,7 @@ def search_agent_one(client: Letta):
agent_state = client.agents.create(
name="Search Agent One",
memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
@@ -200,7 +200,7 @@ def search_agent_two(client: Letta):
agent_state = client.agents.create(
name="Search Agent Two",
memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
@@ -237,7 +237,7 @@ def test_add_and_manage_tags_for_agent(client: Letta):
# Step 0: create an agent with no tags
agent = client.agents.create(
memory_blocks=[],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
assert len(agent.tags) == 0
@@ -281,21 +281,21 @@ def test_agent_tags(client: Letta, clear_tables):
agent1 = client.agents.create(
name=f"test_agent_{str(uuid.uuid4())}",
tags=["test", "agent1", "production"],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
agent2 = client.agents.create(
name=f"test_agent_{str(uuid.uuid4())}",
tags=["test", "agent2", "development"],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
agent3 = client.agents.create(
name=f"test_agent_{str(uuid.uuid4())}",
tags=["test", "agent3", "production"],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
@@ -348,14 +348,14 @@ def test_shared_blocks(disable_e2b_api_key, client: Letta):
name="agent1",
memory_blocks=[{"label": "persona", "value": "you are agent 1"}],
block_ids=[block.id],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
agent_state2 = client.agents.create(
name="agent2",
memory_blocks=[{"label": "persona", "value": "you are agent 2"}],
block_ids=[block.id],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
@@ -374,7 +374,7 @@ def test_update_agent_memory_label(client: Letta):
"""Test that we can update the label of a block in an agent's memory"""
agent = client.agents.create(
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
memory_blocks=[{"label": "human", "value": ""}],
)
@@ -426,7 +426,7 @@ def test_update_agent_memory_limit(client: Letta):
"""Test that we can update the limit of a block in an agent's memory"""
agent = client.agents.create(
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
memory_blocks=[
{"label": "human", "value": "username: sarah", "limit": 1000},
@@ -485,7 +485,7 @@ def test_function_always_error(client: Letta):
tool = client.tools.upsert_from_function(func=testing_method)
agent = client.agents.create(
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
memory_blocks=[
{
@@ -687,7 +687,7 @@ def test_agent_creation(client: Letta):
},
{"label": "persona", "value": "you are an assistant"},
],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
tool_ids=[tool1.id, tool2.id],
include_base_tools=False,
@@ -726,7 +726,7 @@ def test_initial_sequence(client: Letta):
# create an agent
agent = client.agents.create(
memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
initial_message_sequence=[
MessageCreateParam(
@@ -758,7 +758,7 @@ def test_initial_sequence(client: Letta):
# def test_timezone(client: Letta):
# agent = client.agents.create(
# memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
-# model="anthropic/claude-haiku-4-5-20251001",
+# model="anthropic/claude-haiku-4-5",
# embedding="openai/text-embedding-3-small",
# timezone="America/Los_Angeles",
# )
@@ -793,7 +793,7 @@ def test_initial_sequence(client: Letta):
def test_attach_sleeptime_block(client: Letta):
agent = client.agents.create(
memory_blocks=[{"label": "human", "value": ""}, {"label": "persona", "value": ""}],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
enable_sleeptime=True,
)
diff --git a/tests/test_letta_agent_batch.py b/tests/test_letta_agent_batch.py
index 9dc1cfb01..edd1ccc30 100644
--- a/tests/test_letta_agent_batch.py
+++ b/tests/test_letta_agent_batch.py
@@ -37,7 +37,7 @@ from tests.utils import create_tool_from_func
# Model identifiers used in tests
MODELS = {
"sonnet": "anthropic/claude-sonnet-4-20250514",
- "haiku": "anthropic/claude-haiku-4-5-20251001",
+ "haiku": "anthropic/claude-haiku-4-5",
"opus": "anthropic/claude-opus-4-1-20250805",
}
diff --git a/tests/test_sdk_client.py b/tests/test_sdk_client.py
index 22e352cf0..4c0ddf2ae 100644
--- a/tests/test_sdk_client.py
+++ b/tests/test_sdk_client.py
@@ -1112,7 +1112,7 @@ def test_include_return_message_types(client: LettaSDKClient, agent: AgentState,
memory_blocks=[
CreateBlockParam(label="user", value="Name: Charles"),
],
- model="anthropic/claude-haiku-4-5-20251001",
+ model="anthropic/claude-haiku-4-5",
embedding="openai/text-embedding-3-small",
)
diff --git a/tests/test_usage_parsing.py b/tests/test_usage_parsing.py
index 7a40e597c..577164716 100644
--- a/tests/test_usage_parsing.py
+++ b/tests/test_usage_parsing.py
@@ -200,7 +200,7 @@ async def test_anthropic_usage_via_adapter():
client = AnthropicClient()
llm_config = LLMConfig(
- model="claude-3-5-haiku-20241022",
+ model="claude-haiku-4-5-20251001",
model_endpoint_type="anthropic",
model_endpoint="https://api.anthropic.com/v1",
context_window=200000,
@@ -363,7 +363,7 @@ async def test_anthropic_prefix_caching_via_adapter():
client = AnthropicClient()
llm_config = LLMConfig(
- model="claude-3-5-haiku-20241022",
+ model="claude-haiku-4-5-20251001",
model_endpoint_type="anthropic",
model_endpoint="https://api.anthropic.com/v1",
context_window=200000,