Skip to main content

From LinkedIn · · 1 min

You still pay for the call

We'd put guardrails around a paid follow-up: explicit consent, a single charge. If the answer can't be stored, the provider cost has already been incurred.

By Olha Shevchenko. Builds and reviews production AI systems on Node.js and AWS.

Your AI model can generate a perfectly good answer. Your app can fail to save it. You still pay for the call.

This scenario came up during a payment-flow review of a small app I was building.

We'd put guardrails around a paid follow-up: explicit consent, a single charge. Without consent, no model call.

That sounds reasonable until you look at what happens after the model returns.

If the answer can't be stored, the provider cost has already been incurred. The user doesn't get a saved answer, but the call isn't free.

The cost had better persistence than the answer.

We also had an alarm and a kill switch. Both were useful. Neither was a total spend cap.

And then another review found a different mismatch.

Our request budget counted incoming requests. But one request could trigger multiple provider attempts.

So the request counter could look perfectly happy while the actual number of provider calls told a different story.

Nothing ran away. We caught both gaps during design and code reviews.

And that's what made it interesting.

None of these controls were useless. They were doing exactly what we'd designed them to do.

We'd bounded what the user could pay.

We just hadn't bounded our provider costs with those same controls.