[Bounty proposal] fix(cli): conversation list --limit above 100 (25 with --include-transcript) silently returns a truncated page
Symptom
omi conversation list --limit 200 prints at most 100 rows under a table titled conversations (limit=200); omi conversation list --include-transcript --limit 50 prints at most 25. In --json mode an agent that paginates with the CLI's documented bound (--limit 200 --offset 200, --offset 400, …) silently skips half of every window. Nothing warns, the exit code is 0, and the CLI's own help advertises --limit up to 200.
Evidence
sdks/python-cli/omi_cli/commands/conversation.pyline 39:limit: int = typer.Option(25, "--limit", min=1, max=200); lines 51-62 issue oneGET /v1/dev/user/conversationswith thatlimit.backend/routers/developer.pyget_conversations(line ~1474):limit = max(1, min(limit, 25 if include_transcript else 100))— clamped before the Firestore query, and the response carries no effective-limit signal.docs/api-reference/openapi.jsondeclareslimitwithdefault: 25and no maximum, so a client cannot know the cap from the contract.- The other
listcommands are unaffected because their endpoints clamp at 1000 (memories,action-items) or above the CLI bound (goals); only conversations sits below the CLI's--limitrange. - Reproduced hermetically with a respx stub that clamps like the API:
--limit 200produced 100 rows from a singlelimit=200request. The same class of silent truncation applies to the export example indocs/doc/developer/api/conversations.mdx(lines ~850-873), which pages withlimit = 100andinclude_transcript: Trueand thenoffset += limit, so it skips 75 of every 100 conversations — noting it here as a follow-up rather than mixing a docs change into the CLI fix.
Proposed Fix
Have conversation list honour --limit by splitting the requested window into offset-preserving, server-sized page requests (100, or 25 with --include-transcript) that advance by the requested page size — the API filters locked conversations after paging, so a short page is not exhaustion (the contract action-item get already follows, #13214); an empty page is. The result is exactly what one honoured request would return, so a user's own --offset paging stays consistent. Requests at or below the cap keep issuing a single unchanged call.
Tests
sdks/python-cli/tests/test_conversation_list_paging.py drives the real Typer app through CliRunner against a respx stub that clamps like the API: 200 rows arrive as two limit=100 requests; --include-transcript --limit 60 becomes 25/25/10; --offset 10 --limit 150 requests (100, 10) then (50, 110); an empty page stops; a short page continues; --limit 100 stays a single request. Six of the seven cases fail on main.
Proposed Bounty Reward: $50.00 USD Bounty Payout Destination (PayPal): will be provided by email to [email protected] on payout
cc @josancamon19 @kodjima33
Hi! I'd like to work on this. The fix involves:
- Backend: Remove or raise the hard cap in
get_conversations()(currently clamps to 100/25) to match what the OpenAPI spec advertises - CLI: Add client-side pagination that splits large
--limitrequests into server-sized pages and merges results - Docs: Fix the export example in conversations.mdx that would skip 75 of every 100
Claiming now — I have 10+ open PRs in this repo and understand the codebase.
Opened PR #13991 resolving this issue.
Summary of resolution:
- Zero backend changes: Leaves
backend/routers/developer.pyserver limits and security hardening completely untouched (avoiding any regressions totest_dev_api_conversations_poison.py). - Client-side paging loop:
omi_cli.commands.conversation.list_conversationsautomatically chunks requests exceeding server limits (25with--include-transcript,100without). - Post-filter resilience: Advances pagination by
current_offset += batch_limitrather thanlen(page), correctly handling short pages caused by server-side post-filtering. - Unit tests: Added 6 tests in
sdks/python-cli/tests/test_conversation_list_paging.pyasserting limit chunking, offset continuity, empty-page termination, and short-page continuation. All 433 CLI tests pass cleanly.