Skip to content

Add strongly-typed UsageDetails for cache write tokens #7625

Description

@stephentoub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions