Score breakdown
Popularity is tracked separately. Support, ads, sponsorships, and tips never affect these signals.
Why it matters
Useful for AI engineering teams that need to cut LLM API costs without changing their application code: jia-gao/leanctx is the MIT drop-in prompt-compression library that replaces `from openai import OpenAI` with `from leanctx import OpenAI` (same interface, compressed requests) and transparently compresses long prompts via LLMLingua-2 before sending them to the upstream API; for engineering teams
Who should use it
Who should skip it
Pass on jia-gao/leanctx if its scope or audience does not match what your team is building right now.
About this signal
jia-gao/leanctx is tracked by RepoRadar as a drop-in prompt compression for p in the MIT drop-in prompt-compression library for produ section. It was first seen on 2026-06-25 and last updated on 2026-06-25. The current verdict is 'try now' with a Gold tier and easy setup difficulty. jia-gao/leanctx leads on workflow potential (9.1) and maturity (8.8); its lowest signal is momentum (6.0), so factor that in before investing setup time. This page summarizes the evidence RepoRadar has captured from captured source metadata. The score, tier, risk label, and verdict on this page are never influenced by sponsorship, ads, or tips — they reflect only the usefulness, popularity, novelty, momentum, maturity, and evidence signals described in the RepoRadar methodology.
How this item is evaluated
RepoRadar assigned jia-gao/leanctx a composite score of 8.0 out of 10, placing it in the Gold tier. This score combines weighted sub-signals: usefulness (35%), novelty (18%), momentum (14%), maturity (10%), open-source/build quality (7%), evidence quality (6%), workflow potential (6%), and setup ease (4%). Popularity is tracked separately at 309.0 and never affects the composite score or tier. The risk label of 'low' reflects inherent user-impacting hazards, not generic novelty. Items with no risk flag may still require normal code review before production use.
Putting this into practice? Read How to evaluate an AI tool before you adopt it for the checklist behind this score.
Risk explanation
**First LLMLingua-2 call loads ~1.2 GB of model weights to `~/.cache/huggingface/`.** The README explicitly calls this out: 'First Lingua call loads ~1.2 GB of model weights to `~/.cache/huggingface/`. Subsequent calls reuse the cache. Add `pip install 'leanctx[lingua]'` to opt in; without it, leanctx falls back to passthrough.' Users running on disk-constrained environments or air-gapped systems should plan for the 1.2 GB weight download and the local inference cost of the compression step.; **Compression has a per-call latency cost.** The compression step adds latency on top of the upstream API call; the trade-off (token savings vs. added latency) is per-call and the user should measure both on their representative workloads before turning compression on for all calls. The `trigger.threshold_tokens` config is the right knob to skip compression on short prompts where the latency cost exceeds the token savings.; **The LongBench v2 numbers are the maintainer's measurements.** The README reports that 'On the public LongBench v2 leaderboard's short subset, leanctx-Lingua doubles accuracy versus naive head+tail truncation (40 % vs 20 %) while removing 57 % of tokens' — these numbers are reproducible from the open-source code, but users running leanctx in production should validate on their own representative datasets, not just the LongBench v2 short subset..
