Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix autopause (#876)

Jakub Novákcf0bb40ed3b3
diff --git a/.changeset/four-zoos-punch.md b/.changeset/four-zoos-punch.md
new file mode 100644
index 000000000..8d54aad79
--- /dev/null
+++ b/.changeset/four-zoos-punch.md
@@ -0,0 +1,6 @@
+---
+'@e2b/python-sdk': patch
+'e2b': patch
+---
+
+Fix autopause
diff --git a/packages/js-sdk/src/api/schema.gen.ts b/packages/js-sdk/src/api/schema.gen.ts
index 70af68acd..85f2d7d0b 100644
--- a/packages/js-sdk/src/api/schema.gen.ts
+++ b/packages/js-sdk/src/api/schema.gen.ts
@@ -1242,9 +1242,8 @@ export interface components {
/**
* @deprecated
* @description Automatically pauses the sandbox after the timeout
- * @default false
*/
- autoPause: boolean
+ autoPause?: boolean
/**
* Format: int32
* @description Time to live for the sandbox in seconds.
diff --git a/packages/js-sdk/src/sandbox/sandboxApi.ts b/packages/js-sdk/src/sandbox/sandboxApi.ts
index abf51aeb7..4e23342bb 100644
--- a/packages/js-sdk/src/sandbox/sandboxApi.ts
+++ b/packages/js-sdk/src/sandbox/sandboxApi.ts
@@ -498,7 +498,6 @@ export class SandboxApi {
},
},
body: {
- autoPause: false,
timeout: timeoutToSeconds(timeoutMs),
},
signal: config.getSignal(opts?.requestTimeoutMs),
diff --git a/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py b/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
index 568b7ef2a..d990dc84f 100644
--- a/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
+++ b/packages/python-sdk/e2b/api/client/models/resumed_sandbox.py
@@ -13,11 +13,11 @@ T = TypeVar("T", bound="ResumedSandbox")
class ResumedSandbox:
"""
Attributes:
- auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout Default: False.
+ auto_pause (Union[Unset, bool]): Automatically pauses the sandbox after the timeout
timeout (Union[Unset, int]): Time to live for the sandbox in seconds. Default: 15.
"""
- auto_pause: Union[Unset, bool] = False
+ auto_pause: Union[Unset, bool] = UNSET
timeout: Union[Unset, int] = 15
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
diff --git a/spec/openapi.yml b/spec/openapi.yml
index e8b0d72d7..c2da79859 100644
--- a/spec/openapi.yml
+++ b/spec/openapi.yml
@@ -462,7 +462,6 @@ components:
autoPause:
type: boolean
deprecated: true
- default: false
description: Automatically pauses the sandbox after the timeout
TeamMetric: