Skip to content

Commit 49a39e1

Browse files
feat(api): api update
1 parent dea9dc5 commit 49a39e1

21 files changed

Lines changed: 199 additions & 30 deletions

.stats.yml

Lines changed: 2 additions & 2 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-bbb5c731b774122662526cc0b24015828012b1f09bb32fe2d54498aa09e52c92.yml
3-
openapi_spec_hash: 3d23e89561895724da8d48967dd26f17
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-2417f3ff96b2f0934e6ee5cafd072e111515712cebb58eff3690bda46b9e04d8.yml
3+
openapi_spec_hash: 15877c256d01485dacbb4e348d79845d
44
config_hash: 60681f589a9e641fdb7f19af2021a033

src/runloop_api_client/resources/benchmarks/benchmarks.py

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def create(
7171
name: str,
7272
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
7373
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
74+
required_secrets: List[str] | NotGiven = NOT_GIVEN,
7475
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
7576
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
7677
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -88,8 +89,12 @@ def create(
8889
8990
metadata: User defined metadata to attach to the benchmark for organization.
9091
91-
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
92-
supplied, the benchmark will fail to start
92+
required_environment_variables: Environment variables required to run the benchmark. If any required variables
93+
are not supplied, the benchmark will fail to start
94+
95+
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
96+
benchmark required secret name). If any of these secrets are not provided or the
97+
mapping is incorrect, the benchmark will fail to start.
9398
9499
scenario_ids: The Scenario IDs that make up the Benchmark.
95100
@@ -110,6 +115,7 @@ def create(
110115
"name": name,
111116
"metadata": metadata,
112117
"required_environment_variables": required_environment_variables,
118+
"required_secrets": required_secrets,
113119
"scenario_ids": scenario_ids,
114120
},
115121
benchmark_create_params.BenchmarkCreateParams,
@@ -164,6 +170,7 @@ def update(
164170
name: str,
165171
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
166172
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
173+
required_secrets: List[str] | NotGiven = NOT_GIVEN,
167174
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
168175
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
169176
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -181,8 +188,12 @@ def update(
181188
182189
metadata: User defined metadata to attach to the benchmark for organization.
183190
184-
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
185-
supplied, the benchmark will fail to start
191+
required_environment_variables: Environment variables required to run the benchmark. If any required variables
192+
are not supplied, the benchmark will fail to start
193+
194+
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
195+
benchmark required secret name). If any of these secrets are not provided or the
196+
mapping is incorrect, the benchmark will fail to start.
186197
187198
scenario_ids: The Scenario IDs that make up the Benchmark.
188199
@@ -205,6 +216,7 @@ def update(
205216
"name": name,
206217
"metadata": metadata,
207218
"required_environment_variables": required_environment_variables,
219+
"required_secrets": required_secrets,
208220
"scenario_ids": scenario_ids,
209221
},
210222
benchmark_update_params.BenchmarkUpdateParams,
@@ -451,6 +463,7 @@ async def create(
451463
name: str,
452464
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
453465
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
466+
required_secrets: List[str] | NotGiven = NOT_GIVEN,
454467
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
455468
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
456469
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -468,8 +481,12 @@ async def create(
468481
469482
metadata: User defined metadata to attach to the benchmark for organization.
470483
471-
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
472-
supplied, the benchmark will fail to start
484+
required_environment_variables: Environment variables required to run the benchmark. If any required variables
485+
are not supplied, the benchmark will fail to start
486+
487+
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
488+
benchmark required secret name). If any of these secrets are not provided or the
489+
mapping is incorrect, the benchmark will fail to start.
473490
474491
scenario_ids: The Scenario IDs that make up the Benchmark.
475492
@@ -490,6 +507,7 @@ async def create(
490507
"name": name,
491508
"metadata": metadata,
492509
"required_environment_variables": required_environment_variables,
510+
"required_secrets": required_secrets,
493511
"scenario_ids": scenario_ids,
494512
},
495513
benchmark_create_params.BenchmarkCreateParams,
@@ -544,6 +562,7 @@ async def update(
544562
name: str,
545563
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
546564
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
565+
required_secrets: List[str] | NotGiven = NOT_GIVEN,
547566
scenario_ids: Optional[List[str]] | NotGiven = NOT_GIVEN,
548567
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
549568
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -561,8 +580,12 @@ async def update(
561580
562581
metadata: User defined metadata to attach to the benchmark for organization.
563582
564-
required_environment_variables: Environment variables required to run the benchmark. If these variables are not
565-
supplied, the benchmark will fail to start
583+
required_environment_variables: Environment variables required to run the benchmark. If any required variables
584+
are not supplied, the benchmark will fail to start
585+
586+
required_secrets: Secrets required to run the benchmark with (user secret name will be mapped to
587+
benchmark required secret name). If any of these secrets are not provided or the
588+
mapping is incorrect, the benchmark will fail to start.
566589
567590
scenario_ids: The Scenario IDs that make up the Benchmark.
568591
@@ -585,6 +608,7 @@ async def update(
585608
"name": name,
586609
"metadata": metadata,
587610
"required_environment_variables": required_environment_variables,
611+
"required_secrets": required_secrets,
588612
"scenario_ids": scenario_ids,
589613
},
590614
benchmark_update_params.BenchmarkUpdateParams,

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ def create(
9191
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
9292
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
9393
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
94+
required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN,
9495
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
9596
# The extra values given here take precedence over values defined on the client or passed to this method.
9697
extra_headers: Headers | None = None,
@@ -121,6 +122,10 @@ def create(
121122
required_environment_variables: Environment variables required to run the scenario. If these variables are not
122123
provided, the scenario will fail to start.
123124
125+
required_secret_names: Secrets required to run the scenario (user secret name to scenario required
126+
secret name). If these secrets are not provided or the mapping is incorrect, the
127+
scenario will fail to start.
128+
124129
extra_headers: Send extra headers
125130
126131
extra_query: Add additional query parameters to the request
@@ -142,6 +147,7 @@ def create(
142147
"metadata": metadata,
143148
"reference_output": reference_output,
144149
"required_environment_variables": required_environment_variables,
150+
"required_secret_names": required_secret_names,
145151
},
146152
scenario_create_params.ScenarioCreateParams,
147153
),
@@ -197,7 +203,8 @@ def update(
197203
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
198204
name: Optional[str] | NotGiven = NOT_GIVEN,
199205
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
200-
required_env_vars: Optional[List[str]] | NotGiven = NOT_GIVEN,
206+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
207+
required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN,
201208
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
202209
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
203210
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -225,7 +232,9 @@ def update(
225232
can be the result of a git diff or a sequence of command actions to apply to the
226233
environment.
227234
228-
required_env_vars: Environment variables required to run the benchmark.
235+
required_environment_variables: Environment variables required to run the scenario.
236+
237+
required_secrets: Secrets required to run the scenario.
229238
230239
scoring_contract: The scoring contract for the Scenario.
231240
@@ -250,7 +259,8 @@ def update(
250259
"metadata": metadata,
251260
"name": name,
252261
"reference_output": reference_output,
253-
"required_env_vars": required_env_vars,
262+
"required_environment_variables": required_environment_variables,
263+
"required_secrets": required_secrets,
254264
"scoring_contract": scoring_contract,
255265
},
256266
scenario_update_params.ScenarioUpdateParams,
@@ -527,6 +537,7 @@ async def create(
527537
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
528538
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
529539
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
540+
required_secret_names: Optional[List[str]] | NotGiven = NOT_GIVEN,
530541
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
531542
# The extra values given here take precedence over values defined on the client or passed to this method.
532543
extra_headers: Headers | None = None,
@@ -557,6 +568,10 @@ async def create(
557568
required_environment_variables: Environment variables required to run the scenario. If these variables are not
558569
provided, the scenario will fail to start.
559570
571+
required_secret_names: Secrets required to run the scenario (user secret name to scenario required
572+
secret name). If these secrets are not provided or the mapping is incorrect, the
573+
scenario will fail to start.
574+
560575
extra_headers: Send extra headers
561576
562577
extra_query: Add additional query parameters to the request
@@ -578,6 +593,7 @@ async def create(
578593
"metadata": metadata,
579594
"reference_output": reference_output,
580595
"required_environment_variables": required_environment_variables,
596+
"required_secret_names": required_secret_names,
581597
},
582598
scenario_create_params.ScenarioCreateParams,
583599
),
@@ -633,7 +649,8 @@ async def update(
633649
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
634650
name: Optional[str] | NotGiven = NOT_GIVEN,
635651
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
636-
required_env_vars: Optional[List[str]] | NotGiven = NOT_GIVEN,
652+
required_environment_variables: Optional[List[str]] | NotGiven = NOT_GIVEN,
653+
required_secrets: Optional[List[str]] | NotGiven = NOT_GIVEN,
637654
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
638655
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
639656
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -661,7 +678,9 @@ async def update(
661678
can be the result of a git diff or a sequence of command actions to apply to the
662679
environment.
663680
664-
required_env_vars: Environment variables required to run the benchmark.
681+
required_environment_variables: Environment variables required to run the scenario.
682+
683+
required_secrets: Secrets required to run the scenario.
665684
666685
scoring_contract: The scoring contract for the Scenario.
667686
@@ -686,7 +705,8 @@ async def update(
686705
"metadata": metadata,
687706
"name": name,
688707
"reference_output": reference_output,
689-
"required_env_vars": required_env_vars,
708+
"required_environment_variables": required_environment_variables,
709+
"required_secrets": required_secrets,
690710
"scoring_contract": scoring_contract,
691711
},
692712
scenario_update_params.ScenarioUpdateParams,

src/runloop_api_client/types/benchmark_create_params.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ class BenchmarkCreateParams(TypedDict, total=False):
1818
required_environment_variables: Optional[List[str]]
1919
"""Environment variables required to run the benchmark.
2020
21-
If these variables are not supplied, the benchmark will fail to start
21+
If any required variables are not supplied, the benchmark will fail to start
22+
"""
23+
24+
required_secrets: List[str]
25+
"""
26+
Secrets required to run the benchmark with (user secret name will be mapped to
27+
benchmark required secret name). If any of these secrets are not provided or the
28+
mapping is incorrect, the benchmark will fail to start.
2229
"""
2330

2431
scenario_ids: Optional[List[str]]

src/runloop_api_client/types/benchmark_run_view.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ class BenchmarkRunView(BaseModel):
4141
4242
Calculated as sum of scenario scores / number of scenario runs.
4343
"""
44+
45+
secrets_provided: Optional[Dict[str, str]] = None
46+
"""User secrets used to run the benchmark."""

src/runloop_api_client/types/benchmark_start_run_params.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ class BenchmarkStartRunParams(TypedDict, total=False):
2626

2727
class RunProfile(TypedDict, total=False):
2828
env_vars: Annotated[Optional[Dict[str, str]], PropertyInfo(alias="envVars")]
29-
"""Environment variables."""
29+
"""Environment Variables: Environment Variable to Value."""
3030

3131
purpose: Optional[str]
3232
"""Purpose of the run."""
33+
34+
secrets: Optional[Dict[str, str]]
35+
"""Secrets: Environment Variable to User Secret Name."""

src/runloop_api_client/types/benchmark_update_params.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,14 @@ class BenchmarkUpdateParams(TypedDict, total=False):
1818
required_environment_variables: Optional[List[str]]
1919
"""Environment variables required to run the benchmark.
2020
21-
If these variables are not supplied, the benchmark will fail to start
21+
If any required variables are not supplied, the benchmark will fail to start
22+
"""
23+
24+
required_secrets: List[str]
25+
"""
26+
Secrets required to run the benchmark with (user secret name will be mapped to
27+
benchmark required secret name). If any of these secrets are not provided or the
28+
mapping is incorrect, the benchmark will fail to start.
2229
"""
2330

2431
scenario_ids: Optional[List[str]]

src/runloop_api_client/types/benchmark_view.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,12 @@ class BenchmarkView(BaseModel):
2828
required_environment_variables: Optional[List[str]] = None
2929
"""Required environment variables used to run the benchmark.
3030
31-
If any required environment are missing, the benchmark will fail to start.
31+
If any required environment variables are missing, the benchmark will fail to
32+
start.
33+
"""
34+
35+
required_secret_names: Optional[List[str]] = None
36+
"""Required secrets used to run the benchmark.
37+
38+
If any required secrets are missing, the benchmark will fail to start.
3239
"""

src/runloop_api_client/types/blueprint_view.py

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,45 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import Optional
3+
from typing import Dict, List, Optional
44
from typing_extensions import Literal
55

6+
from pydantic import Field as FieldInfo
7+
68
from .._models import BaseModel
79
from .blueprint_build_parameters import BlueprintBuildParameters
810

9-
__all__ = ["BlueprintView"]
11+
__all__ = ["BlueprintView", "ContainerizedService", "ContainerizedServiceCredentials"]
12+
13+
14+
class ContainerizedServiceCredentials(BaseModel):
15+
password: str
16+
"""The password of the container service."""
17+
18+
username: str
19+
"""The username of the container service."""
20+
21+
22+
class ContainerizedService(BaseModel):
23+
image: str
24+
"""The image of the container service."""
25+
26+
name: str
27+
"""The name of the container service."""
28+
29+
credentials: Optional[ContainerizedServiceCredentials] = None
30+
"""The credentials of the container service."""
31+
32+
env: Optional[Dict[str, str]] = None
33+
"""The environment variables of the container service."""
34+
35+
options: Optional[str] = None
36+
"""Additional Docker container create options."""
37+
38+
port_mappings: Optional[List[str]] = None
39+
"""The port mappings of the container service.
40+
41+
Port mappings are in the format of <host_port>:<container_port>.
42+
"""
1043

1144

1245
class BlueprintView(BaseModel):
@@ -31,5 +64,13 @@ class BlueprintView(BaseModel):
3164
base_blueprint_id: Optional[str] = None
3265
"""The ID of the base Blueprint."""
3366

67+
containerized_services: Optional[List[ContainerizedService]] = FieldInfo(
68+
alias="containerizedServices", default=None
69+
)
70+
"""List of ContainerizedServices available in the Blueprint.
71+
72+
Services can be explicitly started when creating a Devbox.
73+
"""
74+
3475
failure_reason: Optional[Literal["out_of_memory", "out_of_disk", "build_failed"]] = None
3576
"""The failure reason if the Blueprint build failed, if any."""

src/runloop_api_client/types/scenario_create_params.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,10 @@ class ScenarioCreateParams(TypedDict, total=False):
4040
4141
If these variables are not provided, the scenario will fail to start.
4242
"""
43+
44+
required_secret_names: Optional[List[str]]
45+
"""
46+
Secrets required to run the scenario (user secret name to scenario required
47+
secret name). If these secrets are not provided or the mapping is incorrect, the
48+
scenario will fail to start.
49+
"""

0 commit comments

Comments
 (0)