Dashboard › opencode-lore › GatewayResponse usage optionality
01a0a07a-58e0-7c0f-88b0-fcc66cd23304Gateway accumulators try to populate usage, but GatewayResponse.usage remains optional because compatible providers and partial responses may omit it. Chose preserving absent cacheCreationInputTokens as undefined over coercing it to zero because zero would masquerade as provider-reported cache-write usage in analytics and cost tracking; use numeric fallbacks only where serialization or scaling requires them.