Skip to content
PyRank
  • Search
  • PyPI
  • GitHub
  • Insights
  • Compare
  • Advisories
  • Ecosystem
  • About

Cost Reduction Python Packages

Python packages with the GitHub topic cost-reduction. Sorted by monthly downloads, with stars and forks.
fkiene
llmtrim

Local proxy that compresses your LLM API requests so you pay less, with no change to the answers. Trims wasted tokens from prompts, history, tool output, and code before they're sent: -31% input / -74% output, measured live. Any provider, no extra model calls. Also an MCP server and embeddable library (Rust, Python, Ruby, Kotlin, Swift, JS/TS).

6K 277 24
kalibr-ai
kalibr

Stop overpaying to run your agents. Kalibr routes every request to lower-cost model and tool paths without degrading performance.

3K 34 3
ENDEVSOLS
longcache

Production-grade semantic similarity cache for LLM and RAG pipelines cut repeat query costs by 40%+

3K 2 1
maheshmakvana
graphsift

Save Claude, GPT-5 & Gemini API costs with LLM token optimization. 80-150x code context reduction, 86% CLI compression, F1 0.85 relevance. AST dep graph, BM25+graph selection, tree-sitter parsing, MCP server, agent memory. Zero external deps.

2K 6 0
KathanModh259
latent-gate

MCP server that shrinks logs, JSON, docs and web pages before your AI reads them. Offline, deterministic, ~3ms, no API key. 66% fewer tokens on a mixed dev corpus, 90%+ on logs.

898 25 2
obielin
llm-response-cache

SQLite-backed LLM response cache. Exact match + fuzzy match. Decorator API. Zero mandatory server dependencies.

409 1 0
kalibr-ai
llm-cost-reduction

Stop overpaying to run your agents. Kalibr routes every request to lower-cost model and tool paths without degrading performance.

406 34 3
kalibr-ai
langchain-kalibr

LangChain integration for Kalibr. Route every LangChain LLM call to lower-cost model paths without degrading performance.

404 0 0
kalibr-ai
llm-cost-optimizer

Stop overpaying to run your agents. Kalibr routes every request to lower-cost model and tool paths without degrading performance.

399 34 3
aks-builds
agentsave

Open-source AI agent efficiency platform: LLM-free context filter + early-exit supervisor cuts token costs ~30% with zero accuracy loss. Works with LangChain, AutoGen, CrewAI, LangGraph and Smolagents.

368 0 0
amahi2001
python-token-killer

Minimize LLM tokens from Python objects, code, logs, diffs, and more. Zero deps. Ultra-Lightweight.

222 14 2
Naseem77
tokenwise-optimizer

Smart Context Optimization for LLMs - Reduce tokens by 70-90%

150 4 0
dkondo
thrifty-ml

Proxy-model library: replace per-row LLM calls with lightweight ML classifiers

138 0 0
saikoushiknalubola
thinkrouter

Cut LLM reasoning-token costs by 60% with one line of code.

138 3 0
diawest82
fortress-optimizer

Cut your LLM API costs by 10-20%. Drop-in prompt optimization for Python.

123 0 0
v-nightwolf
tonst

Token optimization and security tool: prompt-caching structuring, PII redaction, and prompt trimming for LLM API calls.

83 5 1
    • Original data from PyPI, GitHub, and OSV; downloads served through ClickHouse
    • Sources & methodology