Skip to content

feat(gui): latest-per-family model filter and provider exclusion for suggested combos - #8729

Closed
andrew05060414 wants to merge 14 commits into
lidge-jun:devfrom
andrew05060414:feat/combos-latest-family-exclude
Closed

andrew05060414 wants to merge 14 commits into
lidge-jun:devfrom
andrew05060414:feat/combos-latest-family-exclude

Conversation

@andrew05060414

@andrew05060414 andrew05060414 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Problem. Long provider model lists show every dated snapshot of every family, so picking the current model means scrolling past old ones. And suggested combos (#8705) offer every provider that serves a model, including ones the operator never wants in a fallback chain, such as a Cursor subscription.

After this PR.

  • A "Latest per family" toggle sits on the provider model list and on the combo member picker. When on, only the newest model of each family is shown (for example claude-sonnet-4-6 hides claude-sonnet-4-5). It is a per-browser preference, off by default.
  • Suggested combos can exclude providers. "Exclude providers…" under the suggestions header opens a checklist; an excluded provider never appears in a new suggestion or in an "add to existing combo" hint, and the header reads "Excluded: Cursor". Unchecking or "Restore" brings it back. Existing combos that already use an excluded provider are left alone. The list persists in config.json as comboSuggestionExcludedProviders, so it follows the operator across browsers.

Implementation notes.

  • gui/src/lib/model-family.ts ports FamilyOf, newerInFamily and BestInFamily from Magpie's internal/catalog/family.go (MIT, Copyright (c) yetone; the notice is in the file header), minus the release-date comparison because OCX rows carry no release date. All of Magpie's family_test.go cases are ported to gui/tests/model-family.test.ts.
  • GET|PUT /api/combo-suggestions (src/server/management/combo-suggestion-routes.ts, lazily loaded) reads and writes the list through mutatePersistedConfig. Input is a list of at most 256 trimmed provider names of at most 256 characters; anything else is a 400. Registered in route-registry.ts as dashboard-only, and in the config schema with .catch(undefined) so a hand-edited bad value degrades instead of failing the parse.
  • Copy for all eleven locales.

Stacked on #8705 (combo suggestions); it contains that PR's commits until it lands.

Verification

  • cd gui && bun test tests/combo-suggestions.test.tsx tests/model-family.test.ts tests/provider-*.test.tsx tests/route-board.test.tsx tests/form-controls-rule.test.ts: 203 pass.
  • bun test tests/server/combo-suggestion-routes.test.ts tests/server/management-route-registry.test.ts: 34 pass.
  • bun test tests/test-layout.test.ts: pass.
  • bun run typecheck, cd gui && bun run build, bun run lint:gui, bun run structure:check, bun run privacy:scan, bun run skill:surface:check: pass.
  • Checked on a local instance with fake providers: excluding Cursor removes its suggestions and survives a reload; the toggle hides older snapshots.
  • bun run test:changed did not finish on the Windows dev machine: it was killed after 900 s, with timeouts in unrelated suites (Anthropic account pool, OAuth, routing) while several other worktrees ran suites on the same host. Import-graph coverage is left to CI.

Screenshots (fake data):

Latest per family off, then on (same provider):

toggle off

toggle on

Suggested combos with Cursor excluded:

exclude provider

Readiness (2026-11-13)

  • Branch is 6 commit(s) behind dev (873ec9b), inside the gate's window; no rebase for review.
  • No Codex or CodeRabbit findings are open on this PR (CodeRabbit skipped the draft; there are no inline review comments).
  • Also merged into a local integration build with the other open PRs of this series and deployed on a real install. The combined build passed bun run typecheck, structure:check, skill:surface:check, privacy:scan, the layout and file-size guards and this PR's focused tests; after the deploy one real request each through Claude, GPT, Gemini, DeepSeek and Grok returned 200 and the error rate did not rise.
  • Still needs the maintainer-sponsored label: the hygiene gate flags src/server/management-api.ts. Everything else is ready for review.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • Required local validation passed; commands, results, and any full-suite exception are documented.

  • I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

…module for the advanced hash; fix tsc -b errors
…ounts, switched-off combos last, strategy hints, capability policy controls
…r, in-place More settings with member numbers, clickable context tag, fallback-only wording and switch
…hysteresis, editable member capabilities with source tags, probe placeholder

- Drag reorder reads the drop slot from the row midpoints recorded at drag start (8 px hysteresis),
  shows the would-be order while dragging and commits on drop; a slide still running from the
  previous drop is settled before measuring.
- More settings' member table edits a member's context, input and effort levels in place through
  PUT /api/model-settings (only changed fields; restore clears manual ones), with a note that every
  combo using the model changes too.
- Every cell is tagged provider report / inferred / manual / unknown; members without a catalog row
  fall back to their per-model config.
- A disabled Test it button with the pay-per-use warning waits for the T4c probe endpoint.
…alues with Adopt, live capability probe

- Source tags read capabilitySources (manual / probed / reported / inferred / unknown) from
  /api/models, falling back to the manual flags on an older server.
- A gap with an inferredCapabilities estimate shows the value and its basis, with Adopt writing it
  through PUT /api/model-settings. Estimates fill gaps only in the combined row, labelled.
- Test it calls POST /api/providers/probe-capabilities with apply, confirms metered probes inline
  with the planned request count, and shows inapplicable reasons, 409, and an inconclusive baseline.

Depends on lidge-jun#8674.
…itself moves, no ghost copy

Ports Magpie's dragRows (MIT, Copyright (c) 2026 yetone; notice kept in drag-rows.ts): pointer
events with capture, the dragged row lifted and moved by a transform, the rows it passes sliding a
row's height aside, Escape/blur/resize cancel, one commit on release. The slot still comes from
the layout midpoints with 8 px hysteresis (dragSlot). Replaces HTML5 drag-and-drop, whose drag
image drew a translucent second copy over a translucent original. Provider icons no longer start
the browser's own image drag. Move buttons and their FLIP slide are unchanged.
Models that two or more enabled providers serve under one normalized
name (prefix, case, gaps, version dots and a trailing effort suffix
folded; snapshot dates kept) show as suggestions above the combo rows.
Generate opens a failover draft ordered maker's subscription, other
subscriptions, Vertex, then keys and relays (more quota left first
within a tier) and saves through the existing PUT /api/combos. A combo
that already covers the name gets an "add to combo" hint for missing
providers instead, inserted ahead of its first lower-tier member.
Dismissals stay in localStorage.

The grouping idea follows Magpie's found groups (MIT, (c) yetone); no
code is taken from it.
…combo suggestions

Adds a 'Latest per family' switch to a provider's model list and the combo
channel editor's add row (gui/src/lib/model-family.ts, ported from Magpie's
internal/catalog/family.go, MIT). Suggested combos can leave out providers;
the list persists in config.json as comboSuggestionExcludedProviders through
GET|PUT /api/combo-suggestions.
@coderabbitai

coderabbitai Bot commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Nov 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/management-api.ts.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 14, 2026
@github-actions

github-actions Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • hygiene: unsponsored_surface.

What to do

  • Fix unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/management-api.ts.

Review readiness checklist

  • ✅ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

Hygiene

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/management-api.ts.

@andrew05060414

Copy link
Copy Markdown
Contributor Author

Superseded by #8739, which carries this change together with the related Combos page PRs as one commit each on current dev, with no stacking. The design notes in this description still apply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant