The "Spend on your keys" panel lists every BYOK usage row the dashboard returns, but it assumes all rows belong to one reporting period: the header shows the first row's period and pagination walks through every row regardless of period. When the API returns rows from several periods, there is no way to see what a single provider cost in a given period, how that moved since the previous period, or to get the figures out of the dashboard for reconciliation against provider invoices.
What we want:
- Group rows into reporting periods (same start and end instant), newest first, and show one period at a time with a way to switch between them.
- For the selected period, show one summary per provider with its cost total, whether that total is provider-reported or estimated, and whether it is only partial because some rows had no cost data, together with the usage totals (tokens, calls, sandbox seconds), a per-model breakdown for model rows, and the provider's share of the period total as a whole percentage (shares should add up to 100).
- Show a period total across all providers using the same rules, and show how each provider and the period total moved against the previous period (up, down, unchanged, or new this period).
- Offer the selected period as a CSV download (one line per provider, per model and for the whole period) so the numbers can be used outside the dashboard.
- Keep pagination scoped to the selected period.
The decoder and the existing row rendering should stay as they are.
The "Spend on your keys" panel lists every BYOK usage row the dashboard returns, but it assumes all rows belong to one reporting period: the header shows the first row's period and pagination walks through every row regardless of period. When the API returns rows from several periods, there is no way to see what a single provider cost in a given period, how that moved since the previous period, or to get the figures out of the dashboard for reconciliation against provider invoices.
What we want:
The decoder and the existing row rendering should stay as they are.