mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-21 22:32:22 +03:00
Ports the single-layer cache's #12885 fix into both write paths of the new dual-layer architecture: a response cut short by the output token ceiling (finish_reason "length"/"max_tokens") is a partial answer, not a reusable one, so it must never be written to the semantic cache. Caching it under a temperature:0 signature pinned the truncation for every later identical request. - src/lib/semanticCache.ts: new isTruncatedCompletion() predicate. - semanticCacheStore.ts / streamingSemanticCacheStore.ts: gate both the legacy setCachedResponse() write and the new dual-layer manager.store() write on it. Co-authored-by: Patryk Kopyciński <contact@patrykkopycinski.com> Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>