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
@jakehwll jakehwll requested a review from jaaydenh December 15, 2025 08:52
@jaaydenh
Copy link
Contributor

@jakehwll you mentioned this is temporary but it still may be useful to a test to confirm the logic

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.

:shipit:
Thanks @jakehwll

@jakehwll jakehwll enabled auto-merge (squash) December 17, 2025 00:14
@jakehwll jakehwll merged commit e4f87d5 into main Dec 17, 2025
31 checks passed
@jakehwll jakehwll deleted the jakehwll/requestlogsrow-cached-tokens branch December 17, 2025 00:21
@github-actions github-actions bot locked and limited conversation to collaborators Dec 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cached Tokens usage

3 participants