Tag:Cost

Articles, tutorials, and guides tagged Cost.

10 min

Your Model Advertises 1M Tokens. It Starts Forgetting Around 600K.

A million-token context window landed in half the models this week, and the reflex is to stop retrieving and just paste everything in. The window is real. The quality across all of it is not. Here is how to measure your model's actual effective context, then spend the window with a token budget instead of filling it and paying linearly for output that quietly gets worse.

LLM Engineering
Context Engineering
11 min

Your Agent Called the Same Tool Seventy Times and Billed You for It

A ReAct-style agent calls the same search tool, gets the same unhelpful result, decides another identical call will help, and does it again. Seventy times. It never crashes and never finishes, it just burns tokens going nowhere until a timeout or your bill catches it. A hard step ceiling is a backstop, not a fix. What you want is a guard that notices the agent has stopped making progress and breaks the cycle in seconds.

AI Agents
Reliability
11 min

Your Agent Has 200 Tools and Picks the Wrong One

Connect enough MCP servers and your agent carries hundreds of tool definitions into every turn. It pays for all of them on every request and still reaches for the wrong one, because the model is choosing from a wall of near-duplicate schemas. The fix is to stop shipping the whole toolbox and retrieve the handful that matches the task instead.

AI Agents
Tools
10 min

Your Agent Kept Working After the User Left

A user closes the tab and your agent keeps going: three tool calls in flight, two subagents still reasoning, tokens still burning for an answer nobody will read. The fix is a deadline that every layer respects and a cancel that propagates down the whole tree, tearing in-flight work down cleanly instead of leaving it to finish alone.

AI Agents
Reliability
11 min

Your Agent Cost $2 Yesterday and $40 Today and You Cannot See Why

An agent's cost is elastic and path-dependent, so the same task runs for two dollars one day and forty the next. Plain logs will not tell you which step looped. A distributed trace built on OpenTelemetry's GenAI conventions shows you exactly where the tokens went.

LLM
Agents
11 min

You Pay Full Price for the Same 8,000-Token Prompt on Every Agent Step

An agent resends the same enormous system prompt, tool list, and history on every step, and without prefix caching you pay full input price and full prefill latency each time. Structuring the prompt so the provider reuses its KV cache cuts both, and one wrong byte quietly turns it all off.

LLM
Agents