Repository navigation
livekit-api: thread and database clients - #930
theomonnom wants to merge 10 commits into
Conversation
…se clients Generate agent/livekit_agent_thread.proto (AgentThread, AgentTask) at the current protocol pin. Add LiveKitAPI.threads and LiveKitAPI.databases, served by the LiveKit Cloud Public API. The HTTP layer is generated with OpenAPI Generator (python, asyncio) from the vendored spec in livekit-api/public-api; run generate.sh there to re-vendor and regenerate.
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 1 new potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
|
|
||
| async def _call( | ||
| self, | ||
| *, |
There was a problem hiding this comment.
🟡 Negative page sizes break list requests
For a negative list limit or page_size, _call sends that value instead of leaving the page size unset. The server receives an invalid page.pageSize, so the list request fails rather than using its default size.
Learn more
The four list methods pass protobuf integer page sizes through list, which forwards them as page_page_size to _call. The filter omits zero but preserves negative sizes, while the earlier page_size helper omitted every nonpositive size. The generated list operations serialize any present integer into page.pageSize, so a negative size reaches the server.
Example: With AgentThread.ListRequest(limit=-1), list_threads now sends page.pageSize=-1. Previously it omitted page.pageSize, letting the server apply its default page size.
Recommended fix: Normalize page_page_size in PublicApiClient.list with limit if limit > 0 else None, while preserving _call filtering for optional strings and zero-valued fields.
Was this helpful? React with 👍 or 👎 to provide feedback.
…module, flat request names, keyword-only ids
…ds fail early, 499/502 mapped
Adds
LiveKitAPI.threadsandLiveKitAPI.databases(agent threads and agent databases on the LiveKit Cloud Public API), mirroring livekit/rust-sdks#1379.Errors are the same
ServerErroras the other services. Twirp and Public API services now share oneBaseService, and the error types moved tolivekit.api.errors.livekit/api/_generated/is generated bylivekit-api/public-api/generate.shfrom the vendoredopenapi.yaml(OpenAPI Generator, aiohttp). The spec is from public-api-server@e273831, since livekit/public-api-server#150 hid these operations.