Skip to content

fix(frontend): provider-reported cost tooltip shows $0 for usage.cost_details format#440

Merged
mcowger merged 1 commit into
mainfrom
provider_cost
May 19, 2026
Merged

fix(frontend): provider-reported cost tooltip shows $0 for usage.cost_details format#440
mcowger merged 1 commit into
mainfrom
provider_cost

Conversation

@mcowger
Copy link
Copy Markdown
Owner

@mcowger mcowger commented May 19, 2026

When provider-reported cost arrives via usage.cost_details (not SSE : cost), the tooltip read data.request_cost_usd which was undefined, causing it to display $0 while the logs row correctly showed the real cost.

Fix: Read cost from both formats:

  • data.request_cost_usd — SSE : cost comments
  • data.cost_details?.total_costusage.cost_details path

File changed:

  • packages/frontend/src/components/ui/CostToolTip.tsx

…st_details formats

The tooltip only read data.request_cost_usd, which works for SSE : cost
comments but not for the newer usage.cost_details path where the value
is stored at data.cost_details.total_cost. This caused the tooltip to
show /bin/bash while the actual log row displayed the correct cost.
@mcowger mcowger merged commit 0c85b87 into main May 19, 2026
1 check passed
@mcowger mcowger deleted the provider_cost branch May 19, 2026 05:23
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.

1 participant