Skip to main content

Module compress

Module compress 

Source

Functions§

compress_tool_result
Proxy compression funnel: routes a tool result to the right compressor.
compress_tool_result_gateway
compress_tool_result for the /v1/compress gateway contract (#702): identical compression, but a lossy result advertises its retrieval hash in LiteLLM’s regex-locked hash=<24hex> form, so a gateway running the headroom-guardrail CCR loop (BerriAI/litellm#31681) can inject its retrieve tool and resolve the original via GET /v1/retrieve/{hash}.