mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-30 19:09:28 +00:00
Revert "remove Vercel AI Gateway and Vercel Sandbox (#33067)"
This reverts commit febc4cfec0.
This commit is contained in:
parent
0524eccdd8
commit
ad12df6ba4
94 changed files with 4168 additions and 102 deletions
|
|
@ -288,6 +288,21 @@ def check_sandbox_requirements() -> bool:
|
|||
"""Code execution sandbox requires a POSIX OS for Unix domain sockets."""
|
||||
if not SANDBOX_AVAILABLE:
|
||||
return False
|
||||
|
||||
try:
|
||||
from tools.terminal_tool import (
|
||||
_check_vercel_sandbox_requirements,
|
||||
_get_env_config,
|
||||
)
|
||||
|
||||
config = _get_env_config()
|
||||
except Exception:
|
||||
logger.debug("Could not resolve terminal config for execute_code availability", exc_info=True)
|
||||
return False
|
||||
|
||||
if config.get("env_type") == "vercel_sandbox":
|
||||
return _check_vercel_sandbox_requirements(config)
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
@ -752,12 +767,13 @@ def _get_or_create_env(task_id: str):
|
|||
cwd = overrides.get("cwd") or config["cwd"]
|
||||
|
||||
container_config = None
|
||||
if env_type in {"docker", "singularity", "modal", "daytona"}:
|
||||
if env_type in {"docker", "singularity", "modal", "daytona", "vercel_sandbox"}:
|
||||
container_config = {
|
||||
"container_cpu": config.get("container_cpu", 1),
|
||||
"container_memory": config.get("container_memory", 5120),
|
||||
"container_disk": config.get("container_disk", 51200),
|
||||
"container_persistent": config.get("container_persistent", True),
|
||||
"vercel_runtime": config.get("vercel_runtime", ""),
|
||||
"docker_volumes": config.get("docker_volumes", []),
|
||||
"docker_run_as_host_user": config.get("docker_run_as_host_user", False),
|
||||
"docker_network": config.get("docker_network", True),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue