U1: Add estimate_text_tokens() module-level function with CJK 1:1 / ASCII 4:1 heuristic. Update estimate_tokens(), _summarize() pre-truncation, and react.py _should_compress() fallback to use it. Fixes 4x token underestimation for Chinese/Japanese/Korean conversations. U3: Rewrite compress() from recursive _compression_depth to linear flow (summarize -> aggressive -> truncate). Add _log_compression() structured logging with tokens_before/after/ratio/strategy. Remove _compression_depth parameter from compress() and _compress_aggressive(). Per plan: docs/plans/2026-07-02-003-feat-context-compressor-cjk-prefix-enhancement-plan.md |
||
|---|---|---|
| .. | ||
| documents | ||
| e2e | ||
| integration | ||
| manual | ||
| routes | ||
| tools | ||
| unit | ||
| __init__.py | ||
| conftest.py | ||
| test_routing_chain.py | ||