Skip to content

fix(billing): price Pi sandboxes at their build resources - #9453

Merged
waleedlatif1 merged 1 commit into
stagingfrom
fix/pi-sandbox-pricing
Oct 29, 2026
Merged

waleedlatif1 merged 1 commit into
stagingfrom
fix/pi-sandbox-pricing

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Pi sandboxes are built at 4 vCPU / 8 GiB (plus a 10 GiB disk on Daytona) but were priced on the 2 vCPU / 4 GiB Function profile, so Pi runs billed at about half their provider cost
  • Added pi entries to the per-kind pricing table for both E2B and Daytona
  • Moved Pi sizing out of scripts/pi-sandbox-packages.ts into lib/execution/remote-sandbox/pi-resources.ts, mirroring function-resources.ts. Both provider build scripts and sandbox pricing now read it, so what we build and what we charge can't drift apart
  • No change to any built image: the constants keep their values

Type of Change

  • Bug fix

Testing

  • New pricing rows for one hour of Pi on E2B and Daytona; both fail with the Pi entries removed and pass with them in place
  • sandbox-pricing.test.ts and pi-sandbox-packages.test.ts pass
  • Biome on changed files; check:unused-exports, check:comment-hygiene, check:file-names and check:source-conventions pass locally. Type-check and the full audit gate run in CI

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

- Pi sandboxes are built at 4 vCPU / 8 GiB (Daytona adds a 10 GiB disk) but
  were priced on the 2 vCPU / 4 GiB Function profile, so Pi runs were billed
  at about half their provider cost.
- Pi sizing moves from the build-script package list into
  lib/execution/remote-sandbox/pi-resources.ts, which both provider builds and
  sandbox pricing now read, so the build and the price cannot drift apart.
@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Oct 29, 2026 9:13pm UTC

Request Review

@waleedlatif1
waleedlatif1 merged commit 01b2363 into staging Oct 29, 2026
44 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/pi-sandbox-pricing branch October 29, 2026 21:15
@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge.

Summary

Pi billing now uses the same resource constants as both provider build scripts.

  • Pi runs are priced at the resources their providers build.

No actionable issues found. Tests were inspected but not run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  R["pi-resources.ts"] --> E["E2B template build"]
  R --> D["Daytona snapshot build"]
  R --> P["Pi sandbox pricing"]
Loading

Reviews (1) · Last reviewed commit: "fix(billing): price Pi sandboxes at thei..." · Reviewed by Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/sim/lib/execution/remote-sandbox/pi-resources.ts

This branch was previously deployed

1 inactive deployment
Preview — 51df6ec6 Deployed Oct 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant