feat(tokenjuice): Headroom-inspired content router, compressors, CCR + savings (#4123)

This commit is contained in:
Steven Enamakel
2026-06-25 14:28:27 -07:00
committed by GitHub
parent 040e6e20d8
commit 637dff0bdf
76 changed files with 6621 additions and 1748 deletions
+31
View File
@@ -318,6 +318,37 @@ OPENHUMAN_SKILLS_WORKING_MEMORY_ENABLED=true
# [optional] Reserved cache directory for future managed CPython installs.
# OPENHUMAN_RUNTIME_PYTHON_CACHE_DIR=
# ---------------------------------------------------------------------------
# TokenJuice — content-aware tool-output compaction (the content router)
# ---------------------------------------------------------------------------
# [optional] Master switch for the content router (default: true).
# OPENHUMAN_TOKENJUICE_ENABLED=true
# [optional] Offload originals to the CCR cache + emit ⟦tj:…⟧ retrieval markers
# (default: true). Disabling makes compaction one-way.
# OPENHUMAN_TOKENJUICE_CCR_ENABLED=true
# [optional] Persist CCR originals to <workspace>/.tokenjuice/ccr (default: false).
# OPENHUMAN_TOKENJUICE_CCR_DISK_ENABLED=false
# [optional] Per-compressor toggles (all default: true).
# OPENHUMAN_TOKENJUICE_SEARCH_ENABLED=true
# OPENHUMAN_TOKENJUICE_CODE_ENABLED=true
# OPENHUMAN_TOKENJUICE_HTML_ENABLED=true
# [optional] CCR cache limits.
# OPENHUMAN_TOKENJUICE_MAX_CACHE_ENTRIES=256
# OPENHUMAN_TOKENJUICE_MAX_CACHE_BYTES=67108864
# OPENHUMAN_TOKENJUICE_CCR_TTL_SECS=
# [optional] CCR only fires (offload + lossy compaction) for results estimated
# at >= this many tokens; smaller results pass through. Default 500.
# OPENHUMAN_TOKENJUICE_CCR_MIN_TOKENS=500
# [optional] ML plain-text compressor ("Kompress", ModernBERT). Default OFF.
# Runs as a `kompress` backend of the shared runtime_python_server (torch is
# pip-installed at runtime), so it also requires OPENHUMAN_RUNTIME_PYTHON_ENABLED.
# OPENHUMAN_TOKENJUICE_ML_COMPRESSION_ENABLED=false
# OPENHUMAN_TOKENJUICE_ML_MODEL_ID=answerdotai/ModernBERT-base
# OPENHUMAN_TOKENJUICE_ML_DEVICE=cpu
# OPENHUMAN_TOKENJUICE_ML_TARGET_RATIO=0.5
# OPENHUMAN_TOKENJUICE_ML_MAX_INPUT_CHARS=200000
# OPENHUMAN_TOKENJUICE_ML_SIDECAR_IDLE_TIMEOUT_SECS=900
# ---------------------------------------------------------------------------
# Error Reporting (Sentry)
# ---------------------------------------------------------------------------