Repository navigation
feat(pm): Cost Explorer — tabbed AA + Model explorer with frontier charts, perspectives, and full feature parity - #1364
Conversation
…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.
|
Warning Review limit reachedYou'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. View limit details
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. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Live verification after deploying this branch to the laptop aggregator (2026-10-27 ~02:58 CDT):
|
There was a problem hiding this comment.
💡 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".
| 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; |
There was a problem hiding this comment.
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 👍 / 👎.
| 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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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 👍 / 👎.
| 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(); |
There was a problem hiding this comment.
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 👍 / 👎.
| 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; }); |
There was a problem hiding this comment.
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 👍 / 👎.
style(pm): treefmt formatting for cost explorer files (#1364 follow-up)
What this is
/aabecomes the Cost Explorer: a tabbed shell over the live fleet feed (/api/aa.json, contract unchanged except one additive section).catalogsection built from the same.opencode/opencode.jsoncread 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, inAA_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.bun test),tsc --noEmitclean; 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
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.scatter-widget.html
goCapUsd(docs reading, 2026-10-20), labelled "published" with the pooled-metering caveat the report itself raisesmultiples-widget.html
AA value report (PDF)
goCapUsdin the catalog; cap → tasks lines in both tabs' detail cardsDeliberately not merged
Parent verifies and merges; deployment follows the laptop's
pm-stack-update/aggregator+install.shpath, plus one collector run so the live feed gainscatalog(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).Need help on this PR? Tag
@codesmith-botwith what you need.