CacheWriteBucket = Literal['generic', 'generic_write', '5m']Which pricing treatment a cold (cache-writing) request receives.
5m prices Anthropic's five-minute ephemeral write premium. generic_write
tags the miss as a cache write, which GPT-5.6+ bills above the plain input
rate; omitting the detail would price the miss at plain input. The premium's
current magnitude comes from the pricing catalog, not from here. generic
covers misses with no write surcharge, which is how OpenAI priced prompt
caching before GPT-5.6.
generic_write is assigned by model-name version (see
_openai_uses_thirty_minute_cache), not by inspecting the catalog, and that
coupling is not enforced: a future 5.6-family model with no published cache
rates would be tagged generic_write and priced at plain input by
estimate_cost, which drops detail keys the catalog cannot price. Models
carrying no cache rates at all already exist in the catalog, so this is a
reachable state rather than a theoretical one.