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
docs(pricing): correct MODEL_ALIASES comments that still name the pruned target (#3733)
Tejas Choprad05bacb44766
diff --git a/headroom/pricing/litellm_model_resolution.py b/headroom/pricing/litellm_model_resolution.pyindex f06586980..66bace63a 100644--- a/headroom/pricing/litellm_model_resolution.py+++ b/headroom/pricing/litellm_model_resolution.py@@ -38,13 +38,17 @@ class LiteLLMModelPrefixRule:## The undated target is deliberate: it survives a dated release being retired.MODEL_ALIASES: dict[str, str] = {- # Claude 3.5 Sonnet retired Feb 2026, pricing same as claude-sonnet-4-20250514+ # All three retired here are Sonnet-tier ($3/$15 per 1M in/out), so they+ # alias to the current Sonnet. Pick a target litellm still prices: these+ # pointed at claude-sonnet-4-20250514 until litellm pruned it, after which+ # they fell through to the unknown-model default and billed at the GPT-4o+ # tier ($2.50/$10.00). test_model_alias_targets_are_priced.py fails if a+ # target goes unpriced again."claude-3-5-sonnet-20241022": "claude-sonnet-4-5","claude-3-5-sonnet-20240620": "claude-sonnet-4-5",- # Claude 3 Sonnet retired. It was a Sonnet-tier model ($3/$15 per 1M- # in/out) — same price as claude-sonnet-4-20250514 — so alias it there.- # The old target, claude-3-haiku-20240307 ($0.25/$1.25), is a different- # (Haiku) tier and underpriced every cost/savings figure ~12x.+ # claude-3-sonnet-20240229 previously aliased to claude-3-haiku-20240307+ # ($0.25/$1.25) — a different (Haiku) tier that underpriced every cost and+ # savings figure for it by ~12x."claude-3-sonnet-20240229": "claude-sonnet-4-5",}