Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

fix(economics): correct OpenRouter analytics endpoint, operator-provided Railway usage

3 months ago

3d811e5
Authored
grim7/23/2026, 2:34:58 AM
OpenRouter: the pull hit /api/v1/analytics/get-user-activity (404). Switch to the
documented POST /api/v1/analytics/query with a half-open day time_range; parse
total_usage and tokens_total. Optional prod/eval split via key-hash filters.
Railway: billing has no stable public GraphQL query (the estimatedUsage guess
400d). Replace it with an operator-provided RAILWAY_USAGE_USD figure, marked
estimated, mirroring the flat PlanetScale model. Tests and .env.example updated.

Parent06ebb59

3 files changed
  • .env.example+5−4
  • apps/worker/src/jobs/pull-provider-costs.test.ts+29−13
  • apps/worker/src/jobs/pull-provider-costs.ts+81−77