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
feat(proxy): apply output shaper to OpenAI-compatible endpoints (#1725)
Dylan Russell, MDe65b9b3f9248
diff --git a/README.md b/README.mdindex 94c5f22f4..e40a4ae1f 100644--- a/README.md+++ b/README.md@@ -164,6 +164,12 @@ Headroom can trim that too, from the proxy, without you changing any code:(a file read, a passing test), it dials the model's thinking effort down. Newquestions and errors keep full effort.+Applies to Anthropic `/v1/messages` **and** OpenAI-compatible endpoints+(`/v1/chat/completions`, `/v1/responses`). Effort routing uses+`reasoning_effort` on OpenAI, `thinking.budget_tokens` /+`output_config.effort` on Anthropic — same clamp-only invariant on both+paths, same `output_shaper:*` label vocabulary.+Turn it on:```bash