AIToday
Large Language ModelsAI Business & IndustryZenn AI/MLPublished: Oct 12, 2026, 22:00 JST

About 150 unlogged paid AI calls worth $8 spur a single budget gate

About 150 unlogged paid AI calls worth $8 spur a single budget gate

3 Key Points

  1. What happened

    Old code called an expensive paid model for reliability, but the calls were never logged — about 150 calls worth roughly $8 in a week. The ledger was split across two places, and the monitor read the empty one.

  2. Why it matters

    The gap went unnoticed because the monitor kept reporting nothing, and a report of nothing looked normal — so the fix was to route all paid calls through one gate that stops when the ledger cannot be read.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

The unlogged calls were not the largest problem in this account; the fact that no one noticed was. The gate described here counts usage as the larger of the ledger total and the API key's actual usage, so a missing entry in the ledger is still caught. It also stops rather than reading an unreadable ledger as zero, a design choice tied directly to the "nothing reported" failure.

Other fixes in the account follow the same shape. Before text goes to an external model, a redaction function masks payment numbers, API keys, and token-like values, on the principle that over-masking is safer than a leak. Keys and workspace IDs are read only from a file, never from environment variables, and their values are kept out of logs, exception messages, and return values. Framework accidents — a command chain that continued after a failure and pushed from the wrong working tree — led to set -e for write sequences and checks of the current tree and branch before a push, plus bans on force push and on bypassing hooks with --no-verify.

The throughline is that attention is placed in the mechanism, not in the operator. Agents do not get tired, but they also do not carry over carefulness, so the account favors gates that must be passed before anything proceeds and settings that stop on failure. Money is handled the same way: real funding, charges, and identity checks are done only by people, while AI operates within a pre-approved range such as free tiers or a fixed budget.

FAQ
How did the paid calls go unlogged?
The ledger was split across two places, and the monitor read the empty one, so it reported nothing each time. The calls were made by old code that called an expensive paid model for reliability.
How does the new gate decide when to stop?
It uses the larger of the ledger total and the API key's actual usage, and it stops rather than treating an unreadable ledger as zero. It also has weekly and daily limits.
What is recommended for writing secrets and code that runs on people's machines?
Secrets and workspace IDs are read only from a file, never from environment variables, and their values are kept out of logs, exception messages, and return values. Scripts handed to a person to run are written in ASCII only, because a Japanese comment in a BOM-less .ps1 was read under a different encoding by Windows PowerShell 5.1 and failed silently.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleUS and European open-weight models trail Chinese rivals like GLM-5.3