How does this handle transitions when a customer changes plans mid-billing cycle e.g.they downgrade from paid to free but their current usage already exceeds the free plan's limits? Is it immediately enforced or is there some sort of reconciliation mechanism?
The default behavior for a downgrade is to start denying usage if a hard limit has been set and the usage is over the new plan's limit.
Limitr is entirely event-driven though, so adding a handler with custom downgrade logic is straightforward.
A lot of use cases can be implemented with soft limits also, which allow overage and emit overage events that you can charge for or handle gracefully (user notifications, model downgrades, etc).
In these cases, what is the desired behavior for you?