feat: Revamp models catalog with family grouping and pricing toggle#1026
Open
aschkanAH wants to merge 3 commits into
Open
feat: Revamp models catalog with family grouping and pricing toggle#1026aschkanAH wants to merge 3 commits into
aschkanAH wants to merge 3 commits into
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.