mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
* fix(nvidia): map GLM-5.2 reasoning to thinking toggle Fixes #7215. * fix(nvidia): shrink default.ts under the file-size ratchet The GLM-5.2 reasoning-mapping call in requestBodyDefaults() pushed open-sse/executors/default.ts from 877 to 881 lines, tripping the frozen check:file-size ceiling (Fast Quality Gates). withDefaults is typed unknown, so the `as typeof withDefaults` cast added by the multi-line call was unnecessary — collapsing to a single-line call removes the cast and the line-wrap, landing the file at 876 lines. Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> * refactor(nvidia): extract mapNvidiaGlm52ReasoningParams helpers to clear complexity ratchet mapNvidiaGlm52ReasoningParams landed at cyclomatic complexity 24 (limit 15), a brand-new violation that pushed the project-wide complexity ratchet from 2056 to 2057 (Fast Quality Gates: check:complexity-ratchets). It was previously masked by the file-size failure aborting the job before this step ran. Split the function into three single-purpose helpers — effort extraction, chat_template_kwargs construction, and the reasoning_effort/reasoning.effort strip — bringing the orchestrating function's complexity back under threshold with no behavior change (all 41 cases in tests/unit/base-executor-sanitize-effort.test.ts still pass unchanged). Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com> * fix(nvidia): restore default executor file-size gate --------- Co-authored-by: diegosouzapw <diegosouza.pw@gmail.com>