g1t/services/billing/wrangler.jsonc
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Agents as a team: lifecycle, merge queue, billing and a new shell | 1 | { |
| 2 | "$schema": "../../node_modules/wrangler/config-schema.json", | |
| 3 | "name": "g1t-billing", | |
| 4 | "account_id": "1e6f2cffa3f445920836e8ebe446bb58", | |
| 5 | "compatibility_date": "2026-09-26", | |
| 6 | // Runs next to its database: a request makes several queries in turn, | |
| 7 | // and each would otherwise cross the distance to it. | |
| 8 | "placement": { "mode": "smart" }, | |
| 9 | "main": "build/index.js", | |
| 10 | "build": { "command": "cargo install -q worker-build@0.8.7 && worker-build --release" }, | |
| 11 | // Reached only through service bindings. | |
| 12 | "workers_dev": false, | |
| 13 | "d1_databases": [ | |
| 14 | { | |
| 15 | "binding": "DB", | |
| 16 | "database_name": "g1t-billing", | |
| 17 | "database_id": "695a6979-fd07-4850-bc97-904a6b4b7a04", | |
| 18 | "migrations_dir": "migrations" | |
| 19 | } | |
| 20 | ], | |
| Billing on Stripe's pages, month-end charges, warnings; sudo by workspace | 21 | // Identity emails owners as their workspace nears its usage limit. |
| 22 | "services": [{ "binding": "IDENTITY", "service": "g1t-identity" }], | |
| Agents and memory, checks and conflicts, profiles, slug renames, custom domains | 23 | // Events from the bus: a workspace renamed moves its billing to the |
| 24 | // new slug (src/rename.rs). | |
| 25 | "queues": { | |
| 26 | "consumers": [{ "queue": "g1t-events-billing", "max_batch_size": 20, "max_batch_timeout": 1 }] | |
| 27 | }, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 28 | "vars": { |
| Prices are what g1t pays plus 20%, from the first second | 29 | // What is added to a model run's cost, in percent: g1t's overhead for |
| 30 | // running and building it. The price book's markups are the same. | |
| Integrations: your own model provider, alerts that open issues, tickets agents read | 31 | "MARGIN_PERCENT": "20", |
| Free while g1t is being built out; agents can check out their own forks | 32 | // While g1t is being built out, workspaces pay nothing: runs are |
| 33 | // recorded with what they cost, and nothing is charged. Set to | |
| 34 | // "false" when pricing starts. | |
| Billing accounts, terms and enterprises; g1t is no longer free | 35 | // Off: workspaces are charged as their account's terms say. g1t's own |
| 36 | // (syntaqx) is comped in sudo.g1t.sh, not by this switch. | |
| 37 | "FREE_WHILE_BUILDING": "false", | |
| Usage limits: unpaid usage can only go so far | 38 | // How far a workspace's unpaid usage may go before its work stops |
| 39 | // (see src/limits.rs): $3 before any live payment, then twice what | |
| Billing accounts, terms and enterprises; g1t is no longer free | 40 | // it has paid, between $25 and $1,000. Comped and custom terms are set |
| 41 | // per account in sudo.g1t.sh. | |
| Usage limits: unpaid usage can only go so far | 42 | "LIMIT_NEW_MICROS": "3000000", |
| 43 | "LIMIT_PAID_MIN_MICROS": "25000000", | |
| 44 | "LIMIT_PAID_MAX_MICROS": "1000000000", | |
| A free allowance on g1t's models, so anyone can try its agents | 45 | // A free allowance on g1t's hosted models, so people can try g1t's |
| 46 | // agents without a key of their own: each workspace may use this | |
| 47 | // much model cost ($1), out of one pool for everyone ($40), until | |
| 48 | // the end of finalist judging (2026-10-22, 11:59 PM Pacific). Any | |
| 49 | // of them empty turns it off. | |
| 50 | "TRIAL_WORKSPACE_MICROS": "1000000", | |
| 51 | "TRIAL_TOTAL_MICROS": "40000000", | |
| Paid features: a workspace turns on Deployments with a monthly plan | 52 | "TRIAL_UNTIL": "2026-10-23T06:59:59Z", |
| 53 | // The Deployments plan's monthly price, in cents. Turning the | |
| 54 | // feature on starts it; FREE_WHILE_BUILDING does not cover it. | |
| Prices keep themselves current with what g1t pays | 55 | "DEPLOYMENTS_MONTHLY_CENTS": "500", |
| 56 | // Where the keeper reads what g1t pays (src/keeper.rs). Its token, | |
| 57 | // CLOUDFLARE_USAGE_TOKEN, is a secret: Billing, Account Analytics | |
| 58 | // and AI Gateway, read only. | |
| 59 | "CLOUDFLARE_ACCOUNT_ID": "1e6f2cffa3f445920836e8ebe446bb58", | |
| 60 | "AI_GATEWAY_ID": "g1t" | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 61 | }, |
| Prices keep themselves current with what g1t pays | 62 | // Settling runs every 15 minutes; checking costs daily (keeper::DAILY). |
| 63 | "triggers": { "crons": ["*/15 * * * *", "17 4 * * *"] }, | |
| Agents as a team: lifecycle, merge queue, billing and a new shell | 64 | // Secret: STRIPE_SECRET_KEY. Without it nothing is charged and the |
| 65 | // runner decides who may start agents some other way. | |
| 66 | "observability": { "enabled": true } | |
| 67 | } |