Claude Code model router
Headroom
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Install
/plugin marketplace add headroomlabs-ai/headroomRun inside Claude Code, then /plugin to pick what to install from it.
brew install python@3.13 # if 3.13 is not already availableFound in the project README. Check it for setup steps after installing.
git clone https://github.com/headroomlabs-ai/headroom.gitFrom the README
Quickstart · Headroom for Teams · Install · Proof · Agents · Docs · Discord · llms.txt AI agents / LLMs: read /llms.txt here, or fetch the live index · full docs blob. Headroom compresses everything your AI agent reads — tool outputs, logs, RAG chunks, files, and conversation history — before it reaches the LLM. Same answers, fraction of the tokens. Compression runs on your machine; no prompt or file content is sent anywhere to be compressed. 10,144 → 1,260 tokens. The same FATAL found. What it does - Library — compress(messages) in Python or TypeScript, inline in any app. - Proxy — headroom proxy --port 8787, zero code changes, any language. - Agent wrap — headroom wrap claude|codex|grok|copilot|cursor|aider|opencode|cline|continue|goose|openhands|openclaw|vibe|omp|zcode in one command; undo with headroom unwrap . - MCP server — headroom_compress, headroom_retrieve, headroom_stats for any MCP client. - Cross-agent memory — one shared store across Claude, Codex, Gemini and Grok, with automatic dedup. - headroom learn — mines failed sessions and writes corrections to CLAUDE.local.md (default, gitignored), CLAUDE.md, AGENTS.md, GEMINI.md or GROK.md. - Output token reduction — trims what the model *writes back*, not only what you send. See below. - Reversible (CCR) — originals are cached locally and retrieved on demand. How it works - ContentRouter detects the content type and selects a compressor for it. - SmartCrusher / CodeCompressor / Kompress-v2-base handle JSON, source code and prose respectively. - CacheAligner flags volatile content that would bust a provider KV-cache prefix. It never rewrites prompts. - CCR stores originals locally so the model can call headroom_retrieve when it needs the full text. → Architecture · CCR · Kompress-v2-base…
Details
- Repository
- headroomlabs-ai/headroom
- Website
- docs.headroomlabs.ai/docs
- Language
- Python
- License
- Apache-2.0
- Last updated
- 3 November 2026
- Topics
- agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcp
- Listed in
- jqueryscript/awesome-claude-code
FAQ
What is Headroom?
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server. It is a model router for Claude Code, from headroomlabs-ai/headroom on GitHub.
How do I install Headroom?
Run brew install python@3.13 # if 3.13 is not already available, then follow the setup in the README.
Is Headroom popular?
headroomlabs-ai/headroom has 78,728 GitHub stars and 6,152 forks, and is included in 1 curated Claude Code list. It was last updated on 3 November 2026.
More model routers & proxies
Rtk
85krtk-ai/rtk
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Caveman
117kJuliusBrussee/caveman
why use many token when few token do trick. Viral skill + proxy for coding agents that cuts 65% of tokens by talking like a caveman.
Claude Code Router
38kmusistudio/claude-code-router
Routes Claude Code requests to different models and providers based on rules you configure.
OmniRoute
84kcheaper-inference/OmniRoute
Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
CLIProxyAPI
57krouter-for-me/CLIProxyAPI
Proxy that exposes subscription-based CLIs as OpenAI, Gemini or Claude compatible APIs usable by Claude Code.
9router
32kdecolua/9router
Connects Claude Code and other coding tools to free model providers through one router.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.