Skip to content

feat: surface eval run performance metrics - #149

Draft
Rodriguespn wants to merge 3 commits into
mainfrom
pedrorodrigues/ai-971-surface-eval-run-performance-metrics
Draft

feat: surface eval run performance metrics#149
Rodriguespn wants to merge 3 commits into
mainfrom
pedrorodrigues/ai-971-surface-eval-run-performance-metrics

Conversation

@Rodriguespn

@Rodriguespn Rodriguespn commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Captures per-run token usage, cost, and agent wall-clock time from each harness's own transcript accounting (Claude Code, Codex, opencode, ai-sdk), persists them in result JSONs, and shows them in the expanded run view (Agent time / Tokens / Cost rows). Existing result files carry no metrics until the next results refresh.

Metric sources

Harness Tokens Cost
Claude Code terminal result event usage (input incl. cache read + write) total_cost_usd on the same event (computed by the CLI)
Codex Σ turn.completed usage events
opencode Σ step_finish part.tokens (input incl. cache read, output, reasoning) Σ step_finish part.cost (opencode's models.dev pricing; 0 = unknown, omitted)
ai-sdk AI SDK totalUsage from generateText

Duration (all harnesses): wall clock measured by the eval runner around the agent run — excludes sandbox boot and scoring.
Tokens shown in UI: harness total when reported, else input + output; input is normalized OpenAI-style (cache reads ⊆ input) for cross-harness comparison.

Ref AI-971

Each harness now reports whole-run token/cost usage from its own
transcript accounting (Claude Code result line, Codex turn.completed,
opencode step_finish, ai-sdk totalUsage), and the runner records the
scoring attempt's agent wall-clock time. Both persist into the result
JSON and flow through the export to the web UI: per-run Time/Tokens/Cost
in the detail sheet and per-experiment averages in the results grid.

Ref AI-971

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jul 30, 2026

Copy link
Copy Markdown
AI-971 Surface eval run performance metrics

Track performance metrics for eval runs so harness efficiency can be compared alongside solve rates.

These metrics could token usage, run duration, and approx cost (if possible) with the goal of seeing which harnesses solve evals most efficiently.

On the UI side this can be as simple as showing those metrics in the expanded run view:

CleanShot 2026-07-27 at 10.25.12@2x.png

We can add more sophisticated visualizations in Hex internally.

Review in Linear

@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evals Ready Ready Preview Jul 30, 2026 4:55pm

Request Review

Ref AI-971

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Rodriguespn Rodriguespn added run-evals Add to a PR to refresh benchmark evals and removed run-evals Add to a PR to refresh benchmark evals labels Jul 30, 2026
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