Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
fix: remove modal image creation logging and fix base imports (#6197)
jnjpng099da97e7bcd
diff --git a/letta/constants.py b/letta/constants.pyindex 330edff30..392bba548 100644--- a/letta/constants.py+++ b/letta/constants.py@@ -457,6 +457,6 @@ MODAL_DEFAULT_MAX_CONCURRENT_INPUTS = 1MODAL_DEFAULT_PYTHON_VERSION = "3.12"# Security settings-MODAL_SAFE_IMPORT_MODULES = {"typing", "pydantic", "datetime", "enum", "uuid", "decimal"}+MODAL_SAFE_IMPORT_MODULES = {"typing", "pydantic", "datetime", "uuid"} # decimal, enum# Default handle for model used to generate toolsDEFAULT_GENERATE_TOOL_MODEL_HANDLE = "openai/gpt-4.1"diff --git a/letta/services/tool_manager.py b/letta/services/tool_manager.pyindex d7aabdddd..245f8ea77 100644--- a/letta/services/tool_manager.py+++ b/letta/services/tool_manager.py@@ -20,6 +20,7 @@ from letta.constants import (MCP_TOOL_TAG_NAME_PREFIX,MODAL_DEFAULT_PYTHON_VERSION,MODAL_DEFAULT_TOOL_NAME,+ MODAL_SAFE_IMPORT_MODULES,)from letta.errors import LettaInvalidArgumentError, LettaToolNameConflictError, LettaToolNameSchemaMismatchErrorfrom letta.functions.functions import derive_openai_json_schema, load_function_set@@ -58,6 +59,8 @@ def modal_tool_wrapper(tool: PydanticTool, actor: PydanticUser, sandbox_env_varsfrom letta_client import Lettapackages = [str(req) for req in tool.pip_requirements] if tool.pip_requirements else []+ for package in MODAL_SAFE_IMPORT_MODULES:+ packages.append(package)packages.append("letta_client")packages.append("letta") # Base letta without extraspackages.append("asyncpg>=0.30.0") # Fixes asyncpg import error@@ -1026,7 +1029,7 @@ class ToolManager:modal_app = modal_tool_wrapper(tool, actor, sandbox_env_vars)# Deploy the app first- with modal.enable_output():+ with modal.enable_output(show_progress=False):try:deploy = modal_app.deploy()except Exception as e: