Skip to content

Commit eb6d1ba

Browse files
feat(api): api update (#586)
1 parent adf9a26 commit eb6d1ba

31 files changed

Lines changed: 439 additions & 211 deletions

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 78
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-3542d28a321a2d5ae372d8e99dc615fbda814a223e1c15717c37727a1dd00ff1.yml
3-
openapi_spec_hash: a7a209abf76a123e47e7cd4fe0b10597
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-d0a6e2309db88a60f84521dd672c4beac96b1fcda6145c045fa1251f5bcd4e4f.yml
3+
openapi_spec_hash: b618fb05e03c155c45d16d6a62093106
44
config_hash: 84dec0743c13de8bb22f976814deaae9

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ devbox_view = client.devboxes.create(
156156
"custom_gb_memory": 0,
157157
"keep_alive_time_seconds": 0,
158158
"launch_commands": ["string"],
159-
"resource_size_request": "SMALL",
159+
"resource_size_request": "X_SMALL",
160160
},
161161
)
162162
print(devbox_view.launch_parameters)

‎api.md‎

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@ Types:
1111
```python
1212
from runloop_api_client.types import (
1313
BenchmarkCreateParameters,
14-
BenchmarkListView,
1514
BenchmarkRunListView,
1615
BenchmarkRunView,
17-
BenchmarkView,
1816
StartBenchmarkRunParameters,
17+
BenchmarkCreateResponse,
18+
BenchmarkRetrieveResponse,
19+
BenchmarkListResponse,
20+
BenchmarkListPublicResponse,
1921
)
2022
```
2123

2224
Methods:
2325

