· rangkumin.tech

AtmoRouter analysis: tool calling token cost is mostly re-billed input

Tool schemas and tool results are re-sent on every turn, so input tokens, not output, dominate a tool-heavy agent bill. This walkthrough models a 30-turn session, shows how to measure cached versus fresh input, and lists five changes that cut cost.

Why it matters

Every request an agent makes carries the full tool array and the whole message history. A tool called once is billed on every later turn, and its result is billed again on each turn that follows. In the modelled session, tool definitions alone account for 27 percent of all input tokens.

The fix is measurement before optimisation. Read the usage object, log cached tokens per turn, and compute a real per-turn cost instead of guessing from a tokenizer. If the cache share stays at zero, that is a caching bug, not a pricing problem.

Then prune. Twelve tools instead of 42 removes roughly 117,000 tokens from the same session, and byte-stable tool ordering keeps the 10 percent cached-input rate where the model supports it. This is an AtmoRouter-authored article; the figures are illustrative and the live model page is the authority on rates.

Sources

Choose English or Indonesian. Up to two editions a day. Unsubscribe anytime.