Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
chore(sdk): deprecate apiUrl and sandboxUrl connection options (#2018)
devin-ai-integration[bot]5a714f09a698
diff --git a/.changeset/deprecate-domain-urls.md b/.changeset/deprecate-domain-urls.mdnew file mode 100644index 000000000..b5da54b57--- /dev/null+++ b/.changeset/deprecate-domain-urls.md@@ -0,0 +1,6 @@+---+'e2b': patch+'@e2b/python-sdk': patch+---++Deprecate the `apiUrl` / `api_url` and `sandboxUrl` / `sandbox_url` connection options and their `E2B_API_URL` and `E2B_SANDBOX_URL` environment variables. They keep working for now and will be removed in the next major version.diff --git a/packages/js-sdk/src/connectionConfig.ts b/packages/js-sdk/src/connectionConfig.tsindex 54af513b4..a461d1cbd 100644--- a/packages/js-sdk/src/connectionConfig.ts+++ b/packages/js-sdk/src/connectionConfig.ts@@ -65,12 +65,18 @@ export interface ConnectionOpts {* API Url to use for the API.* @internal* @default E2B_API_URL // environment variable or `https://api.${domain}`+ *+ * @deprecated `apiUrl` and the `E2B_API_URL` environment variable will be+ * removed in the next major version.*/apiUrl?: string/*** Sandbox Url to use for the API.* @internal* @default E2B_SANDBOX_URL // environment variable, `https://sandbox.${domain}`+ *+ * @deprecated `sandboxUrl` and the `E2B_SANDBOX_URL` environment variable+ * will be removed in the next major version.*/sandboxUrl?: string/**diff --git a/packages/js-sdk/src/sandbox/sandboxApi.ts b/packages/js-sdk/src/sandbox/sandboxApi.tsindex c5af5b116..cc2df50a9 100644--- a/packages/js-sdk/src/sandbox/sandboxApi.ts+++ b/packages/js-sdk/src/sandbox/sandboxApi.ts@@ -826,6 +826,9 @@ export interface SandboxOpts extends ConnectionOpts {/*** Sandbox URL. Used for local development+ *+ * @deprecated `sandboxUrl` and the `E2B_SANDBOX_URL` environment variable+ * will be removed in the next major version.*/sandboxUrl?: stringdiff --git a/packages/python-sdk/e2b/connection_config.py b/packages/python-sdk/e2b/connection_config.pyindex 795053b83..439df3eaa 100644--- a/packages/python-sdk/e2b/connection_config.py+++ b/packages/python-sdk/e2b/connection_config.py@@ -113,7 +113,9 @@ class ApiParams(TypedDict, total=False):"""E2B domain to use for authentication, defaults to `E2B_DOMAIN` environment variable."""api_url: Optional[str]- """URL to use for the API, defaults to `https://api.<domain>`. For internal use only."""+ """URL to use for the API, defaults to `E2B_API_URL` environment variable or `https://api.<domain>`. For internal use only.++ :deprecated: `api_url` and the `E2B_API_URL` environment variable will be removed in the next major version."""debug: Optional[bool]"""Whether to use debug mode, defaults to `E2B_DEBUG` environment variable."""@@ -122,7 +124,9 @@ class ApiParams(TypedDict, total=False):"""Proxy to use for the request. In case of a sandbox it applies to all **requests made to the returned sandbox**."""sandbox_url: Optional[str]- """URL to connect to sandbox, defaults to `E2B_SANDBOX_URL` environment variable."""+ """URL to connect to sandbox, defaults to `E2B_SANDBOX_URL` environment variable.++ :deprecated: `sandbox_url` and the `E2B_SANDBOX_URL` environment variable will be removed in the next major version."""http_version: Optional[HttpVersion]"""HTTP version for requests to the E2B API and to sandboxes (commands,