AI posts
Everything in the journal filed under ai.
2026
What your AI feature does when the credit runs out
A model provider can fail for billing, quota or an outage. Without a fallback ladder every user sees the same generic error. How to degrade on purpose.
Keeping an AI feature affordable in production
An AI feature that works can still produce a bill nobody planned for. Where the tokens go, what to cache, what to trim and how to cap spend per user.
2025
A streamed response that never closes hangs for a hundred seconds
Tokens arrive, the answer is complete, and the request stays open until a proxy kills it. How to close a stream and test it through the real domain.