Skip to content

Conversation

@jakehwll
Copy link
Contributor

@jakehwll jakehwll commented Nov 28, 2025

Closes #21217

This pull-request traverses the token_usages.metadata[...] fields and merges them into a single consumable object so that we're able discern information about the metadata within the token usages at a glance. Its not the be-all end-all implementation of this feature but its a stepping stone in order to render more useful data to the frontend.

These are currently mergable because they only contain number based fields. When it encounters something within the object that can't be merged (minus empty objects {}) it will simply return them as an array.

Preview

CleanShot 2025-11-28 at 15 30 09@2x

Logic breakdown

CleanShot 2025-11-28 at 15 11 13@2x

Copy link
Contributor

@dannykopping dannykopping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me, needs some tests please.
Someone from the FE squad will have to give the final review, though.

@jakehwll jakehwll changed the title feat: <RequestLogsRow /> cached tokens output feat: output cached tokens for <RequestLogsRow /> Dec 2, 2025
@github-actions github-actions bot added the stale This issue is like stale bread. label Dec 10, 2025
@jakehwll jakehwll marked this pull request as ready for review December 12, 2025 09:48
@jakehwll jakehwll requested a review from jaaydenh December 12, 2025 09:48
@jakehwll jakehwll removed the stale This issue is like stale bread. label Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cached Tokens usage

4 participants