✨ New Features
- Combo Builder v2 (Wizard UI): Completely redesigned the combo creation/editing interface as a multi-stage wizard with stages: Basics → Steps → Strategy → Review. The builder fetches provider, model, and connection metadata via a new
GET /api/combos/builder/optionsendpoint, enabling precise provider/model/account selection with duplicate detection and automatic next-connection suggestion. Heavy UI components (ModelSelectModal,ProxyConfigModal,ModelRoutingSection) are now lazily loaded vianext/dynamicfor faster initial page render - Combo Step Architecture (Schema v2): Introduced a structured step model (
ComboModelStep,ComboRefStep) replacing the legacy flat string/object combo entries. Steps carry explicitid,kind,providerId,connectionId,weight, andlabelfields, enabling pinned-account routing, cross-combo references, and per-step metrics. All combo CRUD operations normalize entries through the newsrc/lib/combos/steps.tsmodule. Zod schemas updated withcomboModelStepInputSchemaandcomboRefStepInputSchemaunions - Composite Tiers System: Added tiered model routing via
config.compositeTiers— each tier maps a named stage to a specific combo step with optional fallback chains. Includes comprehensive validation (src/lib/combos/compositeTiers.ts) ensuring step existence, preventing circular fallback, and validating default tier references. Zod schema enforcement blocks composite tiers on global defaults (concrete combos only) - Model Capabilities Registry: Created
src/lib/modelCapabilities.tsprovidinggetResolvedModelCapabilities()— a unified resolver that merges static specs, provider registry data, and live-synced capabilities into a singleResolvedModelCapabilitiesobject covering tool calling, reasoning, vision, context window, thinking budget, modalities, and model lifecycle metadata - Observability Module: Extracted health and telemetry payload construction into
src/lib/monitoring/observability.tswithbuildHealthPayload(),buildTelemetryPayload(), andbuildSessionsSummary()builders. The health endpoint now returns session activity, quota monitor status, and per-provider breakdowns alongside existing system metrics - Session & Quota Monitor Dashboard: Added live Session Activity and Quota Monitors panels to the Health dashboard, showing active session counts, sticky-bound sessions, per-API-key breakdowns, and top session details alongside quota monitor alerting/exhausted/error status with per-provider drill-down
- Combo Health Per-Target Analytics: The combo-health API now resolves per-target metrics using the new
resolveNestedComboTargets()function, providing step-level success rates, latency, and historical usage breakdowns per execution key — enabling per-account, per-connection health visibility - Auto-Combo → Combos Unification: Merged the separate
/dashboard/auto-combopage into the main/dashboard/combospage. Auto/LKGP combos are now managed alongside all other combos with a new strategy filter tabs system (All / Intelligent / Deterministic). The old auto-combo route redirects to/dashboard/combos?filter=intelligent. Removed theauto-combosidebar entry, consolidating navigation into the singleCombositem - Intelligent Routing Panel (
IntelligentComboPanel): New inline panel (371 lines) within the combos page that shows real-time provider scores, 6-factor scoring breakdown (quota, health, cost, latency, task fitness, stability), mode pack selector, incident mode status, and excluded providers forauto/lkgpcombos — replacing the former standalone auto-combo dashboard - Builder Intelligent Step (
BuilderIntelligentStep): New conditional wizard step (280 lines) that appears in the Builder v2 flow only whenstrategy=autoorstrategy=lkgpis selected. Exposes candidate pool selection, mode pack presets, router sub-strategy selector, exploration rate slider, budget cap, and collapsible advanced scoring weights configuration - Intelligent Routing Module (
intelligentRouting.ts): Extracted strategy categorization and filtering logic into a dedicated shared module (210 lines) withgetStrategyCategory(),isIntelligentStrategy(),filterCombosByStrategyCategory(),normalizeIntelligentRoutingFilter(), andnormalizeIntelligentRoutingConfig()utility functions - LKGP Standalone Strategy: Implemented
lkgp(Last Known Good Provider) as a fully functional standalone combo strategy. Previously,lkgpas a combo strategy silently fell through topriorityordering — the LKGP lookup only ran inside theautoengine. Nowstrategy: "lkgp"correctly queries the LKGP state, moves the last successful provider to the top of the target list, and saves the LKGP state after each successful request. Falls back to priority ordering when no LKGP state exists - Unified Routing Rules & Model Aliases: Consolidated the routing rules and model alias management controls into the Settings page, reducing fragmentation across the dashboard
⚡ Performance
- Middleware Lazy Loading: Refactored
src/proxy.tsto lazy-importapiAuth,db/settings, andmodelSyncSchedulermodules, reducing middleware cold-start overhead. Added inlineisPublicApiRoute()to avoid loading the full auth module for public routes - E2E Auth Bypass: Added
NEXT_PUBLIC_OMNIROUTE_E2E_MODEenvironment flag to bypass authentication gates for dashboard and management API routes during Playwright E2E test runs
🐛 Bug Fixes
- P2C Credential Selection: Implemented Power-of-Two-Choices (P2C) connection scoring in
src/sse/services/auth.tswith quota headroom awareness, error/recency penalties, and forced/excluded connection support. The newgetProviderCredentialsWithQuotaPreflight()function integrates quota preflight checks directly into credential selection, eliminating the separate Codex-only preflight path - Fixed-Account Combo Steps: Combo steps with explicit
connectionIdnow correctly bypass provider-level model cooldowns and circuit breakers, preventing a single account failure from blocking pinned-connection routing for the same model - Combo Metrics Per-Target Tracking: Extended
comboMetrics.tsto trackbyTargetmetrics keyed by execution path, recording per-stepprovider,providerId,connectionId, andlabelalongside existing per-model aggregates - Call Logs Schema Expansion: Added
requested_model,request_type,tokens_cache_read,tokens_cache_creation,tokens_reasoning,combo_step_id, andcombo_execution_keycolumns tocall_logswith auto-migration. Added composite indexidx_cl_combo_targetfor efficient per-target historical queries - Quota Monitor Enrichment: Expanded
quotaMonitor.tswith full lifecycle state tracking (status,startedAt,lastPolledAt,consecutiveFailures,totalPolls,totalAlerts), ISO-formatted snapshots viagetQuotaMonitorSnapshots(), and sorted summary viagetQuotaMonitorSummary() - Codex Quota Fetcher Hardening: Improved
codexQuotaFetcher.tswith safer connection registration and quota fetch error handling - LKGP Save Refactored to Async/Await: Replaced fire-and-forget
.then()chain for LKGP persistence after successful combo routing with properasync/await+try/catch, preventing unhandled promise rejections and ensuring LKGP state is reliably saved before the response is returned - Duplicate
autoin Combo Strategy Schema: Removed duplicate"auto"entry fromcomboStrategySchema(was listed on both line 104 and 108). Harmless to Zod runtime but cleaned up to avoid confusion. Schema now has exactly 13 unique strategy values - Legacy Combo Refs Normalization: Fixed combo step normalization to preserve legacy string combo references during CRUD operations, preventing data loss when editing combos created before the v2 step architecture
🔒 Security
- Auth Bypass on Backup Routes (Critical): Added
isAuthenticatedguards to/api/db-backups/exportAll(full database export) and/api/db-backups(list, create, and restore backups) — both were previously accessible without authentication - Auth Guard on Translator Save: Added
isAuthenticatedguard to/api/translator/savefor defense-in-depth consistency - API Key Secret Hardening: Removed the hardcoded
"omniroute-default-insecure-api-key-secret"fallback fromapiKey.ts— the function now fails fast ifAPI_KEY_SECRETis unset, relying on the startup validator to auto-generate it - NPM Tarball Leak Fix: Added
app/.env*to.npmignoreto prevent the working.envfile from being shipped inside the npm tarball distribution - Electron Builder CVE Fix: Bumped
electron-builderto 26.8.1 to resolvetarCVEs in the desktop build pipeline
🔧 Maintenance & Infrastructure
- DB Migration 021: Added
combo_call_log_targetsmigration forcombo_step_idandcombo_execution_keycolumns in call_logs - Combo CRUD Normalization:
db/combos.tsnow normalizes all stored combo entries through the step normalization pipeline on read, ensuring consistent step IDs and kind annotations regardless of when the combo was created - Playwright Config: Updated Playwright configuration and
run-next-playwright.mjsscript for improved E2E test orchestration - Build Script: Updated
build-next-isolated.mjswith additional reliability improvements - Auto-Combo UI Cleanup: Deleted
AutoComboModal.tsx(161 lines), replacedauto-combo/page.tsx(478→5 lines) with a server-side redirect to/dashboard/combos?filter=intelligent - Sidebar Consolidation: Removed
"auto-combo"fromHIDEABLE_SIDEBAR_ITEM_IDSandPRIMARY_SIDEBAR_ITEMS—normalizeHiddenSidebarItems()silently discards any stale"auto-combo"entries in user settings - Schema Cleanup: Removed obsolete
createAutoComboSchemafromschemas.ts. ExportedcomboStrategySchemafor direct use in test and filter modules - A2A Agent Card Update: Renamed skill ID from
auto-combotointelligent-routingwith updated description referencing the unified combos dashboard - Builder Draft Refactor: Extended
builderDraft.tswith dynamic stage list generation viagetComboBuilderStages()andisIntelligentBuilderStrategy(). Stage navigation (getNextComboBuilderStage,getPreviousComboBuilderStage,canAccessComboBuilderStage) now accepts options to conditionally include/skip theintelligentwizard step - i18n Consolidation: Removed the standalone
"autoCombo"i18n block (22 keys) from all 30 language files. Migrated keys into the"combos"block with new additions for filter tabs, intelligent panel, and builder step labels
🧪 Tests
- 16 New Test Suites: Added comprehensive test coverage including:
combo-builder-draft.test.mjs(186 lines) — Builder draft step construction and validationcombo-builder-options-route.test.mjs(228 lines) — Builder options API endpointcombo-health-route.test.mjs(266 lines) — Combo health analytics with per-target metricscombo-routes-composite-tiers.test.mjs(157 lines) — Composite tiers API integrationcomposite-tiers-validation.test.mjs(131 lines) — Composite tier validation rulesdb-combos-crud.test.mjs— Combo CRUD with step normalizationdb-core-init.test.mjs(129 lines) — DB initialization and column migrationsmodel-capabilities-registry.test.mjs(105 lines) — Model capabilities resolutionobservability-payloads.test.mjs(165 lines) — Health/telemetry payload constructionopenapi-spec-route.test.mjs— OpenAPI spec generationproxy-e2e-mode.test.mjs(74 lines) — E2E mode auth bypassquota-monitor.test.mjs— Quota monitor lifecycle staterun-next-playwright.test.mjs(119 lines) — Playwright runner scriptsse-auth.test.mjs(154 lines) — P2C credential selection and quota preflighttelemetry-summary-route.test.mjs(35 lines) — Telemetry summary endpoint- Plus updates to 12 existing test files for compatibility with new step architecture
- Auto-Combo Unification Tests:
autocombo-unification.test.mjs(156 lines) — Strategy categorization, schema deduplication, sidebar cleanup, and routing strategies metadata validationcombo-unification.spec.ts(189 lines) — Playwright E2E tests for filter tabs, intelligent panel rendering, redirect from old route, sidebar entry removal, and Builder v2 intelligent step flow- 3 new LKGP standalone tests in
combo-routing-engine.test.mjs— Validates LKGP provider prioritization, fallback to priority when no state exists, and LKGP state persistence after successful requests - Updated
combo-builder-draft.test.mjswith intelligent stage navigation tests - Updated
sidebar-visibility.test.mjsto reflectauto-comboremoval