Commit 0c85b87
authored
fix(frontend): provider-reported cost tooltip shows $0 for usage.cost_details format (#440)
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_cost` — `usage.cost_details` path
**File changed:**
- `packages/frontend/src/components/ui/CostToolTip.tsx`1 parent 3317d14 commit 0c85b87
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
116 | 118 | | |
117 | 119 | | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
121 | | - | |
| 123 | + | |
122 | 124 | | |
123 | 125 | | |
124 | 126 | | |
| |||
0 commit comments