feat(vercel-sandbox,sandbox): support pagination when listing sandboxes, sessions, snapshots#163
Merged
marc-vercel merged 7 commits intonamed-sandboxesfrom Apr 28, 2026
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
QuiiBz
reviewed
Apr 27, 2026
40c444f to
2a388d5
Compare
2a388d5 to
40c444f
Compare
QuiiBz
approved these changes
Apr 27, 2026
40c444f to
c4a08b0
Compare
…es, sessions, snapshots
c4a08b0 to
7ead5c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduce pagination support for the CLI/SDK, so that customers and agents can iterate over existing sandboxes, snapshots and sessions.
CLI
The CLI now supports two new parameters to control the pagination:
--limit--cursorAlso, in the list commands that support pagination, we are also returning the
More results: ...at the end, so that humans and agents know which commands they should run next if they want to iterate over the results.SDK
SDK introduces a small breaking change for the beta customers. When executing any of these methods:
await Sandbox.list()await sandbox.listSessions()await sandbox.listSnapshots()await Snapshot.list()We are going to return an Iterable. To match the previous behavior, you will need to convert these into an array. For example:
If you want to iterate through the results and automatically let the SDK query the pages when required:
To support pagination, these previous 4 methods will support two new optional parameters:
limit: page size. Maximum is 100.cursor: starting point. The first page is fetched with this cursor; from there the paginator follows pagination.next automatically.