Skip to content

Commit 152bc75

Browse files
fix(api): remove params field from task list response
1 parent c67e177 commit 152bc75

3 files changed

Lines changed: 18 additions & 13 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 75
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-132fed556e527565b396688a09e873b51ae42c6ad11757d49fc5ef1f2091c943.yml
3-
openapi_spec_hash: 0c1d8518f9f60bb8dc325e26fe1ebadc
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/sgp/agentex-sdk-644a4ec06aa1f055c614cbef3379684819a4edd84eeb20d2fb29ae01663622a3.yml
3+
openapi_spec_hash: a6a4dc0c09691ac9783bf38e9653a464
44
config_hash: 593e89b291976a5e84e4c3c3f8324354

src/agentex/resources/tasks.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,13 @@ def list(
122122
extra_body: Body | None = None,
123123
timeout: float | httpx.Timeout | None | NotGiven = not_given,
124124
) -> TaskListResponse:
125-
"""List all tasks.
125+
"""List tasks.
126126
127-
Args:
128-
status: Filter tasks by status (e.g.
127+
Returns a lean summary per task and omits `params`; fetch GET
128+
/tasks/{task_id} for the full record including `params`.
129129
130-
RUNNING, COMPLETED).
130+
Args:
131+
status: Filter tasks by status (e.g. RUNNING, COMPLETED).
131132
132133
task_metadata:
133134
JSON-encoded object used to filter tasks via JSONB containment. Example:
@@ -758,12 +759,13 @@ async def list(
758759
extra_body: Body | None = None,
759760
timeout: float | httpx.Timeout | None | NotGiven = not_given,
760761
) -> TaskListResponse:
761-
"""List all tasks.
762+
"""List tasks.
762763
763-
Args:
764-
status: Filter tasks by status (e.g.
764+
Returns a lean summary per task and omits `params`; fetch GET
765+
/tasks/{task_id} for the full record including `params`.
765766
766-
RUNNING, COMPLETED).
767+
Args:
768+
status: Filter tasks by status (e.g. RUNNING, COMPLETED).
767769
768770
task_metadata:
769771
JSON-encoded object used to filter tasks via JSONB containment. Example:

src/agentex/types/task_list_response.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111

1212

1313
class TaskListResponseItem(BaseModel):
14-
"""Task response model with optional related data based on relationships"""
14+
"""Lean list-response shape.
15+
16+
Omits `params` (the arbitrary create-time
17+
payload, which can carry per-caller secrets and PII); fetch GET /tasks/{id}
18+
for the full record.
19+
"""
1520

1621
id: str
1722

@@ -23,8 +28,6 @@ class TaskListResponseItem(BaseModel):
2328

2429
name: Optional[str] = None
2530

26-
params: Optional[Dict[str, object]] = None
27-
2831
status: Optional[
2932
Literal["CANCELED", "COMPLETED", "FAILED", "RUNNING", "INTERRUPTED", "TERMINATED", "TIMED_OUT", "DELETED"]
3033
] = None

0 commit comments

Comments
 (0)