Gavin Theodore

Gavin Theodore

Product Developer

About

Product Developer passionate about building innovative products, solving problems, and turning creative ideas into practical digital solutions.

Badges

Tastemaker
Tastemaker
Gone streaking
Gone streaking

Forums

How do you convert LLM token usage into credits for billing?

If you charge for an AI product on usage, you ve probably hit this. Your LLM provider reports tokens, Stripe bills whatever number you send it, and customers want credits they can understand.

I wrote up the full logic step by step: capturing input, output and cached tokens, pricing them from a model rate card, adding margin, converting to credits, and metering on Stripe. There s a worked example with real numbers throughout.

•

12d ago

My Agent Wrote a Test That Passed. I Reverted the Fix. It Still Passed.

I was reviewing an agent's work on a bug fix. Clean diff, passing test, looked fine.

Something made me suspicious. So I reverted the fix and ran the test again. Green. The assertion was checking the input parameters, not the result. The bug was still in production.

View more