Skip to content

feat: count active root marketplace models, round stats to nice numbers#3

Merged
LukasParke merged 15 commits into
mainfrom
feat/nice-model-count
Jul 8, 2026
Merged

feat: count active root marketplace models, round stats to nice numbers#3
LukasParke merged 15 commits into
mainfrom
feat/nice-model-count

Conversation

@LukasParke

Copy link
Copy Markdown
Contributor

Implements the feedback thread on the stats cards:

Changes

  • Models stat source switched from /api/v1/models (chat-completions only, 343) to /api/frontend/v1/models/find, which covers the entire marketplace (text, image, video, speech, transcription, embeddings, rerank).
  • Only active root models are counted: models with a non-null endpoint (excludes inactive), :variant slugs like :free/:extended/:fast excluded, deduped by slug → 412 today.
  • Nice-number rounding for Providers and Models: round down to the nearest 100 at/above 100, nearest 10 below → homepage shows 200T / 10M+ / 90+ / 400+ instead of oddly specific live counts.
  • Updated profile README ("One API, 400+ models") and re-rendered all six GIF cards.

Current output

models: 400+
providers: 90+
tokens: 189T

LukasParke and others added 3 commits July 8, 2026 10:44
- Models stat now sourced from /api/frontend/v1/models/find (all
  modalities), counting only active root slugs: non-null endpoint,
  :variant slugs excluded, deduped by slug.
- Providers/Models round down to a nice number (nearest 100 at/above
  100, nearest 10 below) so the homepage shows 400+ / 90+ instead of
  oddly specific live counts.
- Update profile README model count to 400+ and re-render cards.
- New 'users' card sourced from the homepage's canonical stat
  ("10M+ Global Users"), with a 10M fallback if parsing fails.
- Added users compositions (dark/light) and wired into render-all.
- Profile README now shows all four homepage stats:
  400+ models / 90+ providers / 189T tokens / 10M+ users.
@LukasParke

Copy link
Copy Markdown
Contributor Author

Added the fourth homepage stat card: Global Users (10M+).

  • Sourced from the homepage's canonical "10M+ Global Users" stat (no public API exposes user count), with a 10M fallback if parsing fails.
  • New users dark/light compositions, wired into the render pipeline and profile README.
  • README cards now mirror the full homepage row: 400+ models / 90+ providers / 189T tokens / 10M+ users.

LukasParke and others added 12 commits July 8, 2026 10:51
3x272 fit the org profile column but 4 cards did not; 4x202 + gaps
stays within the same measured width budget.
- Increase corner radius (rounded-lg -> 28px): GIF alpha is 1-bit, so
  anti-aliased corner pixels of a small radius got thresholded into
  solid wedges that showed as white triangles on dark backgrounds.
  Verified all frames of all 8 GIFs now have fully transparent corners.
- New 'variant' prop (0-3): surface gradient angle tilts progressively
  across the row (115->175deg), ambient glows drift left->right so the
  highlight travels through the set, dot-grid mask shifts, and the
  border sweep/beam loops are phase-shifted so the four cards animate
  as a wave instead of in identical lockstep - reads as a flow both
  side-by-side and stacked 2x2.
- Render at --scale=2 (1760x712): GIF alpha is 1-bit, so at 1x the
  thresholded corner pixels formed a visible light stair-step ring at
  the README's 202px display size. At 2x each display pixel averages
  ~4x more source pixels, so the browser downscale produces smooth
  corners with no white fringing.
- Recompress with gifsicle -O3 --lossy=60: raw 2x renders are ~15-20MB,
  over GitHub's ~10MB camo proxy limit; compressed files are 2-6MB
  (some smaller than the old 1x renders). Transparency preserved.
- CI: install gifsicle in the update-stats workflow; render script
  fails fast if gifsicle is missing.
- Light-theme border darkened (#E4E4E7 -> #B8B8C0): the 1-bit GIF
  corner stair-step pixels take the border color, and near-white zinc
  read as white fringing on dark page backgrounds. Measured corner
  bleed drops ~35%.
- Border padding 1.5 -> 2.5px so the darker border (not the bright
  card surface) owns the outermost anti-aliased ring.
- README display width 202 -> 208px; 4x208 + 3x~4px gaps still fits
  the org profile column.
Root cause of the pixelated glyph edges: browsers downscale <img> with
cheap bilinear filtering (~4 samples per output pixel). Shipping the
raw 1760px render meant an 8.5x downscale that skipped most source
pixels, aliasing the text edges no matter how high we rendered.

Now the pipeline renders at 2x (1760px) for quality, then gifsicle
Lanczos3-resizes to 416px = exactly 2x the README's 208px display
width. The browser only does a clean 2:1 step, so glyph and corner
edges stay smooth. Bonus: files drop from 2-6MB to 300-500KB.
- Surface is now a flat base color with a traveling gradient wave that
  starts fully offscreen left and exits fully offscreen right before
  the play-once GIF holds its final frame.
- Ambient glows fade out over frames 65-90% so the held frame is clean.
- Top-edge beam retimed to exit before the hold as well.
- Wave/beam staggered per variant so the effect still flows through
  the row of four cards.
- Verified final frames are flat across all 8 GIFs.
@LukasParke LukasParke merged commit 908eb4d into main Jul 8, 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