Files
OmniRoute/src/shared/utils
adevwithpurpose 587e53a3c1 fix(compression): cap countTextTokens at 50k chars and strip base64 data URIs (#10118)
Fixes #10117 — countTextTokens can block the worker event loop for tens of
seconds when a Codex request carries a large base64 image payload, wedging
/healthz and every concurrent request.

- Strip base64 image data URIs before encoding (images are not text)
- Fast-path length guard: over 50k chars, skip the near-quadratic pure-JS
  tokenizer and return the chars/4 heuristic

Co-authored-by: adevwithpurpose <adevwithpurpose@users.noreply.github.com>
Co-authored-by: diegosouzapw <8016841+diegosouzapw@users.noreply.github.com>
2026-08-14 00:57:19 -03:00
..
2026-06-29 16:51:03 -03:00
2026-07-04 13:00:30 -03:00
2026-06-29 16:51:03 -03:00
2026-06-19 06:49:01 -03:00
2026-06-20 14:55:24 -03:00
2026-04-30 14:08:50 -03:00
2026-07-02 10:47:13 -03:00
2026-06-21 08:56:51 -03:00
2026-06-07 07:20:02 -03:00
2026-07-02 10:47:13 -03:00
2026-06-19 06:49:01 -03:00
2026-06-11 18:52:29 -03:00
2026-06-25 13:17:40 -03:00
2026-06-29 08:40:06 -03:00
2026-06-29 08:40:06 -03:00
2026-04-28 20:46:25 -03:00
2026-04-30 14:08:50 -03:00
2026-06-21 08:56:51 -03:00
2026-05-26 23:51:47 -03:00
2026-06-21 08:56:51 -03:00
2026-05-26 23:51:47 -03:00