Skip to content

feat(pm): Cost Explorer — tabbed AA + Model explorer with frontier charts, perspectives, and full feature parity - #1364

Merged
dezren39 merged 2 commits into
mainfrom
feat/cost-explorer
Oct 27, 2026
Merged

dezren39 merged 2 commits into
mainfrom
feat/cost-explorer

Conversation

@dezren39

@dezren39 dezren39 commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

What this is

/aa becomes the Cost Explorer: a tabbed shell over the live fleet feed (/api/aa.json, contract unchanged except one additive section).

  • AA Explorer tab — the workbook's ranked configurations joined with Test_Runs timing, rendered client-side from the feed: six charts, a full filter bar, and the three efficiency perspectives (Plan: score/sec, dollars hidden · API: score/$ + cost/task · Per-task: time then cost). When the Model data pipeline: workbook-free append-only event log + agent interpretation #1248 pipeline lands new models (Terra, Beam) in the data, they appear with no page change.
  • Model Explorer tab — the fleet's own model universe. The collector's AA section gains an additive catalog section built from the same .opencode/opencode.jsonc read as coverage: every catalogued model × provider with context/output limits, config variants, pool seats (nested routes expanded), disabled-provider flag, plan facts + effective multipliers (registry-sourced, in AA_PLAN_FACTS), published OpenCode Go per-model caps (AA_GO_CAPS, Go doors only), and the model's AA measurement joined by the coverage normalizer.
  • Coverage sections stay on the shell, under the tabs. Tests: 234 pass (bun test), tsc --noEmit clean; the served page's inline script + embedded JSON were parse-checked against the fixtures.

Feature-parity checklist — the ChatGPT-era artifacts vs this explorer

Inventoried from frontier-charts.html, scatter-widget.html, multiples-widget.html, frontier-chart-data.json, and the AA value report PDF. Every unique feature/view/computation is accounted for:

frontier-charts.html

  • Completion time × Score scatter (log time) → AA tab, chart 1
  • Cost × Score scatter (log cost) → AA tab, chart 2
  • Cost × Completion time scatter (log-log) → AA tab, chart 3
  • Frontier vs beaten coloring → solid = on that chart's Pareto frontier, gray = beaten on its axes (a per-chart refinement of the reference's single global tier); the 3-axis "beaten by" list lives in the detail card, as in the reference
  • Legend chips toggle a family's line → legend above the charts
  • Click a dot → detail card (intelligence, $/task, time/task, TTFT, tok/s, beaten-by) → shared detail card
  • "Hide this configuration" + hidden tray with restore → detail-card button + tray
  • Size dots by the third metric (per-chart toggle) → checkbox on charts 1–3 (by cost / by time / by score)
  • Download PNG per chart → all six charts
  • Bracket dividers: cost $0.15 Mid / $0.75 Premium / $2.50 Flagship, II 40 / II 50 lines, time 1m / 5m / 15m → charts 1–3
  • Effort-ladder lines per model; DeepSeek peak↔off-peak dotted connector → ladders on charts 1–3, DeepSeek ladders dashed (peak/off-peak are separate ranked rows in the feed and join the same ladder)
  • Short effort labels (med, reas, max·pk, max·offpk) → chart point labels (family names stay the feed's full names)
  • Deferred — estimated-time markers (guest* basis) and the guest-estimated points themselves (Opus low–xhigh, Luna medium, MiMo Pro / DeepSeek Flash derived times): the feed carries measurements only, with no per-measurement basis/provenance field, and this page never estimates. Returns when the Model data pipeline: workbook-free append-only event log + agent interpretation #1248 event log carries measurement provenance.
  • Note: axis domains are data-driven rather than the reference's fixed domains — the feed has 138 ranked rows against the reference snapshot's 33.

scatter-widget.html

  • Tasks completed vs duration scatter → AA tab, chart 4
  • Seconds-per-task / total-time toggle → chart 4 toggle buttons
  • Nominal per-model budget so task counts land in range → reproduced: budget = ladder value ($0.25–$200) nearest in log space to 30× the model's cost/task
  • OpenCode Go-limit diamonds (published per-model cap spent on that model alone) → chart 4 diamonds, from the catalog's goCapUsd (docs reading, 2026-10-20), labelled "published" with the pooled-metering caveat the report itself raises
  • Hollow = CAI wall-clock basis vs solid = AA decode → non-AA-benchmark points render hollow/dashed in every scatter (structural; the current feed is all AA v4.3.2, so nothing renders hollow yet)
  • Hover tooltips with full numbers → native tooltips on every dot, plus the click detail card
  • "Not plotted" honesty list → every chart's note names the first configurations lacking its metric, with the count

multiples-widget.html

  • Multiples scatter (cost × × duration ×, log-log, 1× crosshair) → AA tab, chart 5
  • Baseline = Luna low = 1× → default baseline is Luna low whenever it's in the data; the baseline is selectable (a generalization — any measured configuration can anchor the view)
  • Score multiple → dot tooltips + the multiples table
  • Full multiples table sorted by cost multiple → under chart 5 (Model / Effort / Score / Score × / Cost / Cost × / Time / Time × / Benchmark — the reference's "time basis" column becomes Benchmark, the feed's provenance field)
  • CAI hollow coding → same as above; guest* pale coding deferred with the basis data (above)

AA value report (PDF)

  • Tasks per budget at $60 / $90 / $120 / $180 (floor(budget ÷ cost)) → every configuration's detail card
  • Frontier-curve figure (intelligence vs cost per task) → chart 2 with its Pareto polyline
  • Tasks-for-$120 figure → chart 4 (scatter form) + the detail-card counts
  • Scores-only figure, including configurations with no published cost (Muse Wonder Full) → chart 6, top-40 bars, "cost n/a" labelled — no-cost rows are never dropped from score views or tables
  • Per-tier effort ladders (GPT / Claude / Gemini / Muse, every effort level) → the AA configurations table: every effort, filterable, perspective-sorted
  • "Access" column (Go / Zen only / not in Go) → Model Explorer answers the fleet's version of the same question per model: pool seats + provider + plan
  • Go per-model caps + "what the cap buys in AA tasks" → goCapUsd in the catalog; cap → tasks lines in both tabs' detail cards
  • DeepSeek peak/off-peak explainer (windows, half price) → footnote under the charts
  • Time-per-task definition (excludes TTFT) → footnote; TTFT is its own column
  • Not ported: the report's editorial prose (routing guidance, caveats, the Go reconciliation essay) — prose, not views or computations; every number underneath it is in the explorer.

Deliberately not merged

Parent verifies and merges; deployment follows the laptop's pm-stack-update/aggregator + install.sh path, plus one collector run so the live feed gains catalog (until this lands on main, the sandbox's ~5-minute feed timer can overwrite the catalog with a catalog-less section — the Model tab renders its stated-absence banner rather than stale data in that window).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

