ColdCacheWarning(
self,
policy: PromptCachePolicy,
estimate: RewarmEstimate,
context_tokens: int,
age_seconds:| Name | Type |
|---|---|
| policy | PromptCachePolicy |
| estimate | RewarmEstimate |
| context_tokens | int |
| age_seconds | float | None |
| reason | ColdCacheReason |
Validated data needed to render one advisory warning.
Constructed only after every gate has passed -- a policy resolved, the prefix cleared the provider's cache minimum, and the priced delta reached the configured threshold -- so the modal renders it without re-deciding anything.
Idle time since the last successful turn.
None exactly when reason is age_unknown, which is the only case where
no usable request time exists. Optional rather than a sentinel so the modal
cannot render an age it does not have.
Why the cache is treated as cold; selects the modal's copy.