Repository navigation
feat(dashboard): expose full auto-routing catalog with Control Center… - #15397
diegosouzapw merged 12 commits into
Conversation
… and Test actions The /dashboard/combos auto-routing catalog rendered only the 17 static AUTO_COMBO_TEMPLATES, hiding runtime-supported combos such as auto/gemini and the other model families, variants, and category:tier entries. The catalog now lazy-loads GET /api/combos/auto so it lists every supported virtual combo with its kind and live candidate count, falling back to the static templates when the endpoint is unavailable. Each entry gains monitoring (Control Center) and play_arrow (Test) actions next to content_copy. Since virtual combos have no persisted UUID, a shared materializeAutoCombo helper backs a new GET /api/combos/auto?id= lookup for the Control Center (skipping the UUID-only combo-health call) and lets POST /api/combos/test probe the eight highest-weighted candidates instead of 404ing.
VirtualAutoCombo is an interface without an implicit index signature, so it is not assignable to ComboRecord (Record<string, unknown>). Spreading the materialized combo yields a fresh object type that satisfies the index signature, clearing the api-typecheck regression (TS2322) flagged by CI. Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Screenshots — docker smoke (
|
Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
|
Hi @diegosouzapw — this PR is ready for your review/validation when you have a moment. TL;DR: the Auto-routing catalog on
Happy to address any feedback. Thanks! |
/auto/combos/auto and /v1/models no longer advertise auto/* ids whose materialized candidate pool is empty (no provider + model can ever dispatch). The dashboard catalog treats an empty live list as authoritative and shows an empty-state message instead of static fallback templates. Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
|
Atualização: adicionei um filtro de candidatos em todo o pipeline dos combos automáticos (commit 66be061). Antes: o Agora:
Ex.: com providers openai/anthropic/gemini/… conectados, Cobertura: novo |
Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
…ve candidates The zero-candidate filter hides auto ids whose materialized pool is empty. Update the suffix-variants baseline to the new contract: seed providers and assert each AUTO_SUFFIX_VARIANTS id is present iff its pool is non-empty. Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
…lit POST/card) Co-Authored-By: Afonso Dutra Nogueira Filho <afonsoft@gmail.com>
Análise das falhas de CINão há erro de compilação. O job As 6 falhas, separadas:
Detalhe: o Conclusão: nenhuma falha vem do diff do PR. Para destravar: re-rodar o |
Resolve src/app/api/combos/auto/route.ts: keep the pushVariant(id, build) helper structure from release (skipped-variant logging) and translate the branch's empty-pool `continue` skips into `return null` inside the build callbacks — `continue` is illegal inside a non-loop function. Empty pools stay unlisted and unmarked in seenIds/skipped, matching the branch's hide-empty semantics (combos-auto-hide-empty-candidates) and release's skipped-variant logging (combos-auto-skipped-variants).
…acks (cheaper-inference#15675) auto/claude-opus|sonnet|haiku lived in AUTO_TEMPLATE_VARIANTS mapped to the smart/coding/fast weight packs, so the whole connected provider pool was scored and auto/claude-opus could route to an unrelated model (observed: cheaperinference/aion-3.0). The ids now live on the auto/<family> axis: claude-opus/claude-sonnet/claude-haiku are registered ModelFamily values detected via word-bounded tier tokens (\bopus/\bsonnet/\bhaiku), so the candidate pool is restricted to matching Claude tier models before scoring.
Fix —
|
# Conflicts: # open-sse/services/autoCombo/builtinCatalog.ts # open-sse/services/autoCombo/modelFamily.ts # tests/unit/autoCombo/provider-family-combos.test.ts
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
734090c
into
cheaper-inference:release/v3.8.52


Summary
The
/dashboard/combosAuto-routing catalog previously rendered only a static list of ~17 template combos, hiding the ~50 virtual combos the runtime actually resolves (auto, variants,category:tierentries, and 11 model families likeauto/gemini,auto/glm,auto/kimi,auto/qwen,auto/deepseek,auto/gpt). This PR lazy-loads the full live catalog and wires the two missing per-card actions — Control Center and Test — so every runtime combo is inspectable and testable from the UI.What changed
Catalog (UI) —
AutoComboCatalog.tsxGET /api/combos/autoand renders all runtime combos with candidates (47 in docker smoke) grouped with kind badges (variant/template/category/family) and live candidate counts.Zero-candidate filter —
route.ts,catalog.ts,AutoComboCatalog.tsxGET /api/combos/auto(all 4 enumeration phases) andGET /v1/models(auto/*synthesis). E.g.auto/minimax/auto/zaidisappear from every listing whileauto/geministays once a gemini provider is connected.?id=materialization is unchanged — an already-known id still resolves for the Control Center.Per-card actions —
AutoComboCatalog.tsx,page.tsxmonitoring→ Control Center at/dashboard/combos/<encodeURIComponent(auto/…)>play_arrow→ existing test modal viahandleTestCombo, with per-item spinnercontent_copy→/api/combos/duplicate(strategyautofor non-templates); hidden on bareautoMaterialization — new
src/lib/combos/autoVirtual.tsisAutoComboId(auto|auto/*) +materializeAutoCombo, reusing the runtimecreateVirtualAutoCombo/createBuiltinAutoComboso UI/API see the same shape the router resolves.APIs
GET /api/combos/auto?id=auto/…materializes one virtual combo in Control Center shape;ComboControlCenterClientroutesauto*ids there and skips the UUID-only/api/usage/combo-healthcall.POST /api/combos/testfalls back to virtual materialization forauto/*, probes only the 8 highest-weighted candidates (AUTO_COMBO_TEST_MAX_PROBES), and returnscomboType: "auto"+totalCandidates; the modal shows "Tested N of M live candidates".route.tsmaterializes through{ ...virtual }so the result satisfiesComboRecord(Record<string, unknown>) — interfaces don't get implicit index signatures (api-typecheck gate).i18n — 9 new
combos.*keys inen.json,pt-BR.json, andvi.json(the vi key-parity unit test requires strict en↔vi parity; caught bynpm run checkand backfilled).Cleanup — fixed 6 suppressed
@typescript-eslint/no-unused-varsviolations inpage.tsxand prunedconfig/quality/eslint-suppressions.json.Related Issues
Screenshots (docker smoke,
omniroute:base)Catalog top — 47 runtime combos with the new actions on every card:
FAMILY + CATEGORY tiers —
auto/gemini,auto/glm,auto/kimi,auto/qwen,auto/deepseek,auto/gpt,auto/coding:pro,auto/reasoning, …, previously invisible:Validation
npm run typecheck:core— cleantests/unit/combo-test-auto-route.test.ts— 6/6npx vitest run tests/unit/AutoComboCatalog.test.tsx— 12/12tests/unit/combos-auto-hide-empty-candidates.test.ts— 4/4 (new)combo-test-route26/26,14889-combos-auto-*,combos-duplicate-route,models-catalog-auto-combos-41644/4,models-catalog-block-auto-51923/3,models-catalog-route39/39,auto-combos-free-models-routes8/8,catalog-*/api-key-allow-auto-combos/11947/4235/13168— all passi18n:check-ui-coverage, lint-staged / docs-sync / any-budget hooks — passnpm run check(lint + full unit suite) — lint clean; 45,063 tests, 45,029 pass. The only PR-caused failures were the 3 vi.json parity tests (fixed in c0f62b4). Remaining 3 failures reproduce identically onrelease/v3.8.52and touch code this PR doesn't modify:memory-toolsadd/clear (2),videoBridgeFu07real-FFmpeg evidence (1)npm run test:coverage— gate 60/60/60/60 cleared with margin: statements 81.46%, branches 78.90%, functions 83.04%, lines 81.46%npm run test:e2e(Playwright, against the running Docker container on :20128) — 110 passed, 36 conditional skips (opt-in suites:RUN_CROSS_E2E, missing@axe-core/playwright), 0 failedcheck:cycles— advisory run, no new cycles from this diffdocker compose --profile base up— build passes (OMNIROUTE_BUILD_WORKERS=1 OMNIROUTE_BUILD_MEMORY_MB=8192on a 7.8 GB box), dashboard served, catalog verified live (screenshots)Tests Added/Updated
tests/unit/AutoComboCatalog.test.tsx— expanded for lazy fetch, kind badges, per-card actions, fallbacktests/unit/combo-test-auto-route.test.ts— materialization + probe cap +comboType:"auto"responsetests/unit/combos-auto-hide-empty-candidates.test.ts— empty pool: every listed combo hascandidateCount>0+ zero-candidate ids absent from/api/combos/autoand/v1/models, before and after seeding providerstests/unit/models-catalog-auto-combos-4164.test.ts,models-catalog-block-auto-5192.test.ts— seed providers so baselines reflect "combos with candidates"Coverage Notes
npm run test:coverageclears the 60/60/60/60 gate with margin (see Validation). The run's exit code was non-zero only because two tail test files (radar-*,rate-limit-*) hit a resource-exhaustion "Promise resolution is still pending but the event loop has already resolved" teardown issue — both pass 90/90 when run in isolation and touch code unrelated to this PR.Reviewer Notes
autointentionally hidescontent_copy(nothing to duplicate — it IS the virtual root).AUTO_COMBO_TEST_MAX_PROBES=8bounds the probe loop; candidates are pre-sorted by weight so the probe covers the likely winners.__MISSING__markers becausei18n-vi-completeness.test.tsasserts strict key parity withen.json.release/v3.8.52tip23a11484currently failsLint(npm auditcritical advisory onnext— deps untouched by this PR),Docs Sync (Strict)(QUALITY_GATES.md translation drift — file untouched by this PR),check:cycles(14 pre-existing SCCs, none containing PR-touched files),Gate / CI,Gate / QualityandVitest (MCP)— all reproduce on the base branch's own check runs. On the latest push (f14f3304),Fast Quality Gatesfails only oncycles;Buildwas killed by a runner shutdown mid-build (infra cancellation), andUnit Tests (2/8)flaked onusage-pending-sweep(timing-sensitive eviction assert, passes 16/16 locally, untouched by this diff). This PR introduces no new failures;api-typecheck,Merge integrity (generated skills),file-sizeandcomplexity/cognitiveratchets are green after c0f62b4 + 72e8a33 + f14f330.