Defines a unified cache‑miss reason type for Anthropic SDK diagnostics.
// Source: https://github.com/obra/lace | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// ABOUTME: Discriminated union mirroring @anthropic-ai/sdk's BetaDiagnostics.cache_miss_reason
// ABOUTME: SDK 0.98.0 exports the individual variants but no named union — we build one here
import type {
BetaCacheMissModelChanged,
BetaCacheMissSystemChanged,
BetaCacheMissToolsChanged,
BetaCacheMissMessagesChanged,
BetaCacheMissPreviousMessageNotFound,
BetaCacheMissUnavailable,
} from '@anthropic-ai/sdk/resources/beta/messages/messages';
/**
* The discriminated union of cache-miss reasons returned by the Anthropic
* cache-diagnosis-2026-04-07 beta. Mirrors the shape of
* `BetaDi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key