fix: lower default LangSmith sandbox size to fit "large" tier (#1226)

Previous defaults (4 vCPU / 15 GiB) exceed the maximum sandbox size
the LangSmith API accepts, causing a 400 on every sandbox creation:

  sandbox size 4 vCPU / 15360 MiB exceeds the maximum supported size;
  must fit within one of: small (1 vCPU / 1792 MiB),
  medium (1 vCPU / 3840 MiB), or large (2 vCPU / 7936 MiB)

Default to the "large" cap (2 vCPU / 7936 MiB) so deployments without
DEFAULT_SANDBOX_VCPUS / DEFAULT_SANDBOX_MEM_BYTES env overrides boot
into a working state.

Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
This commit is contained in:
Johannes du Plessis 2026-04-30 13:24:15 -07:00 • committed by GitHub
parent b6ea229a46
commit 016eef6875
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,8 +16,8 @@ from langsmith.sandbox import SandboxClient
logger = logging.getLogger(__name__)
DEFAULT_SNAPSHOT_FS_CAPACITY_BYTES = 32 * 1024**3
DEFAULT_SANDBOX_VCPUS = 4
DEFAULT_SANDBOX_MEM_BYTES = 15 * 1024**3 # 15 GiB
DEFAULT_SANDBOX_VCPUS = 2
DEFAULT_SANDBOX_MEM_BYTES = 7936 * 1024**2 # 7936 MiB ("large" tier cap)
def _get_langsmith_api_key() -> str | None: