Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion packages/frontend/src/components/ui/CostToolTip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,14 @@ export const CostToolTip: React.FC<CostToolTipProps> = ({ source, costMetadata,
</div>
);
} else if (s === 'provider_reported') {
// Support both SSE `: cost` format (request_cost_usd) and usage.cost_details format
const reportedCost = data.request_cost_usd ?? data.cost_details?.total_cost;
content = (
<div style={containerStyle}>
<div style={headerStyle}>Source: Provider Reported</div>
<div style={gridStyle}>
<span style={labelStyle}>Cost:</span>
<span style={valueStyle}>${formatRate(data.request_cost_usd)}</span>
<span style={valueStyle}>${formatRate(reportedCost)}</span>

{data.cache_savings_usd !== undefined && (
<>
Expand Down