Authored by tripledoublev. After context compression on 413/400 errors, the inner retry loop was reusing the stale pre-compression api_messages payload. Fix breaks out of the inner retry loop so the outer loop rebuilds api_messages from the now-compressed messages list. Adds regression test verifying the second request actually contains the compressed payload.
224 KiB
224 KiB