diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index de0960aba..ffb929a02 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "1.12.0"
+ ".": "1.12.1"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index a784436d5..ab8cc33c0 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-132ed160716591bdcd9231c00da8c506d9451a5486b165fc27b2a01d93202082.yml
-openapi_spec_hash: c2b44d9e9cda56e32141a7ea3794bbba
-config_hash: 3bd89c812b96708c461fb98286ebf0b5
+configured_endpoints: 117
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-0568973e19e8af9fa953b2ded109ab2b69e76e90e2b74f33617dbf7092e26274.yml
+openapi_spec_hash: 10ba804ce69510d7985e05c77d0ffcf6
+config_hash: de99cfce88e2d1f02246dc6c2f43bc6c
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b0cee6959..7fa80f3dd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 1.12.1 (2026-03-19)
+
+Full Changelog: [v1.12.0...v1.12.1](https://github.com/runloopai/api-client-python/compare/v1.12.0...v1.12.1)
+
+### Chores
+
+* remove create_tunnel endpoint ([627c994](https://github.com/runloopai/api-client-python/commit/627c9945cdaf3b2d0ca46a2832092dd4fa011863))
+
## 1.12.0 (2026-03-18)
Full Changelog: [v1.11.0...v1.12.0](https://github.com/runloopai/api-client-python/compare/v1.11.0...v1.12.0)
diff --git a/README.md b/README.md
index c003e20cb..09aeb9016 100644
--- a/README.md
+++ b/README.md
@@ -9,15 +9,6 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://
It is generated with [Stainless](https://www.stainless.com/).
-## MCP Server
-
-Use the Runloop MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.
-
-[](https://cursor.com/en-US/install-mcp?name=%40runloop%2Fapi-client-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBydW5sb29wL2FwaS1jbGllbnQtbWNwIl0sImVudiI6eyJSVU5MT09QX0FQSV9LRVkiOiJNeSBCZWFyZXIgVG9rZW4ifX0)
-[](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40runloop%2Fapi-client-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40runloop%2Fapi-client-mcp%22%5D%2C%22env%22%3A%7B%22RUNLOOP_API_KEY%22%3A%22My%20Bearer%20Token%22%7D%7D)
-
-> Note: You may need to set environment variables in your MCP client.
-
## Documentation
The REST API documentation can be found on
diff --git a/api.md b/api.md
index 1c0166794..4a2dd3da3 100644
--- a/api.md
+++ b/api.md
@@ -131,7 +131,6 @@ from runloop_api_client.types import (
DevboxSendStdInResult,
DevboxSnapshotListView,
DevboxSnapshotView,
- DevboxTunnelView,
DevboxView,
TunnelView,
DevboxCreateSSHKeyResponse,
@@ -147,7 +146,6 @@ Methods:
- client.devboxes.update(id, \*\*params) -> DevboxView
- client.devboxes.list(\*\*params) -> SyncDevboxesCursorIDPage[DevboxView]
- client.devboxes.create_ssh_key(id) -> DevboxCreateSSHKeyResponse
-- client.devboxes.create_tunnel(id, \*\*params) -> DevboxTunnelView
- client.devboxes.delete_disk_snapshot(id) -> object
- client.devboxes.download_file(id, \*\*params) -> BinaryAPIResponse
- client.devboxes.enable_tunnel(id, \*\*params) -> TunnelView
diff --git a/pyproject.toml b/pyproject.toml
index 036cf4b04..1fccbf83b 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
-version = "1.12.0"
+version = "1.12.1"
description = "The official Python library for the runloop API"
dynamic = ["readme"]
license = "MIT"
diff --git a/src/runloop_api_client/_version.py b/src/runloop_api_client/_version.py
index 3058faf74..f93dfde0e 100644
--- a/src/runloop_api_client/_version.py
+++ b/src/runloop_api_client/_version.py
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
__title__ = "runloop_api_client"
-__version__ = "1.12.0" # x-release-please-version
+__version__ = "1.12.1" # x-release-please-version
diff --git a/src/runloop_api_client/resources/benchmark_runs.py b/src/runloop_api_client/resources/benchmark_runs.py
index 3e957de2d..964497cde 100644
--- a/src/runloop_api_client/resources/benchmark_runs.py
+++ b/src/runloop_api_client/resources/benchmark_runs.py
@@ -145,8 +145,11 @@ def cancel(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> BenchmarkRunView:
- """
- Cancel a currently running Benchmark run.
+ """Cancel a Benchmark run.
+
+ This will do the following: 1. Cancel all running
+ scenarios and shutdown the underlying Devbox resources 2. Update the benchmark
+ state to CANCELED 3. Calculate final score from completed scenarios
Args:
extra_headers: Send extra headers
@@ -388,8 +391,11 @@ async def cancel(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
idempotency_key: str | None = None,
) -> BenchmarkRunView:
- """
- Cancel a currently running Benchmark run.
+ """Cancel a Benchmark run.
+
+ This will do the following: 1. Cancel all running
+ scenarios and shutdown the underlying Devbox resources 2. Update the benchmark
+ state to CANCELED 3. Calculate final score from completed scenarios
Args:
extra_headers: Send extra headers
diff --git a/src/runloop_api_client/resources/devboxes/devboxes.py b/src/runloop_api_client/resources/devboxes/devboxes.py
index dbd02be20..406af8626 100644
--- a/src/runloop_api_client/resources/devboxes/devboxes.py
+++ b/src/runloop_api_client/resources/devboxes/devboxes.py
@@ -27,7 +27,6 @@
devbox_shutdown_params,
devbox_upload_file_params,
devbox_execute_sync_params,
- devbox_create_tunnel_params,
devbox_download_file_params,
devbox_enable_tunnel_params,
devbox_execute_async_params,
@@ -102,7 +101,6 @@
from ...lib.polling_async import async_poll_until
from ...types.devbox_view import DevboxView
from ...types.tunnel_view import TunnelView
-from ...types.devbox_tunnel_view import DevboxTunnelView
from ...types.shared_params.mount import Mount
from ...types.devbox_snapshot_view import DevboxSnapshotView
from ...types.shared.launch_parameters import LaunchParameters as SharedLaunchParameters
@@ -664,56 +662,6 @@ def create_ssh_key(
cast_to=DevboxCreateSSHKeyResponse,
)
- @typing_extensions.deprecated(
- "create_tunnel is deprecated; use enable_tunnel or configure a tunnel at devbox creation."
- )
- def create_tunnel(
- self,
- id: str,
- *,
- port: int,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- idempotency_key: str | None = None,
- ) -> DevboxTunnelView:
- """[Deprecated] Use enable_tunnel or configure a tunnel at devbox creation instead.
-
- This endpoint
- creates a legacy tunnel. The new enable_tunnel endpoint provides improved tunnel
- functionality with authentication options.
-
- Args:
- port: Devbox port that tunnel will expose.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return self._post(
- f"/v1/devboxes/{id}/create_tunnel",
- body=maybe_transform({"port": port}, devbox_create_tunnel_params.DevboxCreateTunnelParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=DevboxTunnelView,
- )
-
def delete_disk_snapshot(
self,
id: str,
@@ -2345,56 +2293,6 @@ async def create_ssh_key(
cast_to=DevboxCreateSSHKeyResponse,
)
- @typing_extensions.deprecated(
- "create_tunnel is deprecated; use enable_tunnel or configure a tunnel at devbox creation."
- )
- async def create_tunnel(
- self,
- id: str,
- *,
- port: int,
- # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
- # The extra values given here take precedence over values defined on the client or passed to this method.
- extra_headers: Headers | None = None,
- extra_query: Query | None = None,
- extra_body: Body | None = None,
- timeout: float | httpx.Timeout | None | NotGiven = not_given,
- idempotency_key: str | None = None,
- ) -> DevboxTunnelView:
- """[Deprecated] Use enable_tunnel or configure a tunnel at devbox creation instead.
-
- This endpoint
- creates a legacy tunnel. The new enable_tunnel endpoint provides improved tunnel
- functionality with authentication options.
-
- Args:
- port: Devbox port that tunnel will expose.
-
- extra_headers: Send extra headers
-
- extra_query: Add additional query parameters to the request
-
- extra_body: Add additional JSON properties to the request
-
- timeout: Override the client-level default timeout for this request, in seconds
-
- idempotency_key: Specify a custom idempotency key for this request
- """
- if not id:
- raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
- return await self._post(
- f"/v1/devboxes/{id}/create_tunnel",
- body=await async_maybe_transform({"port": port}, devbox_create_tunnel_params.DevboxCreateTunnelParams),
- options=make_request_options(
- extra_headers=extra_headers,
- extra_query=extra_query,
- extra_body=extra_body,
- timeout=timeout,
- idempotency_key=idempotency_key,
- ),
- cast_to=DevboxTunnelView,
- )
-
async def delete_disk_snapshot(
self,
id: str,
@@ -3525,11 +3423,6 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.create_ssh_key = to_raw_response_wrapper(
devboxes.create_ssh_key,
)
- self.create_tunnel = ( # pyright: ignore[reportDeprecated]
- to_raw_response_wrapper(
- devboxes.create_tunnel, # pyright: ignore[reportDeprecated],
- )
- )
self.delete_disk_snapshot = to_raw_response_wrapper(
devboxes.delete_disk_snapshot,
)
@@ -3633,11 +3526,6 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.create_ssh_key = async_to_raw_response_wrapper(
devboxes.create_ssh_key,
)
- self.create_tunnel = ( # pyright: ignore[reportDeprecated]
- async_to_raw_response_wrapper(
- devboxes.create_tunnel, # pyright: ignore[reportDeprecated],
- )
- )
self.delete_disk_snapshot = async_to_raw_response_wrapper(
devboxes.delete_disk_snapshot,
)
@@ -3741,11 +3629,6 @@ def __init__(self, devboxes: DevboxesResource) -> None:
self.create_ssh_key = to_streamed_response_wrapper(
devboxes.create_ssh_key,
)
- self.create_tunnel = ( # pyright: ignore[reportDeprecated]
- to_streamed_response_wrapper(
- devboxes.create_tunnel, # pyright: ignore[reportDeprecated],
- )
- )
self.delete_disk_snapshot = to_streamed_response_wrapper(
devboxes.delete_disk_snapshot,
)
@@ -3849,11 +3732,6 @@ def __init__(self, devboxes: AsyncDevboxesResource) -> None:
self.create_ssh_key = async_to_streamed_response_wrapper(
devboxes.create_ssh_key,
)
- self.create_tunnel = ( # pyright: ignore[reportDeprecated]
- async_to_streamed_response_wrapper(
- devboxes.create_tunnel, # pyright: ignore[reportDeprecated],
- )
- )
self.delete_disk_snapshot = async_to_streamed_response_wrapper(
devboxes.delete_disk_snapshot,
)
diff --git a/src/runloop_api_client/sdk/_types.py b/src/runloop_api_client/sdk/_types.py
index a488f585e..c66efebe3 100644
--- a/src/runloop_api_client/sdk/_types.py
+++ b/src/runloop_api_client/sdk/_types.py
@@ -24,7 +24,6 @@
DevboxUploadFileParams,
GatewayConfigListParams,
NetworkPolicyListParams,
- DevboxCreateTunnelParams,
DevboxDownloadFileParams,
DevboxEnableTunnelParams,
DevboxRemoveTunnelParams,
@@ -124,10 +123,6 @@ class SDKDevboxUploadFileParams(DevboxUploadFileParams, LongRequestOptions):
pass
-class SDKDevboxCreateTunnelParams(DevboxCreateTunnelParams, LongRequestOptions):
- pass
-
-
class SDKDevboxEnableTunnelParams(DevboxEnableTunnelParams, LongRequestOptions):
pass
diff --git a/src/runloop_api_client/sdk/async_devbox.py b/src/runloop_api_client/sdk/async_devbox.py
index e6c0ac51e..9a97cb5f3 100644
--- a/src/runloop_api_client/sdk/async_devbox.py
+++ b/src/runloop_api_client/sdk/async_devbox.py
@@ -11,7 +11,6 @@
from ..types import (
DevboxView,
TunnelView,
- DevboxTunnelView,
DevboxExecutionDetailView,
DevboxCreateSSHKeyResponse,
)
@@ -23,7 +22,6 @@
SDKDevboxExecuteParams,
ExecuteStreamingCallbacks,
SDKDevboxUploadFileParams,
- SDKDevboxCreateTunnelParams,
SDKDevboxDownloadFileParams,
SDKDevboxEnableTunnelParams,
SDKDevboxExecuteAsyncParams,
@@ -807,34 +805,6 @@ async def create_ssh_key(
**options,
)
- async def create_tunnel(
- self,
- **params: Unpack[SDKDevboxCreateTunnelParams],
- ) -> DevboxTunnelView:
- """[Deprecated] Create a legacy tunnel to expose a devbox port publicly.
-
- Use :meth:`enable_tunnel` or configure a tunnel during devbox creation instead.
-
- :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams` for available parameters
- :return: Details about the public endpoint
- :rtype: DevboxTunnelView
-
- Example:
- >>> tunnel = await devbox.net.create_tunnel(port=8080)
- >>> print(f"Public URL: {tunnel.url}")
- """
- warnings.warn(
- "create_tunnel is deprecated; use enable_tunnel or configure a tunnel at devbox creation.",
- DeprecationWarning,
- stacklevel=2,
- )
- with warnings.catch_warnings():
- warnings.simplefilter("ignore", DeprecationWarning)
- return await self._devbox._client.devboxes.create_tunnel( # type: ignore[deprecated]
- self._devbox.id,
- **params,
- )
-
async def enable_tunnel(
self,
**params: Unpack[SDKDevboxEnableTunnelParams],
diff --git a/src/runloop_api_client/sdk/devbox.py b/src/runloop_api_client/sdk/devbox.py
index 5718e7392..ac1743a6b 100644
--- a/src/runloop_api_client/sdk/devbox.py
+++ b/src/runloop_api_client/sdk/devbox.py
@@ -11,7 +11,6 @@
from ..types import (
DevboxView,
TunnelView,
- DevboxTunnelView,
DevboxExecutionDetailView,
DevboxCreateSSHKeyResponse,
)
@@ -24,7 +23,6 @@
ExecuteStreamingCallbacks,
LongPollingRequestOptions,
SDKDevboxUploadFileParams,
- SDKDevboxCreateTunnelParams,
SDKDevboxDownloadFileParams,
SDKDevboxEnableTunnelParams,
SDKDevboxExecuteAsyncParams,
@@ -810,34 +808,6 @@ def create_ssh_key(
**options,
)
- def create_tunnel(
- self,
- **params: Unpack[SDKDevboxCreateTunnelParams],
- ) -> DevboxTunnelView:
- """[Deprecated] Create a legacy tunnel to expose a devbox port publicly.
-
- Use :meth:`enable_tunnel` or configure a tunnel during devbox creation instead.
-
- :param params: See :typeddict:`~runloop_api_client.sdk._types.SDKDevboxCreateTunnelParams` for available parameters
- :return: Details about the public endpoint
- :rtype: :class:`~runloop_api_client.types.devbox_tunnel_view.DevboxTunnelView`
-
- Example:
- >>> tunnel = devbox.net.create_tunnel(port=8080)
- >>> print(f"Public URL: {tunnel.url}")
- """
- warnings.warn(
- "create_tunnel is deprecated; use enable_tunnel or configure a tunnel at devbox creation.",
- DeprecationWarning,
- stacklevel=2,
- )
- with warnings.catch_warnings():
- warnings.simplefilter("ignore", DeprecationWarning)
- return self._devbox._client.devboxes.create_tunnel( # type: ignore[deprecated]
- self._devbox.id,
- **params,
- )
-
def enable_tunnel(
self,
**params: Unpack[SDKDevboxEnableTunnelParams],
diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py
index 2cd10b43d..693d5c6f8 100644
--- a/src/runloop_api_client/types/__init__.py
+++ b/src/runloop_api_client/types/__init__.py
@@ -33,7 +33,6 @@
from .benchmark_job_view import BenchmarkJobView as BenchmarkJobView
from .benchmark_run_view import BenchmarkRunView as BenchmarkRunView
from .devbox_list_params import DevboxListParams as DevboxListParams
-from .devbox_tunnel_view import DevboxTunnelView as DevboxTunnelView
from .object_list_params import ObjectListParams as ObjectListParams
from .secret_list_params import SecretListParams as SecretListParams
from .agent_create_params import AgentCreateParams as AgentCreateParams
@@ -97,7 +96,6 @@
from .repository_connection_view import RepositoryConnectionView as RepositoryConnectionView
from .scenario_environment_param import ScenarioEnvironmentParam as ScenarioEnvironmentParam
from .benchmark_job_create_params import BenchmarkJobCreateParams as BenchmarkJobCreateParams
-from .devbox_create_tunnel_params import DevboxCreateTunnelParams as DevboxCreateTunnelParams
from .devbox_download_file_params import DevboxDownloadFileParams as DevboxDownloadFileParams
from .devbox_enable_tunnel_params import DevboxEnableTunnelParams as DevboxEnableTunnelParams
from .devbox_execute_async_params import DevboxExecuteAsyncParams as DevboxExecuteAsyncParams
diff --git a/src/runloop_api_client/types/benchmark_job_view.py b/src/runloop_api_client/types/benchmark_job_view.py
index f245f33ac..bab53ed87 100644
--- a/src/runloop_api_client/types/benchmark_job_view.py
+++ b/src/runloop_api_client/types/benchmark_job_view.py
@@ -171,7 +171,7 @@ class InProgressRun(BaseModel):
start_time_ms: int
"""Start time (Unix milliseconds)."""
- state: Literal["running", "canceled", "completed"]
+ state: Literal["running", "canceled", "completed", "failed"]
"""The current state of the run."""
agent_config: Optional[InProgressRunAgentConfig] = None
diff --git a/src/runloop_api_client/types/benchmark_run_view.py b/src/runloop_api_client/types/benchmark_run_view.py
index 8eaaf4ad5..5ea3ce15b 100644
--- a/src/runloop_api_client/types/benchmark_run_view.py
+++ b/src/runloop_api_client/types/benchmark_run_view.py
@@ -22,7 +22,7 @@ class BenchmarkRunView(BaseModel):
start_time_ms: int
"""The time the benchmark run execution started (Unix timestamp milliseconds)."""
- state: Literal["running", "canceled", "completed"]
+ state: Literal["running", "canceled", "completed", "failed"]
"""The state of the BenchmarkRun."""
benchmark_id: Optional[str] = None
diff --git a/src/runloop_api_client/types/devbox_create_tunnel_params.py b/src/runloop_api_client/types/devbox_create_tunnel_params.py
deleted file mode 100644
index 5700e37ac..000000000
--- a/src/runloop_api_client/types/devbox_create_tunnel_params.py
+++ /dev/null
@@ -1,12 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from __future__ import annotations
-
-from typing_extensions import Required, TypedDict
-
-__all__ = ["DevboxCreateTunnelParams"]
-
-
-class DevboxCreateTunnelParams(TypedDict, total=False):
- port: Required[int]
- """Devbox port that tunnel will expose."""
diff --git a/src/runloop_api_client/types/devbox_tunnel_view.py b/src/runloop_api_client/types/devbox_tunnel_view.py
deleted file mode 100644
index 48e3b3ac8..000000000
--- a/src/runloop_api_client/types/devbox_tunnel_view.py
+++ /dev/null
@@ -1,16 +0,0 @@
-# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
-
-from .._models import BaseModel
-
-__all__ = ["DevboxTunnelView"]
-
-
-class DevboxTunnelView(BaseModel):
- devbox_id: str
- """ID of the Devbox the tunnel routes to."""
-
- port: int
- """Port of the Devbox the tunnel routes to."""
-
- url: str
- """Public url used to access Devbox."""
diff --git a/tests/api_resources/test_devboxes.py b/tests/api_resources/test_devboxes.py
index 1e25ced15..b7eaeb2f0 100644
--- a/tests/api_resources/test_devboxes.py
+++ b/tests/api_resources/test_devboxes.py
@@ -15,7 +15,6 @@
from runloop_api_client.types import (
DevboxView,
TunnelView,
- DevboxTunnelView,
DevboxSnapshotView,
DevboxResourceUsageView,
DevboxExecutionDetailView,
@@ -295,53 +294,6 @@ def test_path_params_create_ssh_key(self, client: Runloop) -> None:
"",
)
- @parametrize
- def test_method_create_tunnel(self, client: Runloop) -> None:
- with pytest.warns(DeprecationWarning):
- devbox = client.devboxes.create_tunnel(
- id="id",
- port=0,
- )
-
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- @parametrize
- def test_raw_response_create_tunnel(self, client: Runloop) -> None:
- with pytest.warns(DeprecationWarning):
- response = client.devboxes.with_raw_response.create_tunnel(
- id="id",
- port=0,
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- devbox = response.parse()
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- @parametrize
- def test_streaming_response_create_tunnel(self, client: Runloop) -> None:
- with pytest.warns(DeprecationWarning):
- with client.devboxes.with_streaming_response.create_tunnel(
- id="id",
- port=0,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- devbox = response.parse()
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- def test_path_params_create_tunnel(self, client: Runloop) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- client.devboxes.with_raw_response.create_tunnel(
- id="",
- port=0,
- )
-
@parametrize
def test_method_delete_disk_snapshot(self, client: Runloop) -> None:
devbox = client.devboxes.delete_disk_snapshot(
@@ -1963,53 +1915,6 @@ async def test_path_params_create_ssh_key(self, async_client: AsyncRunloop) -> N
"",
)
- @parametrize
- async def test_method_create_tunnel(self, async_client: AsyncRunloop) -> None:
- with pytest.warns(DeprecationWarning):
- devbox = await async_client.devboxes.create_tunnel(
- id="id",
- port=0,
- )
-
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- @parametrize
- async def test_raw_response_create_tunnel(self, async_client: AsyncRunloop) -> None:
- with pytest.warns(DeprecationWarning):
- response = await async_client.devboxes.with_raw_response.create_tunnel(
- id="id",
- port=0,
- )
-
- assert response.is_closed is True
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
- devbox = await response.parse()
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- @parametrize
- async def test_streaming_response_create_tunnel(self, async_client: AsyncRunloop) -> None:
- with pytest.warns(DeprecationWarning):
- async with async_client.devboxes.with_streaming_response.create_tunnel(
- id="id",
- port=0,
- ) as response:
- assert not response.is_closed
- assert response.http_request.headers.get("X-Stainless-Lang") == "python"
-
- devbox = await response.parse()
- assert_matches_type(DevboxTunnelView, devbox, path=["response"])
-
- assert cast(Any, response.is_closed) is True
-
- @parametrize
- async def test_path_params_create_tunnel(self, async_client: AsyncRunloop) -> None:
- with pytest.warns(DeprecationWarning):
- with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
- await async_client.devboxes.with_raw_response.create_tunnel(
- id="",
- port=0,
- )
-
@parametrize
async def test_method_delete_disk_snapshot(self, async_client: AsyncRunloop) -> None:
devbox = await async_client.devboxes.delete_disk_snapshot(
diff --git a/tests/sdk/async_devbox/test_interfaces.py b/tests/sdk/async_devbox/test_interfaces.py
index 49e07c279..7e766ea06 100644
--- a/tests/sdk/async_devbox/test_interfaces.py
+++ b/tests/sdk/async_devbox/test_interfaces.py
@@ -178,26 +178,6 @@ async def test_create_ssh_key(self, mock_async_client: AsyncMock) -> None:
assert result == ssh_key_response
mock_async_client.devboxes.create_ssh_key.assert_called_once()
- @pytest.mark.asyncio
- async def test_create_tunnel(self, mock_async_client: AsyncMock) -> None:
- """Test create tunnel."""
- tunnel_view = SimpleNamespace(tunnel_id="tunnel_123")
- mock_async_client.devboxes.create_tunnel = AsyncMock(return_value=tunnel_view)
-
- devbox = AsyncDevbox(mock_async_client, "dbx_123")
- with pytest.warns(DeprecationWarning, match="create_tunnel is deprecated"):
- result = await devbox.net.create_tunnel(
- port=8080,
- extra_headers={"X-Custom": "value"},
- extra_query={"param": "value"},
- extra_body={"key": "value"},
- timeout=30.0,
- idempotency_key="key-123",
- )
-
- assert result == tunnel_view
- mock_async_client.devboxes.create_tunnel.assert_called_once()
-
@pytest.mark.asyncio
async def test_remove_tunnel(self, mock_async_client: AsyncMock) -> None:
"""Test remove tunnel."""
diff --git a/tests/sdk/devbox/test_interfaces.py b/tests/sdk/devbox/test_interfaces.py
index bca5eada1..401849f28 100644
--- a/tests/sdk/devbox/test_interfaces.py
+++ b/tests/sdk/devbox/test_interfaces.py
@@ -280,33 +280,6 @@ def test_create_ssh_key(self, mock_client: Mock) -> None:
idempotency_key="key-123",
)
- def test_create_tunnel(self, mock_client: Mock) -> None:
- """Test create tunnel."""
- tunnel_view = SimpleNamespace(port=8080)
- mock_client.devboxes.create_tunnel.return_value = tunnel_view
-
- devbox = Devbox(mock_client, "dbx_123")
- with pytest.warns(DeprecationWarning, match="create_tunnel is deprecated"):
- result = devbox.net.create_tunnel(
- port=8080,
- extra_headers={"X-Custom": "value"},
- extra_query={"param": "value"},
- extra_body={"key": "value"},
- timeout=30.0,
- idempotency_key="key-123",
- )
-
- assert result == tunnel_view
- mock_client.devboxes.create_tunnel.assert_called_once_with(
- "dbx_123",
- port=8080,
- extra_headers={"X-Custom": "value"},
- extra_query={"param": "value"},
- extra_body={"key": "value"},
- timeout=30.0,
- idempotency_key="key-123",
- )
-
def test_remove_tunnel(self, mock_client: Mock) -> None:
"""Test remove tunnel."""
mock_client.devboxes.remove_tunnel.return_value = object()