Hearth · four scenarios · simulator

The same library, four different outcomes

These prices are the offline simulator for Gemini 2.5 Flash. They are not a provider bill. Regenerate this page with hearth scenarios --html hearth-scenarios.html.

A clock at the top of the instructions

The system text is the same every turn except the time. Observe and safe send that changing line first, so nothing is read from cache and the guard blames the app. Optimize takes the time out of the instructions. On the next turn it writes the same time again onto the message it already sent, and puts the new time only on the new turn. The guard records no app-caused break. The input cost falls because the stable instructions are read from cache. The clock is a few tokens, so once those instructions are stable the read share barely moves.

ModeRead shareInput cost vs no cacheBreaks blamed on the app
observe0.0%1.00×2
safe0.0%1.00×2
optimize66.5%0.42×0

The same tools, in a new order

The second call sends the same three tools shuffled. Safe puts them back in the first-seen order before the simulator prices the call.

ModeRead shareInput cost vs no cacheBreaks blamed on the app
observe0.0%1.00×1
safe49.9%0.56×0
optimize0.0%1.00×1

Too short to cache

The prompt is one short question. A miss here is the provider minimum, and it is not counted as the application's fault.

ModeRead shareInput cost vs no cacheBreaks blamed on the app
observe0.0%1.00×0
safe0.0%1.00×0
optimize0.0%1.00×0

An earlier message was edited

The first user message changes on the next call. Hearth names that break. It does not quietly rewrite history to hide it.

ModeRead shareInput cost vs no cacheBreaks blamed on the app
observe49.9%0.57×1
safe49.9%0.57×1
optimize49.9%0.57×1