Skip to content

feat(usage): add pairwise cost comparisons#925

Open
rodboev wants to merge 12 commits into
kenn-io:mainfrom
rodboev:pr/usage-cost-comparison
Open

feat(usage): add pairwise cost comparisons#925
rodboev wants to merge 12 commits into
kenn-io:mainfrom
rodboev:pr/usage-cost-comparison

Conversation

@rodboev

@rodboev rodboev commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

The usage dashboard has enough aggregate data to show which models and projects cost the most, but it does not let users compare two choices directly. Issue #361 asks for questions like model A versus model B cost per session or token profile, which currently requires manual filtering and side-by-side arithmetic outside AgentsView.

This adds a pairwise usage comparison endpoint and dashboard panel. The comparison logic lives in the service layer so the direct backend, HTTP backend, server route, and frontend all use one metric definition. Each side applies the same usage filters and the same model or project filter path as the existing summary endpoint, so timezone handling, deduplication, pricing, and eligibility stay aligned with the rest of the usage dashboard.

The UI is additive: existing summary cards, time series, attribution, top sessions, and cache efficiency remain in place. The new panel focuses on model and project comparisons first, with cost, token, and session-based metrics returned by the backend instead of recomputed in the browser.

Fixes #361

@roborev-ci

roborev-ci Bot commented Jun 29, 2026

Copy link
Copy Markdown

roborev: Combined Review (7e82b01)

No issues found.


Panel: ci_default_security | Synthesis: codex | Members: codex_default (codex/default, done, 8m15s), codex_security (codex/security, done, 1m53s) | Total: 10m8s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Feature: comparative cost analysis

1 participant