…arts and perspectives

The /aa page becomes the Cost Explorer shell: an AA Explorer tab
(workbook rankings joined with Test_Runs timing: three frontier
scatters with Pareto lines, effort ladders, bracket dividers,
dot-sizing, PNG export, hide-to-tray; tasks-vs-duration and
multiples-of-baseline views; scores-only bars; plan/API/per-task
perspectives; full filter bar) and a Model Explorer tab over a new
catalog section the collector builds from .opencode/opencode.jsonc
— every catalogued model with pool seats, plan facts, effective
multipliers, published Go caps, and its AA measurement. Coverage
lists stay on the shell. Renders from the feed alone.
@dezren39
dezren39 requested a review from a team as a code owner October 27, 2026 07:55
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 61be62b2-aa63-4c0a-a54d-023db69ea536
Commits

Reviewing files that changed from the base of the PR and between f9c9ffd and 30bd7ea.

Files selected for processing: 7
  • pm-stack/aggregator/README.md
  • pm-stack/aggregator/src/aa.ts
  • pm-stack/aggregator/src/model.ts
  • pm-stack/aggregator/src/pages.ts
  • pm-stack/aggregator/src/render.ts
  • pm-stack/aggregator/src/sources/fixtures.ts
  • pm-stack/aggregator/test/aa.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-27T08:01:35.078401Z 284aea2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@dezren39

Copy link
Copy Markdown
Member Author

