fix: only import modal if there is a key (#3668)

This commit is contained in:
Sarah Wooders
2025-07-30 19:04:15 -07:00
committed by GitHub
parent 5d52f2fc3f
commit 02507dd356
2 changed files with 3 additions and 2 deletions

View File

@@ -13,7 +13,6 @@ from letta.schemas.user import User
from letta.services.agent_manager import AgentManager
from letta.services.tool_executor.tool_executor_base import ToolExecutor
from letta.services.tool_sandbox.local_sandbox import AsyncToolSandboxLocal
from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModal
from letta.settings import tool_settings
from letta.types import JsonDict
from letta.utils import get_friendly_error_msg
@@ -22,6 +21,8 @@ logger = get_logger(__name__)
if tool_settings.e2b_api_key:
from letta.services.tool_sandbox.e2b_sandbox import AsyncToolSandboxE2B
if tool_settings.modal_api_key:
from letta.services.tool_sandbox.modal_sandbox import AsyncToolSandboxModal
class SandboxToolExecutor(ToolExecutor):

View File

@@ -115,7 +115,7 @@ pinecone = ["pinecone"]
dev = ["pytest", "pytest-asyncio", "pexpect", "black", "pre-commit", "pyright", "pytest-order", "autoflake", "isort", "locust"]
experimental = ["uvloop", "granian", "google-cloud-profiler"]
server = ["websockets", "fastapi", "uvicorn"]
cloud-tool-sandbox = ["e2b-code-interpreter", "modal"]
cloud-tool-sandbox = ["e2b-code-interpreter", "modal"] # TODO: split this up
external-tools = ["docker", "langchain", "wikipedia", "langchain-community", "firecrawl-py"]
tests = ["wikipedia"]
bedrock = ["boto3", "aioboto3"]