kshitijk4poor
949724b321
fix(gateway): one context-overflow verdict for the reply and the transcript skip
...
Moving the `if response` guard below the failed branch exposed the normalizer's
loose overflow predicate (bare "token"/"exceed"/"context"/"payload", or any 400
on a long session) to failed turns that carry real text: billing, rate-limit,
auth and content-policy replies were rewritten to "Session too large / /compact".
Hoist run_turn's stricter classifier (compression_exhausted, multi-word phrases,
400 on history > 50) into a module-level `is_context_overflow_failure_result` and
use it for both the #1630 transcript skip and the user-facing rewrite, so the two
can never disagree. Populated text is only rewritten when it is the bare provider
envelope (`_looks_like_gateway_provider_error`) on an overflow turn; curated agent
text (compression-timeout guidance, /compress hint) survives. Replaces the
sanitizer-wording test with the passthrough invariants that catch the regression.
2026-09-10 23:45:03 +05:30
..
2026-07-05 06:29:26 -07:00
2026-09-10 10:27:07 -07:00
2026-09-10 12:10:39 +10:00
2026-09-07 06:10:54 -07:00
2026-09-02 19:21:46 -07:00
2026-09-10 15:32:47 +05:30
2026-09-10 10:27:07 -07:00
2026-09-10 10:27:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 19:21:46 -07:00
2026-09-03 13:46:50 -07:00
2026-09-02 19:21:46 -07:00
2026-09-07 06:10:54 -07:00
2026-09-07 06:10:54 -07:00
2026-09-07 06:10:54 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:21:46 -07:00
2026-09-02 20:13:08 -07:00
2026-09-07 04:46:20 -07:00
2026-09-07 06:00:05 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 22:42:55 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 19:21:46 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 00:09:14 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 05:58:52 -07:00
2026-09-04 00:15:16 -07:00
2026-09-03 13:46:50 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 13:48:14 -07:00
2026-09-07 14:16:57 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 19:21:46 -07:00
2026-09-05 16:09:46 +05:30
2026-09-02 19:21:46 -07:00
2026-09-02 19:21:46 -07:00
2026-09-02 19:21:46 -07:00
2026-09-04 00:15:16 -07:00
2026-09-02 19:21:46 -07:00
2026-09-03 13:46:50 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 17:13:22 -07:00
2026-09-03 09:44:26 -07:00
2026-09-02 20:13:08 -07:00
2026-09-03 13:12:50 -07:00
2026-09-10 10:45:57 -07:00
2026-09-10 10:27:07 -07:00
2026-09-02 16:11:50 -07:00
2026-09-03 14:00:59 -07:00
2026-09-07 14:16:57 -07:00
2026-09-07 14:16:57 -07:00
2026-09-07 14:16:57 -07:00
2026-09-10 10:27:07 -07:00
2026-09-09 10:55:32 -07:00
2026-09-07 00:38:37 +05:30
2026-09-07 14:16:57 -07:00
2026-09-07 22:47:33 +05:30
2026-09-10 10:27:07 -07:00
2026-09-10 23:45:03 +05:30
2026-09-07 22:47:33 +05:30
2026-09-07 06:10:54 -07:00
2026-09-10 23:45:03 +05:30
2026-09-02 21:14:22 -07:00
2026-09-04 15:41:27 -03:00
2026-09-09 10:55:32 -07:00
2026-09-02 19:21:38 -07:00
2026-09-07 06:10:54 -07:00
2026-09-07 06:10:54 -07:00
2026-09-07 14:16:57 -07:00
2026-09-03 09:44:26 -07:00
2026-09-03 09:44:26 -07:00
2026-09-07 14:11:18 -07:00
2026-09-07 07:12:06 -07:00
2026-09-03 13:46:50 -07:00
2026-09-07 08:20:09 -07:00
2026-09-03 10:00:07 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 22:47:33 +05:30
2026-09-07 22:47:33 +05:30
2026-09-07 22:47:33 +05:30
2026-09-07 22:47:33 +05:30
2026-09-09 10:54:34 -07:00
2026-09-03 17:13:22 -07:00
2026-09-02 21:14:22 -07:00
2026-09-09 09:55:52 -07:00
2026-09-03 17:13:22 -07:00
2026-09-08 17:51:35 +10:00
2026-09-02 19:19:38 -07:00
2026-09-02 19:52:43 -07:00
2026-09-08 17:51:35 +10:00
2026-09-08 17:51:35 +10:00
2026-09-04 00:15:16 -07:00
2026-09-02 20:24:52 -07:00
2026-09-09 10:59:52 -07:00
2026-09-03 17:13:22 -07:00
2026-09-07 14:11:18 -07:00
2026-09-03 13:12:50 -07:00
2026-09-09 10:55:32 -07:00
2026-09-03 08:16:44 -07:00