From ccc7a1b2ac24f8e79d32cfe3c5109f1868b22003 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 3 Oct 2026 17:37:48 -0700 Subject: [PATCH] feat(lens): take an index cursor on the reviews endpoint --- litellm/proxy/lens/endpoints.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/litellm/proxy/lens/endpoints.py b/litellm/proxy/lens/endpoints.py index 107ece46488..f7b5c0a8c48 100644 --- a/litellm/proxy/lens/endpoints.py +++ b/litellm/proxy/lens/endpoints.py @@ -34,7 +34,7 @@ from litellm.proxy.lens.models import ( ModelResult, Progress, Result, - Review, + ReviewPage, RunRequest, Sample, Scope, @@ -353,10 +353,8 @@ async def read_run(lens_id: str, job_id: str, auth: Auth) -> Job: return job -@router.get("/{lens_id}/runs/{job_id}/reviews", response_model=tuple[Review, ...]) -async def read_reviews( - lens_id: str, job_id: str, auth: Auth, after: Annotated[AwareDatetime | None, Query()] = None -) -> tuple[Review, ...]: +@router.get("/{lens_id}/runs/{job_id}/reviews", response_model=ReviewPage) +async def read_reviews(lens_id: str, job_id: str, auth: Auth, after: int = Query(default=0, ge=0)) -> ReviewPage: return reviews_after(await read_run(lens_id, job_id, auth), after)