Files
DocsGPT/tests
Alex 6826313b60 feat(quotas): limit resolution and the quota service
docsgpt/quotas resolves a user's effective token and cost limits from the
policy rows that apply to them: their own override, then the most generous
allowance among their teams, then the instance default, then any defaults a
registered provider supplies. Each budget resolves on its own, and a team
counts once however many memberships the user holds in it.

QuotaService compares those limits with the user's token_usage totals over
the current QUOTA_PERIOD window (calendar-aligned, UTC, computed at read
time). It fails open, and skips the usage query for unlimited users.
2026-09-21 12:11:11 +01:00
..
2026-09-14 14:12:21 +01:00
2026-09-12 19:35:22 +01:00
2026-03-12 14:46:26 +00:00
2026-04-18 13:13:57 +01:00
2026-01-22 13:11:24 +02:00