Repository navigation
fix(billing): price Pi sandboxes at their build resources #9453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| /** | ||
| * vCPU and RAM for the Pi sandbox, shared by both provider builds and by sandbox | ||
| * pricing. The two providers had already drifted here. Daytona asked for 4 CPU / 8 GB | ||
| * while the E2B template asked for nothing and inherited its base default of | ||
| * 2 vCPU / 512 MB — a 16x memory gap between the provider Pi normally runs on and | ||
| * the one it fails over to, which would surface as the agent being killed on E2B | ||
| * for work that succeeded on Daytona. | ||
| * | ||
| * 512 MB is the real problem: the Pi CLI is a Node process holding an LLM | ||
| * context, running beside a `git clone` of the user's repository, and Node has no | ||
| * graceful behaviour at that ceiling — it is OOM-killed, which reaches the user | ||
| * as an opaque agent failure rather than a diagnosable one. | ||
| * | ||
| * Both numbers are at E2B's Professional maximum (8 vCPU / 8192 MB per build, | ||
| * 1 vCPU / 512 MB minimum). Sizing is per-second billed against allocated | ||
| * resources rather than used ones, so this costs roughly 3x the previous E2B | ||
| * default per sandbox-second. On the compute-bound phases that is close to | ||
| * neutral — the work finishes proportionally sooner — but Babysit deliberately | ||
| * idles between review polls, and idle seconds bill at the same rate. Lower | ||
| * {@link PI_SANDBOX_CPU_COUNT} first if that idle time proves dominant: vCPU is | ||
| * ~3x the hourly rate of a GB of RAM, and RAM is the dimension that prevents | ||
| * hard failures. | ||
| */ | ||
| export const PI_SANDBOX_CPU_COUNT = 4 | ||
|
|
||
| /** Kept in GB and MB because Daytona takes GB and E2B takes MB. */ | ||
| export const PI_SANDBOX_MEMORY_GB = 8 | ||
| export const PI_SANDBOX_MEMORY_MB = PI_SANDBOX_MEMORY_GB * 1024 | ||
|
|
||
| /** | ||
| * Daytona disk for the Pi sandbox. 10 GB is a hard per-sandbox cap there: the API rejects anything | ||
| * larger regardless of plan tier, and raising it requires contacting Daytona. E2B allows 20 GB, so | ||
| * this bounds how large a repository Pi can clone on the failover provider, and it is the one | ||
| * dimension where the two images legitimately differ. | ||
| */ | ||
| export const PI_DAYTONA_DISK_GB = 10 | ||
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.