Let me tell you about the day the bill came in.
A hundred and fifty dollars. For an AI assistant. One that answers my phone, watches my house, and keeps my notes straight. Not a fortune, but enough to make a man stop and ask: where did it go?
And I did what we all do. I pointed at the biggest, shiniest thing in the room. It had to be the heavy models. The fancy ones. The ones with the big names and the big price tags. Case closed.
Except the case was not closed. The case was wrong.
Act One: The Wrong Suspect
When I finally went looking, I found something that humbled me. Those expensive models I was blaming? They were never even switched on. My assistant could not have called them if it tried. The name on the wanted poster didn't match the crime.
The real culprit was quieter. Five tool servers I had connected and forgotten, sitting idle, doing nothing. But every single time I sent my assistant a message, all of those tool descriptions rode along in the request. Forty-odd tools, announced again and again, for a week. Nobody invited them. Nobody was watching them. And every message paid their fare.
Lesson one: the leak is rarely where you're pointing. It's usually the thing nobody's looking at.
So I switched providers. Moved the daily brain from Claude over to Gemini, because Claude felt like it was gulping tokens instead of sipping them. And what happened? Nearly forty-three dollars on Gemini alone, in a short stretch.
Wrong suspect again. That's when I stopped guessing and started reading. Not summaries. The raw transcripts, turn by turn.
Act Two: What My Assistant Re-Reads Every Single Time
Here's the thing nobody tells you about these assistants. They have no memory. None. Every time you say a word, the whole conversation gets sent back to the model from the top. Your system instructions, your tools, your notes, everything you've said so far, and then your new sentence on the end.
Picture a man who has to re-read an entire book from page one every time you ask him a question. That's the job. And you pay by the word.
Two leaks lived in that floorboard.
Leak one: the shadow that weighed more than I did. Gemini's "thinking mode" hands back a big, opaque blob of its own reasoning, and that blob gets sent back with the next message, and the next. My messages were a few hundred bytes. The requests were eighteen thousand tokens. The thinking was following me around like a shadow that outweighed me. I turned the thinking off by default.
Leak two: the conversation that never ended. One Discord session ran eleven and a half hours. It started at about fifty thousand tokens, which is the floor, just the instructions and tools before anyone says hello, and it climbed past two hundred and fifty thousand. By the end, a two-word reply cost around eight cents, just to re-read the history. Nothing ever told it to summarize and let go. So now, when a session's transcript passes a size limit, it gets condensed to a summary and a short tail, and we start fresh.
Act Three: Paying Once for What Doesn't Change
Now here's the part I love, because it's the part where the fix is clever instead of just firm.
Most of what gets re-read every time is the same. My assistant's instructions don't change between messages. Neither do its tools, or its notes. About seventeen thousand tokens of it, identical, every turn. Why pay full price to read the same page a thousand times?
You don't have to. The providers will let you cache it. You hand over the unchanging part once, they remember it, and every request after that pays a fraction of the price for the cached portion. That's prompt caching, and it comes in two flavors:
- Claude's way is automatic, once it's switched on properly. When I checked, it was already working: tiny fresh input per message, a small top-up written to the cache, and mostly cheap cache-reads. Except the software only turned it on by default for one particular address, and because I route through a gateway (more on that in a minute), I had to set it explicitly.
- Gemini's way is explicit. You create a named cache, and it lives for a set time. Mine holds roughly seventeen thousand tokens and lives for an hour. Storage costs only pennies an hour while it's alive.
And I'll tell you what taught me humility again. When I first looked at Gemini, it showed zero cache writes across every message I checked. It had caching available and wasn't using it. I was paying full price to re-read the same page, over and over, and the dashboard looked perfectly healthy. I only knew because I read the logs.
That word, TTL, time to live, is the whole trick. A cache that lives forever goes stale. A cache that dies too fast saves you nothing. An hour is long enough to carry a working session and short enough to stay honest.
And one more honest finding: the cached part isn't the big lever. The big lever is the conversation history, forty to eighty thousand tokens billed at full price every turn. So the cache helps, but the real discipline is keeping sessions lean, compacting often, and starting fresh when the topic changes.
The Payoff: Loading a Whole Rulebook in One Breath
I play tabletop games. I wanted my assistant to answer rules questions fast, and correctly, from the actual rulebooks. Not from fuzzy memory. Not by searching chunks and hoping.
So we use the cache as a feature, not just a savings account. I say, "initiate Shadowdark protocol," and the whole rulebook gets loaded into a Gemini cache once. Then every rules question goes to the model that has read the entire book, and comes back in about ten seconds with a citation. Each question I ask pushes the cache's clock back to a full hour. When I say I'm done, it unloads.
One load. Many questions. Same idea as everything above: pay once for what doesn't change.
Act Four: You Can't Cut What You Can't See
Here's the part that stung. For weeks, my assistant's own cost counter was lying to me. Zero for one provider. Blank for the other. I had to rebuild the costs by hand from raw token counts, and when I did, Claude usage since April came to over three hundred dollars, of which the tool itself had only ever recorded about a hundred and sixteen.
You cannot manage what you cannot measure. So I put a gateway in the middle.
Every request, to every model, now passes through a free cloud AI gateway on its way out. It logs the status, the tokens, and the cost of each call. The first test calls cost fractions of a cent, and I remember grinning at that. Then came the gotchas, because there are always gotchas:
- One provider quietly bypassed the gateway. The software preferred its own built-in model list over my configuration. I only caught it because the logs went quiet. A silent log is a loud clue.
- A "402, insufficient credits" error looked scary, and meant nothing. It just meant a request showed up without its key.
- I left the gateway's own response caching off on purpose. It only matches identical requests, and conversations are never identical. A free-sounding feature isn't always a useful one. Notice the difference: caching the part that never changes is gold. Caching whole answers to questions that never repeat is nothing.
And every morning, my daily report now tells me yesterday's AI spend, split by provider, with a call count and a seven-day average. If spend jumps to three times normal, the report turns red.
So, What Does It Cost Now?
Here is the honest answer, straight from the gateway logs.
In the ten days since the gateway went live (Oct 8 through Oct 17), total spend was roughly thirty dollars: about twenty-five on Claude and under five on Gemini.
Some days were nearly free. Several came in under fifty cents. And some days weren't: October 9th hit about eleven dollars, and the 13th about seven. Those are the days I got to go look, because now I can see them. That's the entire point. Spending didn't go to zero. It went from a mystery to a number.
And that Oct 9 spike taught me one more lesson. Gemini hit its monthly spending cap, a thirty-dollar limit I set on purpose, earlier than I predicted. It simply stopped answering, and the traffic shifted to the more expensive model. A cap protects your wallet and can quietly raise your costs at the same time. Know what your system does when it hits the wall.
What I'd Tell You Over Coffee
- Don't trust the first suspect. I was sure it was the expensive models. I was wrong, and I was wrong with confidence.
- Read the raw logs. The summaries lied. The transcripts didn't.
- Pay once for what doesn't change. Cache the stable part of every request, and give it a sensible time to live.
- Cap the things that grow. Sessions, context, tools. If it can grow forever, it will.
- Put a meter on it. A gateway with logging costs nothing and turns "I think" into "I know."
- Verify your fixes. Don't just fix it. Check back and see that the number moved.
I started this journey angry about a hundred-and-fifty-dollar bill. I'm ending it with a daily number, a red alert for spikes, a cache that pays for itself, and a lot more respect for the quiet things.
Hold your head high. Keep your meters running. You can make it.
Keep hope alive.
By PhoneScreener
No comments:
Post a Comment