Skip to content

Commit aeadd1a

Browse files
authored
fix(ci): autosummarize test fails (pydantic version dependant?) (#2792)
1 parent 336896d commit aeadd1a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/integration_test_send_message.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,13 +851,16 @@ def test_async_greeting_with_assistant_message(
851851
)
852852
def test_auto_summarize(disable_e2b_api_key: Any, client: Letta, llm_config: LLMConfig):
853853
"""Test that summarization is automatically triggered."""
854-
llm_config.context_window = 3000
854+
# pydantic prevents us for overriding the context window paramter in the passed LLMConfig
855+
new_llm_config = llm_config.model_dump()
856+
new_llm_config["context_window"] = 3000
857+
pinned_context_window_llm_config = LLMConfig(**new_llm_config)
855858

856859
send_message_tool = client.tools.list(name="send_message")[0]
857860
temp_agent_state = client.agents.create(
858861
include_base_tools=False,
859862
tool_ids=[send_message_tool.id],
860-
llm_config=llm_config,
863+
llm_config=pinned_context_window_llm_config,
861864
embedding="letta/letta-free",
862865
tags=["supervisor"],
863866
)

tests/test_managers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
from letta.server.db import db_registry
8686
from letta.server.server import SyncServer
8787
from letta.services.block_manager import BlockManager
88-
from letta.settings import settings, tool_settings
88+
from letta.settings import tool_settings
8989
from tests.helpers.utils import comprehensive_agent_checks, validate_context_window_overview
9090
from tests.utils import random_string
9191

0 commit comments

Comments
 (0)