feat: surface eval run performance metrics - #149
Draft
Rodriguespn wants to merge 3 commits into
Draft
Conversation
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>
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: We can add more sophisticated visualizations in Hex internally. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Ref AI-971 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
resulteventusage(input incl. cache read + write)total_cost_usdon the same event (computed by the CLI)turn.completedusageeventsstep_finishpart.tokens(input incl. cache read, output, reasoning)step_finishpart.cost(opencode's models.dev pricing; 0 = unknown, omitted)totalUsagefromgenerateTextDuration (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