Files
langchaingo/llms/cache
Sergey Kozyrenko f012dce6e4 fix(cache): let the partial answer through when the model reports truncation
Adapters return the response together with the truncation error so the caller
can keep what arrived. The cache wrapper dropped it, so anyone generating
through the cache got a bare error and lost the partial answer.

The wrapper now forwards both. A failed generation is still not cached.

Verified by mutation: restoring the discard reddens the new test.

PAGI-132

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 15:44:25 +07:00
..