Skip to content

Commit 105c4ca

Browse files
authored
Merge pull request #604 from runloopai/release-please--branches--main--changes--next
release: 0.45.0
2 parents 90da631 + 1b7350d commit 105c4ca

File tree

15 files changed

+300
-17
lines changed

15 files changed

+300
-17
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.44.0"
2+
".": "0.45.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 91
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-ecb3d41adaf06e76fd95f11d6da77c7aa0119387a3f372e736edd1579ec2aa03.yml
3-
openapi_spec_hash: 2671664b7d6b0107a6402746033a65ac
4-
config_hash: c4d0f5cf7262a18f9254da07d289f3ec
1+
configured_endpoints: 92
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/runloop-ai%2Frunloop-1d4b018cbfb409baf83725737f00789a9ddbbdbdbe12db1ac7a1fd2cf9c453f0.yml
3+
openapi_spec_hash: 1c533f386f6d3d3802d353cc6f1df547
4+
config_hash: 33b544375e4a932cbb2890f79a9aa040

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Changelog
22

3+
## 0.45.0 (2025-06-24)
4+
5+
Full Changelog: [v0.44.0...v0.45.0](https://github.com/runloopai/api-client-python/compare/v0.44.0...v0.45.0)
6+
7+
### Features
8+
9+
* **api:** api update ([382b901](https://github.com/runloopai/api-client-python/commit/382b9018d26ce11e12d7143a84b80147be63ac2e))
10+
* **api:** api update ([3f896cf](https://github.com/runloopai/api-client-python/commit/3f896cf907ef15fc2f0d01f681844eef0bca9479))
11+
* **api:** api update ([9bb3abf](https://github.com/runloopai/api-client-python/commit/9bb3abf4b274d9e75940cc859eafd0f4f37027b8))
12+
13+
14+
### Chores
15+
16+
* **tests:** skip some failing tests on the latest python versions ([27007c0](https://github.com/runloopai/api-client-python/commit/27007c0a1500e80cc9ac93cb634021a7cfb569e6))
17+
318
## 0.44.0 (2025-06-21)
419

520
Full Changelog: [v0.43.0...v0.44.0](https://github.com/runloopai/api-client-python/compare/v0.43.0...v0.44.0)

api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ Types:
264264
```python
265265
from runloop_api_client.types import (
266266
InputContext,
267+
InputContextUpdate,
267268
ScenarioCreateParameters,
268269
ScenarioEnvironment,
269270
ScenarioRunListView,
@@ -272,6 +273,7 @@ from runloop_api_client.types import (
272273
ScenarioView,
273274
ScoringContract,
274275
ScoringContractResultView,
276+
ScoringContractUpdate,
275277
ScoringFunction,
276278
ScoringFunctionResultView,
277279
StartScenarioRunParameters,
@@ -295,6 +297,7 @@ Methods:
295297
- <code title="get /v1/scenarios/runs">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">list</a>(\*\*<a href="src/runloop_api_client/types/scenarios/run_list_params.py">params</a>) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">SyncBenchmarkRunsCursorIDPage[ScenarioRunView]</a></code>
296298
- <code title="post /v1/scenarios/runs/{id}/cancel">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">cancel</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
297299
- <code title="post /v1/scenarios/runs/{id}/complete">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">complete</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
300+
- <code title="post /v1/scenarios/runs/{id}/download_logs">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">download_logs</a>(id) -> BinaryAPIResponse</code>
298301
- <code title="post /v1/scenarios/runs/{id}/score">client.scenarios.runs.<a href="./src/runloop_api_client/resources/scenarios/runs.py">score</a>(id) -> <a href="./src/runloop_api_client/types/scenario_run_view.py">ScenarioRunView</a></code>
299302

300303
## Scorers

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "runloop_api_client"
3-
version = "0.44.0"
3+
version = "0.45.0"
44
description = "The official Python library for the runloop API"
55
dynamic = ["readme"]
66
license = "MIT"

src/runloop_api_client/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "runloop_api_client"
4-
__version__ = "0.44.0" # x-release-please-version
4+
__version__ = "0.45.0" # x-release-please-version

src/runloop_api_client/resources/scenarios/runs.py

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,18 @@
99
from ..._compat import cached_property
1010
from ..._resource import SyncAPIResource, AsyncAPIResource
1111
from ..._response import (
12+
BinaryAPIResponse,
13+
AsyncBinaryAPIResponse,
14+
StreamedBinaryAPIResponse,
15+
AsyncStreamedBinaryAPIResponse,
1216
to_raw_response_wrapper,
1317
to_streamed_response_wrapper,
1418
async_to_raw_response_wrapper,
19+
to_custom_raw_response_wrapper,
1520
async_to_streamed_response_wrapper,
21+
to_custom_streamed_response_wrapper,
22+
async_to_custom_raw_response_wrapper,
23+
async_to_custom_streamed_response_wrapper,
1624
)
1725
from ...pagination import SyncBenchmarkRunsCursorIDPage, AsyncBenchmarkRunsCursorIDPage
1826
from ..._exceptions import RunloopError
@@ -213,6 +221,48 @@ def complete(
213221
cast_to=ScenarioRunView,
214222
)
215223

224+
def download_logs(
225+
self,
226+
id: str,
227+
*,
228+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
229+
# The extra values given here take precedence over values defined on the client or passed to this method.
230+
extra_headers: Headers | None = None,
231+
extra_query: Query | None = None,
232+
extra_body: Body | None = None,
233+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
234+
idempotency_key: str | None = None,
235+
) -> BinaryAPIResponse:
236+
"""
237+
Download a zip file containing all logs for a Scenario run from the associated
238+
devbox.
239+
240+
Args:
241+
extra_headers: Send extra headers
242+
243+
extra_query: Add additional query parameters to the request
244+
245+
extra_body: Add additional JSON properties to the request
246+
247+
timeout: Override the client-level default timeout for this request, in seconds
248+
249+
idempotency_key: Specify a custom idempotency key for this request
250+
"""
251+
if not id:
252+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
253+
extra_headers = {"Accept": "application/zip", **(extra_headers or {})}
254+
return self._post(
255+
f"/v1/scenarios/runs/{id}/download_logs",
256+
options=make_request_options(
257+
extra_headers=extra_headers,
258+
extra_query=extra_query,
259+
extra_body=extra_body,
260+
timeout=timeout,
261+
idempotency_key=idempotency_key,
262+
),
263+
cast_to=BinaryAPIResponse,
264+
)
265+
216266
def score(
217267
self,
218268
id: str,
@@ -583,6 +633,48 @@ async def complete(
583633
cast_to=ScenarioRunView,
584634
)
585635

636+
async def download_logs(
637+
self,
638+
id: str,
639+
*,
640+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
641+
# The extra values given here take precedence over values defined on the client or passed to this method.
642+
extra_headers: Headers | None = None,
643+
extra_query: Query | None = None,
644+
extra_body: Body | None = None,
645+
timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN,
646+
idempotency_key: str | None = None,
647+
) -> AsyncBinaryAPIResponse:
648+
"""
649+
Download a zip file containing all logs for a Scenario run from the associated
650+
devbox.
651+
652+
Args:
653+
extra_headers: Send extra headers
654+
655+
extra_query: Add additional query parameters to the request
656+
657+
extra_body: Add additional JSON properties to the request
658+
659+
timeout: Override the client-level default timeout for this request, in seconds
660+
661+
idempotency_key: Specify a custom idempotency key for this request
662+
"""
663+
if not id:
664+
raise ValueError(f"Expected a non-empty value for `id` but received {id!r}")
665+
extra_headers = {"Accept": "application/zip", **(extra_headers or {})}
666+
return await self._post(
667+
f"/v1/scenarios/runs/{id}/download_logs",
668+
options=make_request_options(
669+
extra_headers=extra_headers,
670+
extra_query=extra_query,
671+
extra_body=extra_body,
672+
timeout=timeout,
673+
idempotency_key=idempotency_key,
674+
),
675+
cast_to=AsyncBinaryAPIResponse,
676+
)
677+
586678
async def score(
587679
self,
588680
id: str,
@@ -782,6 +874,10 @@ def __init__(self, runs: RunsResource) -> None:
782874
self.complete = to_raw_response_wrapper(
783875
runs.complete,
784876
)
877+
self.download_logs = to_custom_raw_response_wrapper(
878+
runs.download_logs,
879+
BinaryAPIResponse,
880+
)
785881
self.score = to_raw_response_wrapper(
786882
runs.score,
787883
)
@@ -803,6 +899,10 @@ def __init__(self, runs: AsyncRunsResource) -> None:
803899
self.complete = async_to_raw_response_wrapper(
804900
runs.complete,
805901
)
902+
self.download_logs = async_to_custom_raw_response_wrapper(
903+
runs.download_logs,
904+
AsyncBinaryAPIResponse,
905+
)
806906
self.score = async_to_raw_response_wrapper(
807907
runs.score,
808908
)
@@ -824,6 +924,10 @@ def __init__(self, runs: RunsResource) -> None:
824924
self.complete = to_streamed_response_wrapper(
825925
runs.complete,
826926
)
927+
self.download_logs = to_custom_streamed_response_wrapper(
928+
runs.download_logs,
929+
StreamedBinaryAPIResponse,
930+
)
827931
self.score = to_streamed_response_wrapper(
828932
runs.score,
829933
)
@@ -845,6 +949,10 @@ def __init__(self, runs: AsyncRunsResource) -> None:
845949
self.complete = async_to_streamed_response_wrapper(
846950
runs.complete,
847951
)
952+
self.download_logs = async_to_custom_streamed_response_wrapper(
953+
runs.download_logs,
954+
AsyncStreamedBinaryAPIResponse,
955+
)
848956
self.score = async_to_streamed_response_wrapper(
849957
runs.score,
850958
)

src/runloop_api_client/resources/scenarios/scenarios.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
from ...types.scenario_run_view import ScenarioRunView
4747
from ...types.input_context_param import InputContextParam
4848
from ...types.scoring_contract_param import ScoringContractParam
49+
from ...types.input_context_update_param import InputContextUpdateParam
4950
from ...types.scenario_environment_param import ScenarioEnvironmentParam
51+
from ...types.scoring_contract_update_param import ScoringContractUpdateParam
5052

5153
__all__ = ["ScenariosResource", "AsyncScenariosResource"]
5254

@@ -186,11 +188,11 @@ def update(
186188
id: str,
187189
*,
188190
environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN,
189-
input_context: Optional[InputContextParam] | NotGiven = NOT_GIVEN,
191+
input_context: Optional[InputContextUpdateParam] | NotGiven = NOT_GIVEN,
190192
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
191193
name: Optional[str] | NotGiven = NOT_GIVEN,
192194
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
193-
scoring_contract: Optional[ScoringContractParam] | NotGiven = NOT_GIVEN,
195+
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
194196
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
195197
# The extra values given here take precedence over values defined on the client or passed to this method.
196198
extra_headers: Headers | None = None,
@@ -613,11 +615,11 @@ async def update(
613615
id: str,
614616
*,
615617
environment_parameters: Optional[ScenarioEnvironmentParam] | NotGiven = NOT_GIVEN,
616-
input_context: Optional[InputContextParam] | NotGiven = NOT_GIVEN,
618+
input_context: Optional[InputContextUpdateParam] | NotGiven = NOT_GIVEN,
617619
metadata: Optional[Dict[str, str]] | NotGiven = NOT_GIVEN,
618620
name: Optional[str] | NotGiven = NOT_GIVEN,
619621
reference_output: Optional[str] | NotGiven = NOT_GIVEN,
620-
scoring_contract: Optional[ScoringContractParam] | NotGiven = NOT_GIVEN,
622+
scoring_contract: Optional[ScoringContractUpdateParam] | NotGiven = NOT_GIVEN,
621623
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
622624
# The extra values given here take precedence over values defined on the client or passed to this method.
623625
extra_headers: Headers | None = None,

src/runloop_api_client/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
from .benchmark_start_run_params import BenchmarkStartRunParams as BenchmarkStartRunParams
5555
from .blueprint_build_parameters import BlueprintBuildParameters as BlueprintBuildParameters
5656
from .devbox_execute_sync_params import DevboxExecuteSyncParams as DevboxExecuteSyncParams
57+
from .input_context_update_param import InputContextUpdateParam as InputContextUpdateParam
5758
from .repository_connection_view import RepositoryConnectionView as RepositoryConnectionView
5859
from .scenario_environment_param import ScenarioEnvironmentParam as ScenarioEnvironmentParam
5960
from .devbox_create_tunnel_params import DevboxCreateTunnelParams as DevboxCreateTunnelParams
@@ -69,6 +70,7 @@
6970
from .scoring_function_result_view import ScoringFunctionResultView as ScoringFunctionResultView
7071
from .repository_inspection_details import RepositoryInspectionDetails as RepositoryInspectionDetails
7172
from .scenario_definition_list_view import ScenarioDefinitionListView as ScenarioDefinitionListView
73+
from .scoring_contract_update_param import ScoringContractUpdateParam as ScoringContractUpdateParam
7274
from .blueprint_build_logs_list_view import BlueprintBuildLogsListView as BlueprintBuildLogsListView
7375
from .devbox_create_ssh_key_response import DevboxCreateSSHKeyResponse as DevboxCreateSSHKeyResponse
7476
from .repository_connection_list_view import RepositoryConnectionListView as RepositoryConnectionListView
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Optional
6+
from typing_extensions import TypedDict
7+
8+
__all__ = ["InputContextUpdateParam"]
9+
10+
11+
class InputContextUpdateParam(TypedDict, total=False):
12+
additional_context: Optional[object]
13+
"""Additional JSON structured input context."""
14+
15+
problem_statement: Optional[str]
16+
"""The problem statement for the Scenario."""

src/runloop_api_client/types/scenario_update_params.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
from typing import Dict, Optional
66
from typing_extensions import TypedDict
77

8-
from .input_context_param import InputContextParam
9-
from .scoring_contract_param import ScoringContractParam
8+
from .input_context_update_param import InputContextUpdateParam
109
from .scenario_environment_param import ScenarioEnvironmentParam
10+
from .scoring_contract_update_param import ScoringContractUpdateParam
1111

1212
__all__ = ["ScenarioUpdateParams"]
1313

@@ -16,7 +16,7 @@ class ScenarioUpdateParams(TypedDict, total=False):
1616
environment_parameters: Optional[ScenarioEnvironmentParam]
1717
"""The Environment in which the Scenario will run."""
1818

19-
input_context: Optional[InputContextParam]
19+
input_context: Optional[InputContextUpdateParam]
2020
"""The input context for the Scenario."""
2121

2222
metadata: Optional[Dict[str, str]]
@@ -32,5 +32,5 @@ class ScenarioUpdateParams(TypedDict, total=False):
3232
apply to the environment.
3333
"""
3434

35-
scoring_contract: Optional[ScoringContractParam]
35+
scoring_contract: Optional[ScoringContractUpdateParam]
3636
"""The scoring contract for the Scenario."""
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Iterable, Optional
6+
from typing_extensions import TypedDict
7+
8+
from .scoring_function_param import ScoringFunctionParam
9+
10+
__all__ = ["ScoringContractUpdateParam"]
11+
12+
13+
class ScoringContractUpdateParam(TypedDict, total=False):
14+
scoring_function_parameters: Optional[Iterable[ScoringFunctionParam]]
15+
"""A list of scoring functions used to evaluate the Scenario."""

0 commit comments

Comments
 (0)