Skip to content

Commit aac84c5

Browse files
feat: Create run for every local conversation and add filter
1 parent 58d59e3 commit aac84c5

File tree

5 files changed

+23
-2
lines changed

5 files changed

+23
-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: 14
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-d9e0c6bea8d4c2414ec2bcd18c2e748b43110079c81906aa6c79b350b408f96b.yml
3-
openapi_spec_hash: 598927b816525740620b414c6d147184
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/warp-bnavetta%2Fwarp-api-4d864538f582c11b4adf6bb3e3825561948c9957ab31157a7619f9af6aca04c2.yml
3+
openapi_spec_hash: 6b7198d57dc97873da35ef9c641bfe7b
44
config_hash: 1888db8b2f33dc16874aea51a90e78f7

src/oz_agent_sdk/resources/agent/runs.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def list(
9393
creator: str | Omit = omit,
9494
cursor: str | Omit = omit,
9595
environment_id: str | Omit = omit,
96+
execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit,
9697
limit: int | Omit = omit,
9798
model_id: str | Omit = omit,
9899
name: str | Omit = omit,
@@ -130,6 +131,8 @@ def list(
130131
131132
environment_id: Filter runs by environment ID
132133
134+
execution_location: Filter by where the run executed
135+
133136
limit: Maximum number of runs to return
134137
135138
model_id: Filter by model ID
@@ -185,6 +188,7 @@ def list(
185188
"creator": creator,
186189
"cursor": cursor,
187190
"environment_id": environment_id,
191+
"execution_location": execution_location,
188192
"limit": limit,
189193
"model_id": model_id,
190194
"name": name,
@@ -309,6 +313,7 @@ def list(
309313
creator: str | Omit = omit,
310314
cursor: str | Omit = omit,
311315
environment_id: str | Omit = omit,
316+
execution_location: Literal["LOCAL", "REMOTE"] | Omit = omit,
312317
limit: int | Omit = omit,
313318
model_id: str | Omit = omit,
314319
name: str | Omit = omit,
@@ -346,6 +351,8 @@ def list(
346351
347352
environment_id: Filter runs by environment ID
348353
354+
execution_location: Filter by where the run executed
355+
349356
limit: Maximum number of runs to return
350357
351358
model_id: Filter by model ID
@@ -401,6 +408,7 @@ def list(
401408
"creator": creator,
402409
"cursor": cursor,
403410
"environment_id": environment_id,
411+
"execution_location": execution_location,
404412
"limit": limit,
405413
"model_id": model_id,
406414
"name": name,

src/oz_agent_sdk/types/agent/run_item.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from typing import List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from ..scope import Scope
78
from ..._models import BaseModel
@@ -160,6 +161,13 @@ class RunItem(BaseModel):
160161

161162
creator: Optional[UserProfile] = None
162163

164+
execution_location: Optional[Literal["LOCAL", "REMOTE"]] = None
165+
"""Where the run executed:
166+
167+
- LOCAL: Executed in the user's local Oz environment
168+
- REMOTE: Executed by a remote/cloud worker
169+
"""
170+
163171
is_sandbox_running: Optional[bool] = None
164172
"""Whether the sandbox environment is currently running"""
165173

src/oz_agent_sdk/types/agent/run_list_params.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ class RunListParams(TypedDict, total=False):
3232
environment_id: str
3333
"""Filter runs by environment ID"""
3434

35+
execution_location: Literal["LOCAL", "REMOTE"]
36+
"""Filter by where the run executed"""
37+
3538
limit: int
3639
"""Maximum number of runs to return"""
3740

tests/api_resources/agent/test_runs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ def test_method_list_with_all_params(self, client: OzAPI) -> None:
7777
creator="creator",
7878
cursor="cursor",
7979
environment_id="environment_id",
80+
execution_location="LOCAL",
8081
limit=1,
8182
model_id="model_id",
8283
name="name",
@@ -220,6 +221,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOzAPI) -> No
220221
creator="creator",
221222
cursor="cursor",
222223
environment_id="environment_id",
224+
execution_location="LOCAL",
223225
limit=1,
224226
model_id="model_id",
225227
name="name",

0 commit comments

Comments
 (0)