Skip to content

Add cost tracking, API-key spending limits and dashboard (0.13.0) - #83

Merged
nielsrolf merged 2 commits into
mainfrom
codex/cost-tracking
Sep 22, 2026
Merged

nielsrolf merged 2 commits into
mainfrom
codex/cost-tracking

Conversation

@nielsrolf

Copy link
Copy Markdown
Collaborator

Adds USD compute accounting by job, worker, submitting API key and user. A worker’s startup/idle overhead is retained separately and allocated equally among its distinct jobs by default; retries do not add overhead shares. Ledger history survives operational record deletion.

Adds lifetime API-key budgets with database admission checks and manager cancellation, plus a paginated Costs dashboard, limit editor, SDK and REST APIs. Limits use accrued estimates and may overshoot during concurrent execution and shutdown. Unknown historical prices remain explicitly unpriced. Only authenticated organization admin users can change limits.

Validation: 67 unit/API/PostgreSQL tests pass, frontend production build passes, wheel/sdist build passes. Docker source overlays retain the validated v0.12.1 dependencies and pass pip check. The additive migration has been applied to production after backup verification; authenticated production cost-report smoke test passed against 73k runs and 103k worker records.

Release: 0.13.0. Apply 20260922000000_cost_tracking.sql before upgrading other installations. See docs/cost-tracking.md for attribution, accounting, budget semantics and rollout details. Adds CI for the regression/database tests and frontend build, and excludes installed frontend dependencies from package builds.

@nielsrolf
nielsrolf merged commit ec51f05 into main Sep 22, 2026
1 check passed
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