Follow-up from #32 (PR #43). Token estimates are derived; the authoritative platform Workers-AI cost is Cloudflare's. Pull real neuron spend from Cloudflare GraphQL Analytics / billing API and surface it as the headline platform-spend number, with per-figure source: "cf-actuals" | "estimate". Cache the pull (rate-limited/slow).
Infra: the API worker has NO CF creds bound today (workers/api/wrangler.toml) — add CLOUDFLARE_API_TOKEN (Analytics read scope) + CLOUDFLARE_ACCOUNT_ID as secrets/vars (Doppler pags/prd already has both).
Part of the PAGS Admin Portal epic (#27). Pairs with the ledger metering follow-up.
Follow-up from #32 (PR #43). Token estimates are derived; the authoritative platform Workers-AI cost is Cloudflare's. Pull real neuron spend from Cloudflare GraphQL Analytics / billing API and surface it as the headline platform-spend number, with per-figure
source: "cf-actuals" | "estimate". Cache the pull (rate-limited/slow).Infra: the API worker has NO CF creds bound today (
workers/api/wrangler.toml) — addCLOUDFLARE_API_TOKEN(Analytics read scope) +CLOUDFLARE_ACCOUNT_IDas secrets/vars (Dopplerpags/prdalready has both).Part of the PAGS Admin Portal epic (#27). Pairs with the ledger metering follow-up.