Skip to content

Cached Tokens usage #21217

@jakehwll

Description

@jakehwll

Currently we're returning in the metadata the following fields (Anthropic-specific here).

          "metadata": {
            "cache_creation_input": 12165,
            "cache_ephemeral_1h_input": 0,
            "cache_ephemeral_5m_input": 12165,
            "cache_read_input": 0,
            "web_search_requests": 0
          },

We can consume this data and render it in the frontend, however its stored in an Record<string, any> type. We're essentially looking for a clean way to decode this data (if it exists) and render how the caching for this went.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions