amal66 puts a real lock on the meter
Per-user message limits now get enforced on the server before any expensive AI call fires - not just shown in the interface.
Until now, the cap on how many messages a user could send each month lived only in the interface: a counter that looked like a limit but stopped nothing. A user who knew where to push could keep firing off costly AI requests well past their allowance, and the bill kept climbing.
amal66 moved the check to the backend, so the limit is verified before the system ever calls the AI. The work comes with a careful set of tests covering the awkward edges - what happens at the exact limit, when the monthly counter resets, and when the database hiccups. One caveat for anyone borrowing it: the enforcement is wired to this fork's specific credit-tracking setup, so it isn't a drop-in part.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?