Skip to content
sandboxrouting

Configuration

From README.md, rendered when the site was built.

./sandboxrouting.json, else ~/.sandboxrouting/config.json, or the path in SBR_CONFIG. Every field is optional. See sandboxrouting.example.json:

{
  "routing": { "strategy": "free-first" },   // cheapest | balanced | fastest | spread | yours
  "allowPaid": false,              // SBR_ALLOW_PAID=1 for one run
  "maxPaidUsdPerMonth": 10,
  "selfHosted": "after-free",      // "first" | "after-free" | "never"
  "defaults": { "timeoutSec": 300 },
  "providers": {
    "e2b": { "usedBeforeUsd": 12.5 },
    "daytona": { "freeTier": { "kind": "monthly-credit", "usd": 200 }, "priority": 10 },
    "modal": { "options": { "ports": [8080] } },
    "docker": { "isolation": "gvisor" },     // when Docker runs with runtime runsc
    "fly": { "enabled": false }
  },
  "jobs": { "maxMigrations": 5, "maxWaitSec": 300, "rebalance": false }
}

routing also takes weights for balanced, circuitBreaker settings, and activeCpuShare, the expected busy share of the vCPUs used to rank providers that bill only active CPU (default 0.3). A provider's pricing override takes vcpuSecondUsd, gibSecondUsd, sandboxSecondUsd, billing ("wall" or "active-cpu") and activeCpuShare. jobs takes the checkpoint mode, limits and timeouts. Both are documented in docs/routing.md. policy still works as the old name for routing.strategy.

sbr reset <provider> clears a provider's quota, rate-limit and auth marks, and its health history, after you top up or fix a key.