feat: add pagination to run messages endpoint (#5082)

* feat: add pagination to run messages endpoint

* chore: regenerate API client with pagination parameters
This commit is contained in:
cthomas
2025-10-01 17:50:45 -07:00
committed by Caren Thomas
parent e96fd83adf
commit af23e6cda1
2 changed files with 14 additions and 0 deletions

View File

@@ -10207,6 +10207,19 @@
"title": "Order"
},
"description": "Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first"
},
{
"name": "order_by",
"in": "query",
"required": false,
"schema": {
"const": "created_at",
"type": "string",
"description": "Field to sort by",
"default": "created_at",
"title": "Order By"
},
"description": "Field to sort by"
}
],
"responses": {

View File

@@ -187,6 +187,7 @@ async def list_run_messages(
order: Literal["asc", "desc"] = Query(
"asc", description="Sort order for messages by creation time. 'asc' for oldest first, 'desc' for newest first"
),
order_by: Literal["created_at"] = Query("created_at", description="Field to sort by"),
):
"""Get response messages associated with a run."""
actor = await server.user_manager.get_actor_or_default_async(actor_id=headers.actor_id)