Estimate cost, measure cache use and handle failures

Calculate costs from the supplied fictional rates, separating ordinary input, cache and output tokens, then compare forecast with observation. Plan a cautious r