mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-19 21:52:21 +03:00
A combo can declare a per-combo responseValidation predicate. When an upstream returns 200 OK but the parsed body fails the predicate, the combo fails over to the next target through the exact same path the built-in empty-content guard uses (executeTarget returns null + 502). No new failover wiring. - open-sse/services/combo/responseValidation.ts: pure declarative evaluator — forbiddenSubstrings / requiredSubstrings / minContentLength / jsonPathPredicates with a bounded dot-path resolver (no eval, no regex/ReDoS). - Zod responseValidationSchema in shared/validation/schemas/combo.ts (per-combo, in comboRuntimeConfigSchema); threaded to validateResponseQuality (new 4th param) at all three call-sites (combo.ts x2 + runtimeUnits.ts); default key in comboConfig.ts. - Evaluated on non-streaming responses; streaming keeps its existing empty-content guard. - UI: extracted ResponseValidationEditor.tsx (keeps the combos god-component lean) wired into the combo form; i18n keys + getI18nOrFallback fallbacks. TDD: evaluator (9), failover integration mirroring #5085 (2), editor UI (4). Existing quality + combo-config + combo UI suites green; typecheck:core 0, ESLint 0, cycles clean.