Repository navigation
Conversation
Present AA median TPS rows under household lines (OpenAI, Anthropic, Google, DeepSeek, specialists/other). Switching A or B to a different line resets that pane; same-line SKU changes keep streamed text. Co-authored-by: PaintingCoder <jammyfu@users.noreply.github.com>
Restore the source editor on every breakpoint and add a secondary Fetch action that loads a public page into the source box via a same-origin Vite proxy, with client-side fallbacks. Fetching updates input only; output still clears only when the model line changes. Co-authored-by: PaintingCoder <jammyfu@users.noreply.github.com>
Stops the token loop from gluing the last word of a page onto the next repeat. Notes browser verification of grouping and line-change clear. Co-authored-by: PaintingCoder <jammyfu@users.noreply.github.com>
Group Qwen, GLM, Kimi, MiniMax, and Grok from the AA public table (Doubao/ERNIE omitted — no published median TPS). Show AA output $/1M, burn rate, and cumulative spend when a list price exists. Co-authored-by: PaintingCoder <jammyfu@users.noreply.github.com>
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. |
Single-model stats now read $/s · $/min · $/h from active TPS × AA output list price. Compare mode still shows A/B per-second rates. Co-authored-by: PaintingCoder <jammyfu@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c50d402bb0
ℹ️ 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".
| const upstream = await fetch(target.href, { | ||
| redirect: 'follow', |
There was a problem hiding this comment.
Revalidate redirect targets before following them
When the dev or preview server is reachable by an untrusted user, redirect: 'follow' lets an initially public URL redirect to a loopback, metadata, or other private address without passing the new destination through parsePublicHttpUrl. Because the endpoint returns the fetched body, this creates an SSRF path; follow redirects manually and validate every destination before requesting it.
Useful? React with 👍 / 👎.
| throw new SourceFetchError('blocked'); | ||
| } | ||
| if (/^\d+\.\d+\.\d+\.\d+$/.test(host) && isPrivateIPv4(host)) { | ||
| throw new SourceFetchError('blocked'); |
There was a problem hiding this comment.
Reject bracketed private IPv6 destinations
When fetching a literal IPv6 URL such as http://[::1]:8080/, URL.hostname retains the brackets, so the value does not match the ::1 entry in BLOCKED_HOSTS, and the IPv4-only check below also ignores it. The proxy therefore accepts loopback and other private IPv6 destinations and can expose internal HTTP services; normalize IPv6 literals and reject loopback, link-local, and private IPv6 ranges.
Useful? React with 👍 / 👎.
| const spentA = cumulativeCostUsd(streamA.tokensCount, selected?.outputPricePerMillionUsd); | ||
| const spentB = cumulativeCostUsd(streamB.tokensCount, compare?.outputPricePerMillionUsd); |
There was a problem hiding this comment.
Accumulate cost across same-family price changes
When tokens have already streamed and the user switches to another model in the same family, the intentional no-reset behavior preserves tokensCount, but this calculation reprices every previous token using the newly selected model. For example, switching from Celeris-1 to Mercury 2 retroactively changes the displayed total, while switching to an unpriced specialist erases it entirely; track spend incrementally per price segment or reset cost whenever the price changes.
Useful? React with 👍 / 👎.
Summary
Follow-up polish on the merged AA ranking demo (PR #2), including later same-PR asks.
familyfield. Global AA rank numbers and median TPS stay. Doubao and ERNIE are omitted because the 2026-09-13 AA public table has no median Tokens/s for those rows (no invented numbers)./api/fetch-page+ client fallbacks). Fetch updates input only.$/s · $/min · $/hburn rate, and cumulative spend while streaming. Missing prices render as —. Formula: spend ≈ tokens × output100dvhlayout, no paid AA API.How grouping + clear work
src/data/modelFamilies.tsorders household Western + CN lines, then specialists/other.isSameFamily(prev, next)decides whetherstreamA.reset()/streamB.reset()runs.How source / URL fetch works
<details>./api/fetch-pagefetches the URL, strips HTML, rejects localhost/private addresses.How cost works
outputPricePerMillionUsd(USD per 1M output tokens), set only when an AA model page quotes it (Celeris, Mercury, DeepSeek V4.1 Flash, Claude Opus 5, Grok 4.6, Qwen3.8 Max, GLM-5.3 max, MiniMax-M3).$/s · $/min · $/hplus running spend; compare shows A/B per-second rates. Footer has the formula.Verification
python3 tools/verify.pypassed.