24-
- <code title="post /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">create</a>(\*\*<a href="src/runloop_api_client/types/benchmark_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
25-
- <code title="get /v1/benchmarks/{id}">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_view.py">BenchmarkView</a></code>
26-
- <code title="get /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
27-
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_view.py">SyncBenchmarksCursorIDPage[BenchmarkView]</a></code>
26+
- <code title="post /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">create</a>(\*\*<a href="src/runloop_api_client/types/benchmark_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_create_response.py">BenchmarkCreateResponse</a></code>
27+
- <code title="get /v1/benchmarks/{id}">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/benchmark_retrieve_response.py">BenchmarkRetrieveResponse</a></code>
28+
- <code title="get /v1/benchmarks">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_list_response.py">SyncBenchmarksCursorIDPage[BenchmarkListResponse]</a></code>
29+
- <code title="get /v1/benchmarks/list_public">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/benchmark_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_list_public_response.py">SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]</a></code>
2830
- <code title="post /v1/benchmarks/start_run">client.benchmarks.<a href="./src/runloop_api_client/resources/benchmarks/benchmarks.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/benchmark_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/benchmark_run_view.py">BenchmarkRunView</a></code>
2931

3032
## Runs
@@ -75,6 +77,7 @@ from runloop_api_client.types import (
7577
DevboxDeleteDiskSnapshotResponse,
7678
DevboxKeepAliveResponse,
7779
DevboxReadFileContentsResponse,
80+
DevboxRemoveTunnelResponse,
7881
DevboxUploadFileResponse,
7982
)
8083
```
@@ -94,7 +97,7 @@ Methods:
9497
- <code title="post /v1/devboxes/{id}/keep_alive">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">keep_alive</a>(id) -> <a href="./src/runloop_api_client/types/devbox_keep_alive_response.py">object</a></code>
9598
- <code title="get /v1/devboxes/disk_snapshots">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">list_disk_snapshots</a>(\*\*<a href="src/runloop_api_client/types/devbox_list_disk_snapshots_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">SyncDiskSnapshotsCursorIDPage[DevboxSnapshotView]</a></code>
9699
- <code title="post /v1/devboxes/{id}/read_file_contents">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">read_file_contents</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_read_file_contents_params.py">params</a>) -> str</code>
97-
- <code title="post /v1/devboxes/{id}/remove_tunnel">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">remove_tunnel</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_remove_tunnel_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_tunnel_view.py">DevboxTunnelView</a></code>
100+
- <code title="post /v1/devboxes/{id}/remove_tunnel">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">remove_tunnel</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_remove_tunnel_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_remove_tunnel_response.py">object</a></code>
98101
- <code title="post /v1/devboxes/{id}/resume">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">resume</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
99102
- <code title="post /v1/devboxes/{id}/shutdown">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">shutdown</a>(id) -> <a href="./src/runloop_api_client/types/devbox_view.py">DevboxView</a></code>
100103
- <code title="post /v1/devboxes/{id}/snapshot_disk">client.devboxes.<a href="./src/runloop_api_client/resources/devboxes/devboxes.py">snapshot_disk</a>(id, \*\*<a href="src/runloop_api_client/types/devbox_snapshot_disk_params.py">params</a>) -> <a href="./src/runloop_api_client/types/devbox_snapshot_view.py">DevboxSnapshotView</a></code>
@@ -262,25 +265,28 @@ from runloop_api_client.types import (
262265
InputContext,
263266
ScenarioCreateParameters,
264267
ScenarioEnvironment,
265-
ScenarioListView,
266268
ScenarioRunListView,
267269
ScenarioRunView,
268-
ScenarioView,
269270
ScoringContract,
270271
ScoringContractResultView,
271272
ScoringFunction,
272273
ScoringFunctionResultView,
273274
StartScenarioRunParameters,
275+
ScenarioCreateResponse,
276+
ScenarioRetrieveResponse,
277+
ScenarioUpdateResponse,
278+
ScenarioListResponse,
279+
ScenarioListPublicResponse,
274280
)
275281
```
276282

277283
Methods:
278284

279-
- <code title="post /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">create</a>(\*\*<a href="src/runloop_api_client/types/scenario_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
280-
- <code title="get /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
281-
- <code title="post /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/scenario_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">ScenarioView</a></code>
282-
- <code title="get /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
283-
- <code title="get /v1/scenarios/list_public">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_view.py">SyncScenariosCursorIDPage[ScenarioView]</a></code>
285+
- <code title="post /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">create</a>(\*\*<a href="src/runloop_api_client/types/scenario_create_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_create_response.py">ScenarioCreateResponse</a></code>
286+
- <code title="get /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">retrieve</a>(id) -> <a href="./src/runloop_api_client/types/scenario_retrieve_response.py">ScenarioRetrieveResponse</a></code>
287+
- <code title="post /v1/scenarios/{id}">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">update</a>(id, \*\*<a href="src/runloop_api_client/types/scenario_update_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_update_response.py">ScenarioUpdateResponse</a></code>
288+
- <code title="get /v1/scenarios">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_list_response.py">SyncScenariosCursorIDPage[ScenarioListResponse]</a></code>
289+
- <code title="get /v1/scenarios/list_public">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">list_public</a>(\*\*<a href="src/runloop_api_client/types/scenario_list_public_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_list_public_response.py">SyncScenariosCursorIDPage[ScenarioListPublicResponse]</a></code>
284290
- <code title="post /v1/scenarios/start_run">client.scenarios.<a href="./src/runloop_api_client/resources/scenarios/scenarios.py">start_run</a>(\*\*<a href="src/runloop_api_client/types/scenario_start_run_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
285291

286292
## Runs

‎src/runloop_api_client/resources/benchmarks/benchmarks.py‎

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,11 @@
3535
)
3636
from ...pagination import SyncBenchmarksCursorIDPage, AsyncBenchmarksCursorIDPage
3737
from ..._base_client import AsyncPaginator, make_request_options
38-
from ...types.benchmark_view import BenchmarkView
3938
from ...types.benchmark_run_view import BenchmarkRunView
39+
from ...types.benchmark_list_response import BenchmarkListResponse
40+
from ...types.benchmark_create_response import BenchmarkCreateResponse
41+
from ...types.benchmark_retrieve_response import BenchmarkRetrieveResponse
42+
from ...types.benchmark_list_public_response import BenchmarkListPublicResponse
4043

4144
__all__ = ["BenchmarksResource", "AsyncBenchmarksResource"]
4245

@@ -78,7 +81,7 @@ def create(
7881
extra_body: Body | None = None,
7982
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
8083
idempotency_key: str | None = None,
81-
) -> BenchmarkView:
84+
) -> BenchmarkCreateResponse:
8285
"""
8386
Create a Benchmark with a set of Scenarios.
8487
@@ -116,7 +119,7 @@ def create(
116119
timeout=timeout,
117120
idempotency_key=idempotency_key,
118121
),
119-
cast_to=BenchmarkView,
122+
cast_to=BenchmarkCreateResponse,
120123
)
121124

122125
def retrieve(
@@ -129,7 +132,7 @@ def retrieve(
129132
extra_query: Query | None = None,
130133
extra_body: Body | None = None,
131134
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
132-
) -> BenchmarkView:
135+
) -> BenchmarkRetrieveResponse:
133136
"""
134137
Get a previously created Benchmark.
135138
@@ -149,7 +152,7 @@ def retrieve(
149152
options=make_request_options(
150153
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
151154
),
152-
cast_to=BenchmarkView,
155+
cast_to=BenchmarkRetrieveResponse,
153156
)
154157

155158
def list(
@@ -163,7 +166,7 @@ def list(
163166
extra_query: Query | None = None,
164167
extra_body: Body | None = None,
165168
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
166-
) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
169+
) -> SyncBenchmarksCursorIDPage[BenchmarkListResponse]:
167170
"""
168171
List all Benchmarks matching filter.
169172
@@ -182,7 +185,7 @@ def list(
182185
"""
183186
return self._get_api_list(
184187
"/v1/benchmarks",
185-
page=SyncBenchmarksCursorIDPage[BenchmarkView],
188+
page=SyncBenchmarksCursorIDPage[BenchmarkListResponse],
186189
options=make_request_options(
187190
extra_headers=extra_headers,
188191
extra_query=extra_query,
@@ -196,7 +199,7 @@ def list(
196199
benchmark_list_params.BenchmarkListParams,
197200
),
198201
),
199-
model=BenchmarkView,
202+
model=BenchmarkListResponse,
200203
)
201204

202205
def list_public(
@@ -210,7 +213,7 @@ def list_public(
210213
extra_query: Query | None = None,
211214
extra_body: Body | None = None,
212215
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
213-
) -> SyncBenchmarksCursorIDPage[BenchmarkView]:
216+
) -> SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]:
214217
"""
215218
List all public benchmarks matching filter.
216219
@@ -229,7 +232,7 @@ def list_public(
229232
"""
230233
return self._get_api_list(
231234
"/v1/benchmarks/list_public",
232-
page=SyncBenchmarksCursorIDPage[BenchmarkView],
235+
page=SyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
233236
options=make_request_options(
234237
extra_headers=extra_headers,
235238
extra_query=extra_query,
@@ -243,7 +246,7 @@ def list_public(
243246
benchmark_list_public_params.BenchmarkListPublicParams,
244247
),
245248
),
246-
model=BenchmarkView,
249+
model=BenchmarkListPublicResponse,
247250
)
248251

249252
def start_run(
@@ -338,7 +341,7 @@ async def create(
338341
extra_body: Body | None = None,
339342
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
340343
idempotency_key: str | None = None,
341-
) -> BenchmarkView:
344+
) -> BenchmarkCreateResponse:
342345
"""
343346
Create a Benchmark with a set of Scenarios.
344347
@@ -376,7 +379,7 @@ async def create(
376379
timeout=timeout,
377380
idempotency_key=idempotency_key,
378381
),
379-
cast_to=BenchmarkView,
382+
cast_to=BenchmarkCreateResponse,
380383
)
381384

382385
async def retrieve(
@@ -389,7 +392,7 @@ async def retrieve(
389392
extra_query: Query | None = None,
390393
extra_body: Body | None = None,
391394
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
392-
) -> BenchmarkView:
395+
) -> BenchmarkRetrieveResponse:
393396
"""
394397
Get a previously created Benchmark.
395398
@@ -409,7 +412,7 @@ async def retrieve(
409412
options=make_request_options(
410413
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
411414
),
412-
cast_to=BenchmarkView,
415+
cast_to=BenchmarkRetrieveResponse,
413416
)
414417

415418
def list(
@@ -423,7 +426,7 @@ def list(
423426
extra_query: Query | None = None,
424427
extra_body: Body | None = None,
425428
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
426-
) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
429+
) -> AsyncPaginator[BenchmarkListResponse, AsyncBenchmarksCursorIDPage[BenchmarkListResponse]]:
427430
"""
428431
List all Benchmarks matching filter.
429432
@@ -442,7 +445,7 @@ def list(
442445
"""
443446
return self._get_api_list(
444447
"/v1/benchmarks",
445-
page=AsyncBenchmarksCursorIDPage[BenchmarkView],
448+
page=AsyncBenchmarksCursorIDPage[BenchmarkListResponse],
446449
options=make_request_options(
447450
extra_headers=extra_headers,
448451
extra_query=extra_query,
@@ -456,7 +459,7 @@ def list(
456459
benchmark_list_params.BenchmarkListParams,
457460
),
458461
),
459-
model=BenchmarkView,
462+
model=BenchmarkListResponse,
460463
)
461464

462465
def list_public(
@@ -470,7 +473,7 @@ def list_public(
470473
extra_query: Query | None = None,
471474
extra_body: Body | None = None,
472475
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
473-
) -> AsyncPaginator[BenchmarkView, AsyncBenchmarksCursorIDPage[BenchmarkView]]:
476+
) -> AsyncPaginator[BenchmarkListPublicResponse, AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse]]:
474477
"""
475478
List all public benchmarks matching filter.
476479
@@ -489,7 +492,7 @@ def list_public(
489492
"""
490493
return self._get_api_list(
491494
"/v1/benchmarks/list_public",
492-
page=AsyncBenchmarksCursorIDPage[BenchmarkView],
495+
page=AsyncBenchmarksCursorIDPage[BenchmarkListPublicResponse],
493496
options=make_request_options(
494497
extra_headers=extra_headers,
495498
extra_query=extra_query,
@@ -503,7 +506,7 @@ def list_public(
503506
benchmark_list_public_params.BenchmarkListPublicParams,
504507
),
505508
),
506-
model=BenchmarkView,
509+
model=BenchmarkListPublicResponse,
507510
)
508511

509512
async def start_run(

‎src/runloop_api_client/resources/devboxes/devboxes.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,7 +973,7 @@ def remove_tunnel(
973973
extra_body: Body | None = None,
974974
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
975975
idempotency_key: str | None = None,
976-
) -> DevboxTunnelView:
976+
) -> object:
977977
"""
978978
Remove a previously opened tunnel on the Devbox.
979979
@@ -1002,7 +1002,7 @@ def remove_tunnel(
10021002
timeout=timeout,
10031003
idempotency_key=idempotency_key,
10041004
),
1005-
cast_to=DevboxTunnelView,
1005+
cast_to=object,
10061006
)
10071007

10081008
def resume(
@@ -2159,7 +2159,7 @@ async def remove_tunnel(
21592159
extra_body: Body | None = None,
21602160
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
21612161
idempotency_key: str | None = None,
2162-
) -> DevboxTunnelView:
2162+
) -> object:
21632163
"""
21642164
Remove a previously opened tunnel on the Devbox.
21652165
@@ -2188,7 +2188,7 @@ async def remove_tunnel(
21882188
timeout=timeout,
21892189
idempotency_key=idempotency_key,
21902190
),
2191-
cast_to=DevboxTunnelView,
2191+
cast_to=object,
21922192
)
21932193

21942194
async def resume(

0 commit comments

Comments
 (0)