Live verification after deploying this branch to the laptop aggregator (2026-10-27 ~02:58 CDT):

  • GET /aa → 200, title "Cost Explorer"; served HTML contains both tabs, all six chart SVGs (xpl-c1…c6), the filter bar, size-by/download/task-mode controls, baseline selector, hidden tray, and the embedded explorer JSON.
  • GET /api/aa.json → status ok, 138 rankings / 35 configs / 183 test runs (contract unchanged), plus the new catalog: 558 entries across 14 providers with inline models, 20 pooled, 315 behind disabled providers.
  • One honest gap the parent should know about: no Go-cap diamonds render with today's config. The fleet config carries the OpenCode Go workspaces only as instanceOf aliases with no inline models (the fork's built-in catalog resolves them at runtime), so there are no Go-door catalog entries for goCapUsd to attach to — the same reason coverage treats those providers as non-enumerable. The mechanism is unit-tested (Go-door entry → cap → tasks) and activates if Go doors ever carry inline models; expanding instanceOf providers from the fork's built-in catalog would be a collector follow-up, not a page change.
  • Deploy note: install.sh copied the code but did not bounce the running user unit (service start time predated the install); a manual systemctl --user restart pm-aggregator was needed. Worth a look at install.sh's restart step separately.
  • The sandbox feed timer (~5 min, running main's collector) will overwrite the laptop feed with a catalog-less AA section until this merges; the Model tab renders its stated-absence banner in that window rather than stale data.

@dezren39
dezren39 merged commit 13ee9d6 into main Oct 27, 2026
3 of 4 checks passed
@dezren39
dezren39 deleted the feat/cost-explorer branch October 27, 2026 08:00

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 284aea2bc1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +688 to +690
for (const [providerId, providerCfg] of Object.entries(root.provider as Record<string, unknown>)) {
const models = (providerCfg as { models?: unknown } | null)?.models;
if (typeof models !== "object" || models === null) continue;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include inherited provider catalogs in the model explorer

In the checked-in fleet config, both opencode-go.personal and opencode-go.lab contain only instanceOf: "opencode-go", so this guard drops both providers entirely even though routes target their models. Running this builder against .opencode/opencode.jsonc produces 558 entries but zero Go entries. Consequently, the Model Explorer omits those active pool seats and plan facts, and the AA charts receive no Go caps for their published-cap diamonds. Resolve inherited catalogs, or obtain the resolved provider models, before building these entries.

Useful? React with 👍 / 👎.

Comment on lines +1844 to +1846
var ka = a.aaScore != null && a.aaTimePerTask ? a.aaScore / a.aaTimePerTask : null;
var kb = b.aaScore != null && b.aaTimePerTask ? b.aaScore / b.aaTimePerTask : null;
return cmpDesc(ka, kb) || cmpDesc(a.aaScore, b.aaScore) || (a.id < b.id ? -1 : 1);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Compute plan efficiency from one measured configuration

For models measured at multiple effort levels, aaCatalogFromConfig() supplies the highest intelligence score but independently supplies the fastest ranked time. Dividing those fields here creates an efficiency that was never measured and can incorrectly order the Plan perspective. For example, measurements of 50 points in 100 seconds and 30 points in 10 seconds become 5 points/second, although the best measured efficiency is only 3. Rank using a score/time pair from the same configuration, or carry the best actual per-configuration efficiency separately.

Useful? React with 👍 / 👎.

var onF = !!p[cfg.flag];
var col = famColor[p.family];
var r = radius(p, onF);
var hollow = p.benchmark && p.benchmark.indexOf("AA") !== 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Recognize the feed's lowercase AA benchmark keys

aaPoints() passes through benchmarkVersionKey, whose AA values use keys such as aa-v4.3.2, including in the fixtures. This case-sensitive uppercase-prefix check therefore classifies AA measurements as non-AA, rendering them translucent and dashed rather than solid. The same predicate appears in the tasks and multiples charts, so all five scatter charts contradict the documented solid-AA/hollow-non-AA distinction. Match the actual benchmark-key format consistently across these predicates.

Useful? React with 👍 / 👎.

Comment on lines +2375 to +2378
if (!S.effortAny) { S.effortAny = true; S.efforts = {}; S.efforts[e] = true; }
else if (S.efforts[e]) { delete S.efforts[e]; if (!Object.keys(S.efforts).length) S.effortAny = false; }
else S.efforts[e] = true;
render();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Synchronize effort chips with the active filter

Clicking an effort chip changes which configurations are included, but every chip retains its initial active appearance: the off class is assigned only in buildFilterOptions(), which runs once at startup, and render() never updates it. Executing the client script with low/high configurations confirms that clicking low hides the high configuration while both chips still look enabled. This leaves users unable to see the active effort selection while interpreting the filtered charts and tables. Update the chip classes whenever the effort filter changes.

Useful? React with 👍 / 👎.

Comment on lines +2100 to +2102
var pool = POINTS.filter(function (p) { return p.cost != null && p.time != null && p.score != null && S.hidden.indexOf(p.key) < 0; });
if (!pool.length) return null;
var chosen = pool.find(function (p) { return p.key === S.baseline; });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve the selected baseline when hiding its configuration

If a user selects a baseline and then hides that configuration, this filter excludes it and baselinePoint() falls back to another model, but the Baseline dropdown continues displaying the original selection because its options are built only at startup. Every plotted and tabulated multiple consequently changes denominator while the control still names the old reference. Executing the client script confirmed that another configuration's multiples changed from 0.5× cost, 0.33× time, and 0.67× score to 1× on every measure without changing the dropdown selection. Preserve the selected baseline independently of configuration visibility, or explicitly synchronize the selection when falling back.

Useful? React with 👍 / 👎.

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