Skip to content

Commit f411cfb

Browse files
feat(benchmark-runs): add state filter and multi-value benchmark_id support to listBenchmarkRuns (#8480)
1 parent 95167df commit f411cfb

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-c33fa67077f6f9cc8cb6d82a71657693f7288e1eff48b7b94099f2f11966b67b.yml
3-
openapi_spec_hash: 4329105152eb16bc5d2063038603ea61
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-8ea4486cd6de6410a6648545710d617f175994f8d12753783585029ce22c225c.yml
3+
openapi_spec_hash: fcb07ce127f4290f1dac51db130365aa
44
config_hash: 6649774d90af30c3559d6a242b6cb4b0

src/runloop_api_client/resources/benchmark_runs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ def list(
8686
limit: int | Omit = omit,
8787
name: str | Omit = omit,
8888
starting_after: str | Omit = omit,
89+
state: str | Omit = omit,
8990
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9091
# The extra values given here take precedence over values defined on the client or passed to this method.
9192
extra_headers: Headers | None = None,
@@ -108,6 +109,8 @@ def list(
108109
109110
starting_after: Load the next page of data starting after the item with the given ID.
110111
112+
state: Filter by state
113+
111114
extra_headers: Send extra headers
112115
113116
extra_query: Add additional query parameters to the request
@@ -131,6 +134,7 @@ def list(
131134
"limit": limit,
132135
"name": name,
133136
"starting_after": starting_after,
137+
"state": state,
134138
},
135139
benchmark_run_list_params.BenchmarkRunListParams,
136140
),
@@ -342,6 +346,7 @@ def list(
342346
limit: int | Omit = omit,
343347
name: str | Omit = omit,
344348
starting_after: str | Omit = omit,
349+
state: str | Omit = omit,
345350
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
346351
# The extra values given here take precedence over values defined on the client or passed to this method.
347352
extra_headers: Headers | None = None,
@@ -364,6 +369,8 @@ def list(
364369
365370
starting_after: Load the next page of data starting after the item with the given ID.
366371
372+
state: Filter by state
373+
367374
extra_headers: Send extra headers
368375
369376
extra_query: Add additional query parameters to the request
@@ -387,6 +394,7 @@ def list(
387394
"limit": limit,
388395
"name": name,
389396
"starting_after": starting_after,
397+
"state": state,
390398
},
391399
benchmark_run_list_params.BenchmarkRunListParams,
392400
),

src/runloop_api_client/types/benchmark_run_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,6 @@ class BenchmarkRunListParams(TypedDict, total=False):
2525

2626
starting_after: str
2727
"""Load the next page of data starting after the item with the given ID."""
28+
29+
state: str
30+
"""Filter by state"""

tests/api_resources/test_benchmark_runs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def test_method_list_with_all_params(self, client: Runloop) -> None:
7272
limit=0,
7373
name="name",
7474
starting_after="starting_after",
75+
state="state",
7576
)
7677
assert_matches_type(SyncBenchmarkRunsCursorIDPage[BenchmarkRunView], benchmark_run, path=["response"])
7778

@@ -277,6 +278,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncRunloop) ->
277278
limit=0,
278279
name="name",
279280
starting_after="starting_after",
281+
state="state",
280282
)
281283
assert_matches_type(AsyncBenchmarkRunsCursorIDPage[BenchmarkRunView], benchmark_run, path=["response"])
282284

0 commit comments

Comments
 (0)