Writing / Tag / 7 of 67

Cost Optimization

Every essay tagged Cost Optimization, newest first.

Cost optimization here is the deliberate side of the cost story: the techniques, in roughly the order I would apply them. Route each request to the cheapest model that can handle it. Match reasoning effort to query difficulty instead of paying for thinking that easy queries never use. Cache the answers you have already given. Offload the 40,000-token tool result that the agent needed twelve tokens of. Cap each tenant before the call, not after the bill.

None of this trades away quality if you do it with an eval gate in place, which is why the cost guide and the evals essays lean on each other. The cheap path is only cheap if you can prove it still works.

Read model routing first; it is the biggest lever for most teams and the easiest to measure. Then reasoning effort budgeting, which matters more every month as thinking models become the default, and semantic caching for the questions your agent has already answered fifty times today.

Read the guide: LLM Cost Optimization for Agents: A Production Guide