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: send message test for gpt 4o (#6012)

Ari Webb13a77289b9c6
diff --git a/tests/integration_test_send_message.py b/tests/integration_test_send_message.py
index d91ce8de4..d85a4c65c 100644
--- a/tests/integration_test_send_message.py
+++ b/tests/integration_test_send_message.py
@@ -464,13 +464,6 @@ def assert_tool_call_response(
):
return
- try:
- assert len(messages) == expected_message_count, messages
- except:
- if "claude-3-7-sonnet" not in llm_config.model:
- raise
- assert len(messages) == expected_message_count - 1, messages
-
# OpenAI gpt-4o-mini can sometimes omit the final AssistantMessage in streaming,
# yielding the shorter sequence:
# Reasoning -> ToolCall -> ToolReturn -> Reasoning -> StopReason -> Usage
@@ -489,6 +482,13 @@ def assert_tool_call_response(
):
return
+ try:
+ assert len(messages) == expected_message_count, messages
+ except:
+ if "claude-3-7-sonnet" not in llm_config.model:
+ raise
+ assert len(messages) == expected_message_count - 1, messages
+
index = 0
if from_db:
assert isinstance(messages[index], UserMessage)