diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 8ea07c9a4..1b5dc400b 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.38.0"
+ ".": "0.39.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 2c30b1fb9..aacf02853 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
-configured_endpoints: 86
+configured_endpoints: 87
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-4cd38d2f4180cc9bd949f182a221d6221c44e7e0ec1ddc110dd7677ba822b51a.yml
openapi_spec_hash: e186fd7fd5f09ba496f0b7bb87365f3b
-config_hash: 5b50498887b4fdca175b8377a9cb675f
+config_hash: 4514558503b7aa6eba8c2941564c247d
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 79a1540ec..7542cc0e3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.39.0 (2025-06-04)
+
+Full Changelog: [v0.38.0...v0.39.0](https://github.com/runloopai/api-client-python/compare/v0.38.0...v0.39.0)
+
+### Features
+
+* **api:** api update ([fbabb53](https://github.com/runloopai/api-client-python/commit/fbabb538a0dc6662841cb4cb4e489dae3f4f4e4c))
+* **api:** api update ([7fa8636](https://github.com/runloopai/api-client-python/commit/7fa8636459ea96553b9d65a4475fce3815c1b2e7))
+
## 0.38.0 (2025-06-04)
Full Changelog: [v0.37.0...v0.38.0](https://github.com/runloopai/api-client-python/compare/v0.37.0...v0.38.0)
diff --git a/api.md b/api.md
index 7e511f221..c8fd0e94e 100644
--- a/api.md
+++ b/api.md
@@ -14,6 +14,7 @@ from runloop_api_client.types import (
BenchmarkRunListView,
BenchmarkRunView,
BenchmarkView,
+ ScenarioDefinitionListView,
StartBenchmarkRunParameters,
)
```
@@ -24,6 +25,7 @@ Methods:
- client.benchmarks.retrieve(id) -> BenchmarkView
- client.benchmarks.update(id, \*\*params) -> BenchmarkView
- client.benchmarks.list(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkView]
+- client.benchmarks.definitions(id, \*\*params) -> ScenarioDefinitionListView
- client.benchmarks.list_public(\*\*params) -> SyncBenchmarksCursorIDPage[BenchmarkView]
- client.benchmarks.start_run(\*\*params) -> BenchmarkRunView
diff --git a/pyproject.toml b/pyproject.toml
index 4583fb652..2a900f11a 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[project]
name = "runloop_api_client"
-version = "0.38.0"
+version = "0.39.0"
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 700ae89d1..b6c29df97 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__ = "0.38.0" # x-release-please-version
+__version__ = "0.39.0" # x-release-please-version
diff --git a/src/runloop_api_client/resources/benchmarks/benchmarks.py b/src/runloop_api_client/resources/benchmarks/benchmarks.py
index fdbb65b22..65381f93d 100644
--- a/src/runloop_api_client/resources/benchmarks/benchmarks.py
+++ b/src/runloop_api_client/resources/benchmarks/benchmarks.py
@@ -19,6 +19,7 @@
benchmark_create_params,
benchmark_update_params,
benchmark_start_run_params,
+ benchmark_definitions_params,
benchmark_list_public_params,
)
from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven
@@ -35,6 +36,7 @@
from ..._base_client import AsyncPaginator, make_request_options
from ...types.benchmark_view import BenchmarkView
from ...types.benchmark_run_view import BenchmarkRunView
+from ...types.scenario_definition_list_view import ScenarioDefinitionListView
__all__ = ["BenchmarksResource", "AsyncBenchmarksResource"]
@@ -262,6 +264,55 @@ def list(
model=BenchmarkView,
)
+ def definitions(
+ self,
+ id: str,
+ *,
+ limit: int | NotGiven = NOT_GIVEN,
+ starting_after: str | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> ScenarioDefinitionListView:
+ """
+ Get scenario definitions for a previously created Benchmark.
+
+ Args:
+ limit: The limit of items to return. Default is 20.
+
+ starting_after: Load the next page of data starting after the item with the given ID.
+
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return self._get(
+ f"/v1/benchmarks/{id}/definitions",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=maybe_transform(
+ {
+ "limit": limit,
+ "starting_after": starting_after,
+ },
+ benchmark_definitions_params.BenchmarkDefinitionsParams,
+ ),
+ ),
+ cast_to=ScenarioDefinitionListView,
+ )
+
def list_public(
self,
*,
@@ -587,6 +638,55 @@ def list(
model=BenchmarkView,
)
+ async def definitions(
+ self,
+ id: str,
+ *,
+ limit: int | NotGiven = NOT_GIVEN,
+ starting_after: str | NotGiven = NOT_GIVEN,
+ # 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,
+ ) -> ScenarioDefinitionListView:
+ """
+ Get scenario definitions for a previously created Benchmark.
+
+ Args:
+ limit: The limit of items to return. Default is 20.
+
+ starting_after: Load the next page of data starting after the item with the given ID.
+
+ 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
+ """
+ if not id:
+ raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
+ return await self._get(
+ f"/v1/benchmarks/{id}/definitions",
+ options=make_request_options(
+ extra_headers=extra_headers,
+ extra_query=extra_query,
+ extra_body=extra_body,
+ timeout=timeout,
+ query=await async_maybe_transform(
+ {
+ "limit": limit,
+ "starting_after": starting_after,
+ },
+ benchmark_definitions_params.BenchmarkDefinitionsParams,
+ ),
+ ),
+ cast_to=ScenarioDefinitionListView,
+ )
+
def list_public(
self,
*,
@@ -705,6 +805,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.list = to_raw_response_wrapper(
benchmarks.list,
)
+ self.definitions = to_raw_response_wrapper(
+ benchmarks.definitions,
+ )
self.list_public = to_raw_response_wrapper(
benchmarks.list_public,
)
@@ -733,6 +836,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.list = async_to_raw_response_wrapper(
benchmarks.list,
)
+ self.definitions = async_to_raw_response_wrapper(
+ benchmarks.definitions,
+ )
self.list_public = async_to_raw_response_wrapper(
benchmarks.list_public,
)
@@ -761,6 +867,9 @@ def __init__(self, benchmarks: BenchmarksResource) -> None:
self.list = to_streamed_response_wrapper(
benchmarks.list,
)
+ self.definitions = to_streamed_response_wrapper(
+ benchmarks.definitions,
+ )
self.list_public = to_streamed_response_wrapper(
benchmarks.list_public,
)
@@ -789,6 +898,9 @@ def __init__(self, benchmarks: AsyncBenchmarksResource) -> None:
self.list = async_to_streamed_response_wrapper(
benchmarks.list,
)
+ self.definitions = async_to_streamed_response_wrapper(
+ benchmarks.definitions,
+ )
self.list_public = async_to_streamed_response_wrapper(
benchmarks.list_public,
)
diff --git a/src/runloop_api_client/types/__init__.py b/src/runloop_api_client/types/__init__.py
index ac900e84d..eff9bd405 100644
--- a/src/runloop_api_client/types/__init__.py
+++ b/src/runloop_api_client/types/__init__.py
@@ -57,11 +57,13 @@
from .devbox_remove_tunnel_params import DevboxRemoveTunnelParams as DevboxRemoveTunnelParams
from .devbox_snapshot_disk_params import DevboxSnapshotDiskParams as DevboxSnapshotDiskParams
from .scenario_list_public_params import ScenarioListPublicParams as ScenarioListPublicParams
+from .benchmark_definitions_params import BenchmarkDefinitionsParams as BenchmarkDefinitionsParams
from .benchmark_list_public_params import BenchmarkListPublicParams as BenchmarkListPublicParams
from .devbox_execution_detail_view import DevboxExecutionDetailView as DevboxExecutionDetailView
from .scoring_contract_result_view import ScoringContractResultView as ScoringContractResultView
from .scoring_function_result_view import ScoringFunctionResultView as ScoringFunctionResultView
from .repository_inspection_details import RepositoryInspectionDetails as RepositoryInspectionDetails
+from .scenario_definition_list_view import ScenarioDefinitionListView as ScenarioDefinitionListView
from .blueprint_build_logs_list_view import BlueprintBuildLogsListView as BlueprintBuildLogsListView
from .devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse as DevboxCreateSSHKeyResponse
from .repository_connection_list_view import RepositoryConnectionListView as RepositoryConnectionListView
diff --git a/src/runloop_api_client/types/benchmark_definitions_params.py b/src/runloop_api_client/types/benchmark_definitions_params.py
new file mode 100644
index 000000000..f92d57d76
--- /dev/null
+++ b/src/runloop_api_client/types/benchmark_definitions_params.py
@@ -0,0 +1,15 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from __future__ import annotations
+
+from typing_extensions import TypedDict
+
+__all__ = ["BenchmarkDefinitionsParams"]
+
+
+class BenchmarkDefinitionsParams(TypedDict, total=False):
+ limit: int
+ """The limit of items to return. Default is 20."""
+
+ starting_after: str
+ """Load the next page of data starting after the item with the given ID."""
diff --git a/src/runloop_api_client/types/scenario_definition_list_view.py b/src/runloop_api_client/types/scenario_definition_list_view.py
new file mode 100644
index 000000000..5aa4ac3e4
--- /dev/null
+++ b/src/runloop_api_client/types/scenario_definition_list_view.py
@@ -0,0 +1,19 @@
+# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
+
+from typing import List
+
+from .._models import BaseModel
+from .scenario_view import ScenarioView
+
+__all__ = ["ScenarioDefinitionListView"]
+
+
+class ScenarioDefinitionListView(BaseModel):
+ has_more: bool
+
+ remaining_count: int
+
+ scenarios: List[ScenarioView]
+ """List of Scenarios matching filter."""
+
+ total_count: int
diff --git a/tests/api_resources/test_benchmarks.py b/tests/api_resources/test_benchmarks.py
index 0d70ef3c8..c065cd847 100644
--- a/tests/api_resources/test_benchmarks.py
+++ b/tests/api_resources/test_benchmarks.py
@@ -12,6 +12,7 @@
from runloop_api_client.types import (
BenchmarkView,
BenchmarkRunView,
+ ScenarioDefinitionListView,
)
from runloop_api_client.pagination import SyncBenchmarksCursorIDPage, AsyncBenchmarksCursorIDPage
@@ -193,6 +194,53 @@ def test_streaming_response_list(self, client: Runloop) -> None:
assert cast(Any, response.is_closed) is True
+ @parametrize
+ def test_method_definitions(self, client: Runloop) -> None:
+ benchmark = client.benchmarks.definitions(
+ id="id",
+ )
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ def test_method_definitions_with_all_params(self, client: Runloop) -> None:
+ benchmark = client.benchmarks.definitions(
+ id="id",
+ limit=0,
+ starting_after="starting_after",
+ )
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ def test_raw_response_definitions(self, client: Runloop) -> None:
+ response = client.benchmarks.with_raw_response.definitions(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ benchmark = response.parse()
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ def test_streaming_response_definitions(self, client: Runloop) -> None:
+ with client.benchmarks.with_streaming_response.definitions(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ benchmark = response.parse()
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ def test_path_params_definitions(self, client: Runloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ client.benchmarks.with_raw_response.definitions(
+ id="",
+ )
+
@parametrize
def test_method_list_public(self, client: Runloop) -> None:
benchmark = client.benchmarks.list_public()
@@ -442,6 +490,53 @@ async def test_streaming_response_list(self, async_client: AsyncRunloop) -> None
assert cast(Any, response.is_closed) is True
+ @parametrize
+ async def test_method_definitions(self, async_client: AsyncRunloop) -> None:
+ benchmark = await async_client.benchmarks.definitions(
+ id="id",
+ )
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ async def test_method_definitions_with_all_params(self, async_client: AsyncRunloop) -> None:
+ benchmark = await async_client.benchmarks.definitions(
+ id="id",
+ limit=0,
+ starting_after="starting_after",
+ )
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ async def test_raw_response_definitions(self, async_client: AsyncRunloop) -> None:
+ response = await async_client.benchmarks.with_raw_response.definitions(
+ id="id",
+ )
+
+ assert response.is_closed is True
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+ benchmark = await response.parse()
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ @parametrize
+ async def test_streaming_response_definitions(self, async_client: AsyncRunloop) -> None:
+ async with async_client.benchmarks.with_streaming_response.definitions(
+ id="id",
+ ) as response:
+ assert not response.is_closed
+ assert response.http_request.headers.get("X-Stainless-Lang") == "python"
+
+ benchmark = await response.parse()
+ assert_matches_type(ScenarioDefinitionListView, benchmark, path=["response"])
+
+ assert cast(Any, response.is_closed) is True
+
+ @parametrize
+ async def test_path_params_definitions(self, async_client: AsyncRunloop) -> None:
+ with pytest.raises(ValueError, match=r"Expected a non-empty value for `id` but received ''"):
+ await async_client.benchmarks.with_raw_response.definitions(
+ id="",
+ )
+
@parametrize
async def test_method_list_public(self, async_client: AsyncRunloop) -> None:
benchmark = await async_client.benchmarks.list_public()