A request arrives, you check the balance, you let it through. That is where most metering ends — and it is where the money starts.
A streaming completion can run for minutes. A caller with $0.40 left can start a request that costs $6.00, and every check you did happened before the first token came back. The balance was fine when you looked.
The fix is not a bigger check at the start. It is a hold taken before dispatch, an accrual loop that watches the response as it arrives, and a socket that gets cut when the hold is exhausted — with a terminal frame that tells the client why, in the shape its protocol expects.
That last part matters more than it sounds. A stream that simply stops is indistinguishable from a network failure, and a client that cannot tell the difference will retry — which is the one thing you do not want a caller at their limit to do.



