Anthropic and OpenAI both now expose details on tokens that are written to the prompt cache. However, currently M.E.AI only exposes a strongly-typed property for cache reads, not cache writes. We should expose it. Additionally, otel defines in the genai semantic convention how cache writes should be emitted, just as it does for cache reads... we should make sure the data flows correctly.
Anthropic and OpenAI both now expose details on tokens that are written to the prompt cache. However, currently M.E.AI only exposes a strongly-typed property for cache reads, not cache writes. We should expose it. Additionally, otel defines in the genai semantic convention how cache writes should be emitted, just as it does for cache reads... we should make sure the data flows correctly.