From d7b2d3c6ba4928b07612dd85b86e5288797ad92e Mon Sep 17 00:00:00 2001 From: cthomas Date: Wed, 1 Oct 2025 14:35:24 -0700 Subject: [PATCH] feat: make agent_ids field as deprecated on list runs [LET-4573] (#5067) * feat: make agent_ids field as deprecated on list runs * api sync --- fern/openapi.json | 6 ++++-- letta/server/rest_api/routers/v1/runs.py | 6 +++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fern/openapi.json b/fern/openapi.json index 1f2695d8..05a88329 100644 --- a/fern/openapi.json +++ b/fern/openapi.json @@ -9764,10 +9764,12 @@ "type": "null" } ], - "description": "(DEPRECATED) The unique identifiers of the agents associated with the run.", + "description": "The unique identifiers of the agents associated with the run. Deprecated in favor of agent_id field.", + "deprecated": true, "title": "Agent Ids" }, - "description": "(DEPRECATED) The unique identifiers of the agents associated with the run." + "description": "The unique identifiers of the agents associated with the run. Deprecated in favor of agent_id field.", + "deprecated": true }, { "name": "background", diff --git a/letta/server/rest_api/routers/v1/runs.py b/letta/server/rest_api/routers/v1/runs.py index d5a6efac..0252684e 100644 --- a/letta/server/rest_api/routers/v1/runs.py +++ b/letta/server/rest_api/routers/v1/runs.py @@ -33,7 +33,11 @@ router = APIRouter(prefix="/runs", tags=["runs"]) async def list_runs( server: "SyncServer" = Depends(get_letta_server), agent_id: Optional[str] = Query(None, description="The unique identifier of the agent associated with the run."), - agent_ids: Optional[List[str]] = Query(None, description="(DEPRECATED) The unique identifiers of the agents associated with the run."), + agent_ids: Optional[List[str]] = Query( + None, + description="The unique identifiers of the agents associated with the run. Deprecated in favor of agent_id field.", + deprecated=True, + ), background: Optional[bool] = Query(None, description="If True, filters for runs that were created in background mode."), stop_reason: Optional[StopReasonType] = Query(None, description="Filter runs by stop reason."), after: Optional[str] = Query(None, description="Cursor for pagination"),