Patch Changes
-
e88ae33: Fix signed URL expiration edge cases in
uploadUrl/downloadUrl(upload_url/download_url):- Python now raises
InvalidArgumentExceptionwhenuse_signature_expirationis passed for an unsecured sandbox, matching the JS SDK behavior (which now throwsInvalidArgumentErrorinstead of a plainError). - A signature expiration of
0now produces an immediately expiring URL instead of silently creating a never-expiring one.
- Python now raises
-
78c200a: Allow disabling client-side API key format validation. Set the
E2B_VALIDATE_API_KEYenvironment variable tofalse, or pass thevalidateApiKey: false(JS) /validate_api_key=False(Python) connection option, when your deployment issues API keys that don't match the defaulte2b_format. -
cb061d2: Fix command and PTY streaming issues:
- Decode stdout/stderr incrementally so multibyte UTF-8 characters split across command stream chunks are no longer corrupted
- Avoid mutating the caller's
envsobject when applying defaultTERM/LANG/LC_ALLvalues inpty.create()
-
82add5b: Raise a typed, actionable error when the sandbox dies while a request is in flight. When the connection is dropped mid-request (streaming RPC calls — commands, PTY, directory watch — and filesystem read/write), the SDKs now probe the sandbox health endpoint: if the sandbox is confirmed gone, a
TimeoutError(JS) /TimeoutException(Python) is raised stating the sandbox was killed or reached its end of life — consistent with how requests to an already-dead sandbox surface. In all other cases the original error propagates unchanged. -
5ea287b: Make the
gzip: trueupload option imply theapplication/octet-streamupload path so it is no longer silently ignored on the defaultmultipart/form-datapath. On envd versions older than 0.5.7 the upload still falls back to uncompressedmultipart/form-data. -
b52eb3c: Skip the control plane request in
Sandbox.connect()when running in debug mode, matching the behavior ofSandbox.create(). In the Python SDK,Sandbox.connect()now also normalizes missing envd and traffic access tokens toNoneinstead of leaking theUnsetsentinel, which previously brokedownload_url()/upload_url()for non-secure sandboxes.