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.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
fix(providers): register claude-opus-4-7 + [1m] tier with 1M context
chopratejas2e9f52fda2e8
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex a8a6b362a..66d7d5528 100644--- a/.claude-plugin/marketplace.json+++ b/.claude-plugin/marketplace.json@@ -5,14 +5,14 @@},"metadata": {"description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",- "version": "0.20.8"+ "version": "0.20.11"},"plugins": [{"name": "headroom","source": "./plugins/headroom-agent-hooks","description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",- "version": "0.20.8",+ "version": "0.20.11","author": {"name": "Headroom Contributors","url": "https://github.com/chopratejas/headroom"diff --git a/.github/plugin/marketplace.json b/.github/plugin/marketplace.jsonindex a8a6b362a..66d7d5528 100644--- a/.github/plugin/marketplace.json+++ b/.github/plugin/marketplace.json@@ -5,14 +5,14 @@},"metadata": {"description": "Headroom marketplace for Claude Code and GitHub Copilot CLI plugins.",- "version": "0.20.8"+ "version": "0.20.11"},"plugins": [{"name": "headroom","source": "./plugins/headroom-agent-hooks","description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.",- "version": "0.20.8",+ "version": "0.20.11","author": {"name": "Headroom Contributors","url": "https://github.com/chopratejas/headroom"diff --git a/headroom/providers/anthropic.py b/headroom/providers/anthropic.pyindex 70c2773d7..9d0f20387 100644--- a/headroom/providers/anthropic.py+++ b/headroom/providers/anthropic.py@@ -53,6 +53,12 @@ _UNKNOWN_MODEL_WARNINGS: set[str] = set()# Anthropic model context limits# All Claude 3+ models have 200K contextANTHROPIC_CONTEXT_LIMITS: dict[str, int] = {+ # Claude 4.7 (Opus 4.7) - 1M context. Claude Code sends the model+ # name with a `[1m]` suffix to select the 1M tier; both forms are+ # registered explicitly because the lookup chain does not strip the+ # tier suffix and LiteLLM does not key on it either.+ "claude-opus-4-7": 1000000,+ "claude-opus-4-7[1m]": 1000000,# Claude 4.6 (Opus 4.6) - 1M context"claude-opus-4-6": 1000000,# Claude 4.5 (Opus 4.5)@@ -80,6 +86,10 @@ ANTHROPIC_CONTEXT_LIMITS: dict[str, int] = {# NOTE: These are ESTIMATES. Always verify against actual Anthropic billing.# Last updated: 2025-01-14ANTHROPIC_PRICING: dict[str, dict[str, float]] = {+ # Claude 4.7 (Opus tier pricing) — registered for both the bare+ # name and the `[1m]` tier-suffixed form Claude Code sends.+ "claude-opus-4-7": {"input": 15.00, "output": 75.00, "cached_input": 1.50},+ "claude-opus-4-7[1m]": {"input": 15.00, "output": 75.00, "cached_input": 1.50},# Claude 4.6 (Opus tier pricing)"claude-opus-4-6": {"input": 15.00, "output": 75.00, "cached_input": 1.50},# Claude 4.5 (Opus tier pricing)diff --git a/plugins/headroom-agent-hooks/.claude-plugin/plugin.json b/plugins/headroom-agent-hooks/.claude-plugin/plugin.jsonindex 779a2a0ba..357127d88 100644--- a/plugins/headroom-agent-hooks/.claude-plugin/plugin.json+++ b/plugins/headroom-agent-hooks/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "headroom",- "version": "0.20.8",+ "version": "0.20.11","description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.","author": {"name": "Headroom Contributors",diff --git a/plugins/headroom-agent-hooks/.github/plugin/plugin.json b/plugins/headroom-agent-hooks/.github/plugin/plugin.jsonindex 3c948b9aa..a5a432f11 100644--- a/plugins/headroom-agent-hooks/.github/plugin/plugin.json+++ b/plugins/headroom-agent-hooks/.github/plugin/plugin.json@@ -1,6 +1,6 @@{"name": "headroom",- "version": "0.20.8",+ "version": "0.20.11","description": "Headroom startup hooks for Claude Code and GitHub Copilot CLI.","author": {"name": "Headroom Contributors",