Skip to content

Commit 27c4579

Browse files
feat(api): api update
1 parent 5d9b833 commit 27c4579

25 files changed

Lines changed: 191 additions & 21 deletions

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 92
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-75c0dc94dd629772c98b3e6f763d8b3a1bdb732aa3eb92d49a59fb446fb2410d.yml
3-
openapi_spec_hash: 12286e648ea1156bfa23020ed0c7598b
4-
config_hash: aeb178e14a85ac4cd585f0667484c7c3
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-e5ce0fefdcb08eeb8d337329c89374e8a11a26dd986c75cffd93ad2756fb6ed7.yml
3+
openapi_spec_hash: e2807c1c3955b268937eb33f345dbfe5
4+
config_hash: 60681f589a9e641fdb7f19af2021a033

src/runloop_api_client/resources/benchmarks/benchmarks.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def create(
7070
*,
7171
name: str,
7272
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
73+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
7374
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
7475
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7576
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -87,6 +88,9 @@ def create(
8788
8889
metadata: User defined metadata to attach to the benchmark for organization.
8990
91+
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
92+
supplied, the benchmark will fail to start
93+
9094
scenario_ids: The Scenario IDs that make up the Benchmark.
9195
9296
extra_headers: Send extra headers
@@ -105,6 +109,7 @@ def create(
105109
{
106110
"name": name,
107111
"metadata": metadata,
112+
"required_environment_variables": required_environment_variables,
108113
"scenario_ids": scenario_ids,
109114
},
110115
benchmark_create_params.BenchmarkCreateParams,
@@ -158,6 +163,7 @@ def update(
158163
*,
159164
name: str,
160165
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
166+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
161167
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
162168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
163169
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -175,6 +181,9 @@ def update(
175181
176182
metadata: User defined metadata to attach to the benchmark for organization.
177183
184+
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
185+
supplied, the benchmark will fail to start
186+
178187
scenario_ids: The Scenario IDs that make up the Benchmark.
179188
180189
extra_headers: Send extra headers
@@ -195,6 +204,7 @@ def update(
195204
{
196205
"name": name,
197206
"metadata": metadata,
207+
"required_environment_variables": required_environment_variables,
198208
"scenario_ids": scenario_ids,
199209
},
200210
benchmark_update_params.BenchmarkUpdateParams,
@@ -358,6 +368,7 @@ def start_run(
358368
benchmark_id: str,
359369
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
360370
run_name: Optional[str] | NotGiven = NOT_GIVEN,
371+
run_profile: Optional[benchmark_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
361372
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
362373
# The extra values given here take precedence over values defined on the client or passed to this method.
363374
extra_headers: Headers | None = None,
@@ -376,6 +387,8 @@ def start_run(
376387
377388
run_name: Display name of the run.
378389
390+
run_profile: Runtime configuration to use for this benchmark run
391+
379392
extra_headers: Send extra headers
380393
381394
extra_query: Add additional query parameters to the request
@@ -393,6 +406,7 @@ def start_run(
393406
"benchmark_id": benchmark_id,
394407
"metadata": metadata,
395408
"run_name": run_name,
409+
"run_profile": run_profile,
396410
},
397411
benchmark_start_run_params.BenchmarkStartRunParams,
398412
),
@@ -436,6 +450,7 @@ async def create(
436450
*,
437451
name: str,
438452
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
453+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
439454
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
440455
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
441456
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -453,6 +468,9 @@ async def create(
453468
454469
metadata: User defined metadata to attach to the benchmark for organization.
455470
471+
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
472+
supplied, the benchmark will fail to start
473+
456474
scenario_ids: The Scenario IDs that make up the Benchmark.
457475
458476
extra_headers: Send extra headers
@@ -471,6 +489,7 @@ async def create(
471489
{
472490
"name": name,
473491
"metadata": metadata,
492+
"required_environment_variables": required_environment_variables,
474493
"scenario_ids": scenario_ids,
475494
},
476495
benchmark_create_params.BenchmarkCreateParams,
@@ -524,6 +543,7 @@ async def update(
524543
*,
525544
name: str,
526545
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
546+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
527547
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
528548
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
529549
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -541,6 +561,9 @@ async def update(
541561
542562
metadata: User defined metadata to attach to the benchmark for organization.
543563
564+
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
565+
supplied, the benchmark will fail to start
566+
544567
scenario_ids: The Scenario IDs that make up the Benchmark.
545568
546569
extra_headers: Send extra headers
@@ -561,6 +584,7 @@ async def update(
561584
{
562585
"name": name,
563586
"metadata": metadata,
587+
"required_environment_variables": required_environment_variables,
564588
"scenario_ids": scenario_ids,
565589
},
566590
benchmark_update_params.BenchmarkUpdateParams,
@@ -724,6 +748,7 @@ async def start_run(
724748
benchmark_id: str,
725749
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
726750
run_name: Optional[str] | NotGiven = NOT_GIVEN,
751+
run_profile: Optional[benchmark_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
727752
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
728753
# The extra values given here take precedence over values defined on the client or passed to this method.
729754
extra_headers: Headers | None = None,
@@ -742,6 +767,8 @@ async def start_run(
742767
743768
run_name: Display name of the run.
744769
770+
run_profile: Runtime configuration to use for this benchmark run
771+
745772
extra_headers: Send extra headers
746773
747774
extra_query: Add additional query parameters to the request
@@ -759,6 +786,7 @@ async def start_run(
759786
"benchmark_id": benchmark_id,
760787
"metadata": metadata,
761788
"run_name": run_name,
789+
"run_profile": run_profile,
762790
},
763791
benchmark_start_run_params.BenchmarkStartRunParams,
764792
),

src/runloop_api_client/resources/blueprints.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def create(
8282
8383
dockerfile: Dockerfile contents to be used to build the Blueprint.
8484
85-
file_mounts: (Optional) Map of paths and file contents to write before setup..
85+
file_mounts: (Optional) Map of paths and file contents to write before setup.
8686
8787
launch_parameters: Parameters to configure your Devbox at launch time.
8888
@@ -420,7 +420,7 @@ def preview(
420420
421421
dockerfile: Dockerfile contents to be used to build the Blueprint.
422422
423-
file_mounts: (Optional) Map of paths and file contents to write before setup..
423+
file_mounts: (Optional) Map of paths and file contents to write before setup.
424424
425425
launch_parameters: Parameters to configure your Devbox at launch time.
426426
@@ -511,7 +511,7 @@ async def create(
511511
512512
dockerfile: Dockerfile contents to be used to build the Blueprint.
513513
514-
file_mounts: (Optional) Map of paths and file contents to write before setup..
514+
file_mounts: (Optional) Map of paths and file contents to write before setup.
515515
516516
launch_parameters: Parameters to configure your Devbox at launch time.
517517
@@ -849,7 +849,7 @@ async def preview(
849849
850850
dockerfile: Dockerfile contents to be used to build the Blueprint.
851851
852-
file_mounts: (Optional) Map of paths and file contents to write before setup..
852+
file_mounts: (Optional) Map of paths and file contents to write before setup.
853853
854854
launch_parameters: Parameters to configure your Devbox at launch time.
855855

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Optional
5+
from typing import Dict, List, Optional
66

77
import httpx
88

@@ -90,6 +90,7 @@ def create(
9090
environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN,
9191
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
9292
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
93+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
9394
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9495
# The extra values given here take precedence over values defined on the client or passed to this method.
9596
extra_headers: Headers | None = None,
@@ -117,6 +118,9 @@ def create(
117118
can be the result of a git diff or a sequence of command actions to apply to the
118119
environment.
119120
121+
required_environment_variables: Environment variables required to run the scenario. If these variables are not
122+
provided, the scenario will fail to start.
123+
120124
extra_headers: Send extra headers
121125
122126
extra_query: Add additional query parameters to the request
@@ -137,6 +141,7 @@ def create(
137141
"environment_parameters": environment_parameters,
138142
"metadata": metadata,
139143
"reference_output": reference_output,
144+
"required_environment_variables": required_environment_variables,
140145
},
141146
scenario_create_params.ScenarioCreateParams,
142147
),
@@ -192,6 +197,7 @@ def update(
192197
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
193198
name: Optional[str] | NotGiven = NOT_GIVEN,
194199
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
200+
required_env_vars: Optional[List[str]] | NotGiven = NOT_GIVEN,
195201
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
196202
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
197203
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -219,6 +225,8 @@ def update(
219225
can be the result of a git diff or a sequence of command actions to apply to the
220226
environment.
221227
228+
required_env_vars: Environment variables required to run the benchmark.
229+
222230
scoring_contract: The scoring contract for the Scenario.
223231
224232
extra_headers: Send extra headers
@@ -242,6 +250,7 @@ def update(
242250
"metadata": metadata,
243251
"name": name,
244252
"reference_output": reference_output,
253+
"required_env_vars": required_env_vars,
245254
"scoring_contract": scoring_contract,
246255
},
247256
scenario_update_params.ScenarioUpdateParams,
@@ -369,6 +378,7 @@ def start_run(
369378
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
370379
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
371380
run_name: Optional[str] | NotGiven = NOT_GIVEN,
381+
run_profile: Optional[scenario_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
372382
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
373383
# The extra values given here take precedence over values defined on the client or passed to this method.
374384
extra_headers: Headers | None = None,
@@ -389,6 +399,8 @@ def start_run(
389399
390400
run_name: Display name of the run.
391401
402+
run_profile: Runtime configuration to use for this benchmark run
403+
392404
extra_headers: Send extra headers
393405
394406
extra_query: Add additional query parameters to the request
@@ -407,6 +419,7 @@ def start_run(
407419
"benchmark_run_id": benchmark_run_id,
408420
"metadata": metadata,
409421
"run_name": run_name,
422+
"run_profile": run_profile,
410423
},
411424
scenario_start_run_params.ScenarioStartRunParams,
412425
),
@@ -513,6 +526,7 @@ async def create(
513526
environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN,
514527
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
515528
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
529+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
516530
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
517531
# The extra values given here take precedence over values defined on the client or passed to this method.
518532
extra_headers: Headers | None = None,
@@ -540,6 +554,9 @@ async def create(
540554
can be the result of a git diff or a sequence of command actions to apply to the
541555
environment.
542556
557+
required_environment_variables: Environment variables required to run the scenario. If these variables are not
558+
provided, the scenario will fail to start.
559+
543560
extra_headers: Send extra headers
544561
545562
extra_query: Add additional query parameters to the request
@@ -560,6 +577,7 @@ async def create(
560577
"environment_parameters": environment_parameters,
561578
"metadata": metadata,
562579
"reference_output": reference_output,
580+
"required_environment_variables": required_environment_variables,
563581
},
564582
scenario_create_params.ScenarioCreateParams,
565583
),
@@ -615,6 +633,7 @@ async def update(
615633
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
616634
name: Optional[str] | NotGiven = NOT_GIVEN,
617635
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
636+
required_env_vars: Optional[List[str]] | NotGiven = NOT_GIVEN,
618637
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
619638
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
620639
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -642,6 +661,8 @@ async def update(
642661
can be the result of a git diff or a sequence of command actions to apply to the
643662
environment.
644663
664+
required_env_vars: Environment variables required to run the benchmark.
665+
645666
scoring_contract: The scoring contract for the Scenario.
646667
647668
extra_headers: Send extra headers
@@ -665,6 +686,7 @@ async def update(
665686
"metadata": metadata,
666687
"name": name,
667688
"reference_output": reference_output,
689+
"required_env_vars": required_env_vars,
668690
"scoring_contract": scoring_contract,
669691
},
670692
scenario_update_params.ScenarioUpdateParams,
@@ -792,6 +814,7 @@ async def start_run(
792814
benchmark_run_id: Optional[str] | NotGiven = NOT_GIVEN,
793815
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
794816
run_name: Optional[str] | NotGiven = NOT_GIVEN,
817+
run_profile: Optional[scenario_start_run_params.RunProfile] | NotGiven = NOT_GIVEN,
795818
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
796819
# The extra values given here take precedence over values defined on the client or passed to this method.
797820
extra_headers: Headers | None = None,
@@ -812,6 +835,8 @@ async def start_run(
812835
813836
run_name: Display name of the run.
814837
838+
run_profile: Runtime configuration to use for this benchmark run
839+
815840
extra_headers: Send extra headers
816841
817842
extra_query: Add additional query parameters to the request
@@ -830,6 +855,7 @@ async def start_run(
830855
"benchmark_run_id": benchmark_run_id,
831856
"metadata": metadata,
832857
"run_name": run_name,
858+
"run_profile": run_profile,
833859
},
834860
scenario_start_run_params.ScenarioStartRunParams,
835861
),

src/runloop_api_client/types/benchmark_create_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,11 @@ class BenchmarkCreateParams(TypedDict, total=False):
1515
metadata: Optional[Dict[str, str]]
1616
"""User defined metadata to attach to the benchmark for organization."""
1717

18+
required_environment_variables: Optional[List[str]]
19+
"""Environment variables required to run the benchmark.
20+
21+
If these variables are not supplied, the benchmark will fail to start
22+
"""
23+
1824
scenario_ids: Optional[List[str]]
1925
"""The Scenario IDs that make up the Benchmark."""

src/runloop_api_client/types/benchmark_run_view.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@ class BenchmarkRunView(BaseModel):
2727
duration_ms: Optional[int] = None
2828
"""The duration for the BenchmarkRun to complete."""
2929

30+
environment_variables: Optional[Dict[str, str]] = None
31+
"""Environment variables used to run the benchmark."""
32+
3033
name: Optional[str] = None
3134
"""The name of the BenchmarkRun."""
3235

36+
purpose: Optional[str] = None
37+
"""Purpose of the run."""
38+
3339
score: Optional[float] = None
3440
"""The final score across the BenchmarkRun, present once completed.
3541

0 commit comments

Comments
 (0)