Repository navigation
fix(dashboard): honor active compression profile in effective-pipeline preview (#12063) - #13287
Merged
diegosouzapw merged 1 commit intoSep 12, 2026
Merged
Conversation
…e preview (#12063) The Settings-page 'Effective pipeline' preview was computed as deriveDefaultPlan(config.engines, config.enabled), which never consulted config.activeComboId, while the real per-request resolver (resolveBasePlan) gives an active named profile precedence over the plain engines-derived default. This made the dashboard preview disagree with what a live request actually does. Add deriveEffectivePreviewPlan(config, combos), a pure static-preview helper that mirrors resolveBasePlan's precedence for the layers that apply to an at-rest preview (master switch, then active profile, else the engines map), and wire it into CompressionPanel. Also surface a warning banner on the Combos page when an active profile is selected but the master switch is off, since that combination silently no-ops at request time.
7 tasks done
Githab-capibara
added a commit
to Githab-capibara/OmniRoute
that referenced
this pull request
Sep 17, 2026
…e preview (cheaper-inference#12063) (cheaper-inference#13287) Merged as part of the 39-PR owner batch of 2026-09-11, validated as a unit. Boarded into one consolidated worktree cut from `release/v3.8.51` with the other 38 — zero conflicts between them. - ESLint over every changed file: no errors (the only finding was one suppression entry the batch emptied, pruned on cheaper-inference#13243) - `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK - complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437 — both under baseline - 256 assertions green: 246 under node:test and 10 under vitest, which is where `tests/unit/**/*.test.tsx` actually runs - `check-file-size`: `chatCore.ts` rebaselined 6144 → 6146 for cheaper-inference#13278 and cheaper-inference#13276, annotated and landed on cheaper-inference#13243⚠️ base-red inherited: cheaper-inference#12732 — the provider count (356 in the docs vs the 358 the modules define) and `open-sse/utils/stream.ts` at 3115 > frozen 3098 both reproduce on the pure tip with zero contribution from this batch.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…e preview (cheaper-inference#12063) (cheaper-inference#13287) Merged as part of the 39-PR owner batch of 2026-09-11, validated as a unit. Boarded into one consolidated worktree cut from `release/v3.8.51` with the other 38 — zero conflicts between them. - ESLint over every changed file: no errors (the only finding was one suppression entry the batch emptied, pruned on cheaper-inference#13243) - `typecheck:core` clean; `check:dashboard-typecheck` OK (206 pre-existing, within baseline); `check:changelog-integrity` OK - complexity 2821 / baseline 3218 and cognitive-complexity 1272 / baseline 1437 — both under baseline - 256 assertions green: 246 under node:test and 10 under vitest, which is where `tests/unit/**/*.test.tsx` actually runs - `check-file-size`: `chatCore.ts` rebaselined 6144 → 6146 for cheaper-inference#13278 and cheaper-inference#13276, annotated and landed on cheaper-inference#13243⚠️ base-red inherited: cheaper-inference#12732 — the provider count (356 in the docs vs the 358 the modules define) and `open-sse/utils/stream.ts` at 3115 > frozen 3098 both reproduce on the pure tip with zero contribution from this batch.
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.
Closes #12063
Root cause
The Settings-page "Effective pipeline" preview (
CompressionPanel.tsx) was computed asderiveDefaultPlan(config.engines, config.enabled), which only looks at the master switch andthe per-engine toggle grid — it never consults
config.activeComboId. The real per-requestresolver (
resolveBasePlaninopen-sse/services/compression/strategySelector.ts) gives anactive named profile precedence over the plain engines-derived default. So whenever an
operator picked a named profile on the Combos page but hadn't also flipped an individual engine
toggle on the Settings page, the preview showed "off" while a live request actually ran the
active profile's stacked pipeline — the reported disconnect between the UI and the
x-omniroute-compressionresponse header.Separately, the Combos page already fetches
settings.enabled(the master switch) but neversurfaced it: a profile could show as "active" while the master switch (default
offon a freshinstall) hard-kills all compression before
activeComboIdis even read.Fix
deriveEffectivePreviewPlan(config, combos)(
open-sse/services/compression/deriveEffectivePreviewPlan.ts), a pure helper for STATICpreview surfaces that mirrors
resolveBasePlan's precedence for the layers that applyat rest (master switch → active profile → engines-map default), skipping the
request-scoped layers (header, routing override, auto-trigger) that need live-request
context a static preview doesn't have.
CompressionPanel.tsxnow fetches the named-combo map (/api/context/combos) and usesderiveEffectivePreviewPlaninstead of the barederiveDefaultPlancall, so "Effectivepipeline" always matches what a live request would actually run.
CompressionCombosPageClient.tsxnow renders a visible warning banner (new i18n keyscontextCombos.activeProfileMasterSwitchOffWarning/...Cta) when an active profile isselected but the master switch is off, linking to the Settings page.
resolveBasePlan/selectCompressionPlan(the actual request-time precedence) areuntouched — this is a display/UX-only fix, confirmed by the full pre-existing
strategySelector/deriveDefaultPlan/active-combo test suite passing unchanged (65 tests).Regression test
tests/unit/compression/derive-effective-preview-plan.test.ts— extends the plan-file's provenRED repro into a permanent guard (master-off, active-profile-resolves, unresolved-profile
fallback, no-active-profile parity with
deriveDefaultPlan).The original repro (documented in the analysis plan-file, re-verified here) was RED against the
prior code:
GREEN after the fix:
Gates run (all green)
node scripts/check/check-file-size.mjs— OK, no new frozen violationsnode scripts/check/check-complexity.mjs— OK (2798 violations, baseline 3218)node scripts/check/check-cognitive-complexity.mjs— OK (1265 violations, baseline 1437)npm run typecheck:core— exit 0npm run typecheck:noimplicit:core— exit 0npm run check:dashboard-typecheck— OK, 206 pre-existing errors all within frozen baseline(none in touched files)
npx eslint --suppressions-location config/quality/eslint-suppressions.json <changed files>—exit 0
node scripts/check/check-t11-any-budget.mjs— PASSnode scripts/check/check-tracked-artifacts.mjs— OKnode scripts/check/check-changelog-integrity.mjs— OKnpm run i18n:check-ui-coverage— PASS, all 50 locales ≥80% (the two new i18n keys were addedas
__MISSING__:placeholders to all non-English locales — a scoped, ad-hoc insertion(
scripts/ad-hoc/add-12063-i18n-keys.mjs) rather than the fulli18n:sync-ui, so the difftouches only these 2 keys per locale and does not also backfill ~1000 unrelated pre-existing
missing keys)
node --import tsx/esm --test tests/unit/compression/derive-default-plan.test.ts tests/unit/compression/derive-effective-preview-plan.test.ts— 8/8 passstrategySelector.test.ts,active-combo-dispatch.test.ts,active-combo-integration.test.ts,derived-pipeline-integration.test.ts,compression-header-dispatch.test.ts,adaptive-select-plan-wiring.test.ts,adaptive-chatcore-source-guard.test.ts) — 65/65 passunchanged, confirming request-time precedence was not touched
npx vitest run tests/unit/ui/compressionPanel.test.tsx— 4/4 pass unchangedtarball-smoke, agent-skills-sync