Skip to content

feat: Revamp models catalog with family grouping and pricing toggle#1026

Open
aschkanAH wants to merge 3 commits into
doublewordai:mainfrom
aschkanAH:aimodels-dashboard-revamp-14d2
Open

feat: Revamp models catalog with family grouping and pricing toggle#1026
aschkanAH wants to merge 3 commits into
doublewordai:mainfrom
aschkanAH:aimodels-dashboard-revamp-14d2

Conversation

@aschkanAH
Copy link
Copy Markdown
Collaborator

Revamps the dashboard Models catalog to group model variants into expandable “families”, add a featured section, and introduce an async/batch pricing context toggle.

Changes:

Added catalog utilities to derive model families, infer format badges, and deterministically select the best tariff for a pricing context.
Reworked ModelCatalog UI to render family parent rows + variant rows, add featured releases, and add provider/capability filters plus a pricing context toggle with persistence.
Updated dashboard README with project-specific setup, structure, and testing conventions.

Replaces PR 1020 which was merged from main not feature branch.

cursoragent and others added 3 commits April 23, 2026 02:56
…ing toggle

The catalog page previously listed every model variant as a flat row, which
pushed information off-screen once a provider shipped a new generation of
densely-quantized variants. This change reshapes the page around three UX
goals from the PRD:

- Group variants into families (Parent rows aggregate intelligence range,
  min cost and max context; child rows keep per-variant details).
- Toggle pricing context (Async vs Batch) at the top of the table so a
  single column switches across every row.
- Add faceted filters: provider dropdown, capability dropdown, fuzzy search,
  and a Featured Releases strip highlighting Smartest / New FP8 / Most
  Efficient models that deep-link into the playground.

Cost cells get a dark-themed hover card breaking down input/output tariffs
per 1M tokens, and the variant name cell exposes a copy-on-hover button
for the exact model alias.

Family grouping is heuristic (alias stem up to the first size-like token)
with a deterministic unit-tested helper (getFamilyInfo), so Qwen3.5 sizes
collapse into one family while Qwen3 and Qwen3-VL stay separate.

Adds 17 unit tests for the family/tariff helpers and 7 integration tests
for the ModelCatalog rendering, filter controls, and accordion behavior.

Co-authored-by: aschkanAH <aschkanAH@users.noreply.github.com>
The default Vite/React template README gave no information about the
actual dashboard. Replace it with:
- quick start and prerequisites,
- the project layout under src/ and what each directory is for,
- how the API layer (React Query hooks + MSW mocks) is organised,
- auth role model and the hasPermission gating convention,
- demo mode activation and feature flag list,
- styling / design guidelines (Tailwind, Radix, doubleword palette),
- testing conventions (query scoping, portal exception, waitFor pattern),
- contributing checklist matching `just ci ts`.

Co-authored-by: aschkanAH <aschkanAH@users.noreply.github.com>
The previous implementation filtered tariffs by context and then used
Array.find() on the unsorted result. For the async context the predicate
returned true for both realtime and 'batch + 1h' tariffs equally, so the
selected tariff depended on whichever the backend happened to return
first rather than on an intentional preference. The cross-context
fallback that tried to prefer realtime was unreachable in the common
case because the initial find() had already returned non-null.

Replace the predicate + find() combo with a priority score (lower is
better) evaluated across all visible tariffs. Ties on priority (e.g. a
model with two realtime rows) are broken by cheaper input price so the
catalog's 'from $X/M' aggregation stays stable across renders.

Affects the displayed per-variant price, the family-level priceFrom
aggregation, and the 'Most Efficient' featured card.

Adds regression tests: swapped input orderings for async and batch
contexts, cross-context fallbacks in both directions, tie-break on
price, and explicit coverage that inactive and playground tariffs stay
ignored.

Co-authored-by: aschkanAH <aschkanAH@users.noreply.github.com>
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.

2 participants