litellm/prompt_compression/headroom/docker-compose.yml
Krrish Dholakia 65b8660c80 feat(prompt-compression): add headroom compression plugin
Microservice that wraps headroom-ai as a LiteLLM pre_call guardrail.
Compresses tool outputs and JSON arrays before they reach the LLM
provider using headroom's smart_crusher (JSON dedup + schema compression)
and kompress (prose/log compression). Returns compressed structured_messages
via the generic guardrail API, which required adding structured_messages
support to GenericGuardrailAPIResponse.
2026-06-25 19:49:26 -07:00

13 lines
466 B
YAML

services:
headroom-guardrail:
build: .
ports:
- "8100:8100"
environment:
# LLM provider key headroom uses internally to compress
- OPENAI_API_KEY=${OPENAI_API_KEY}
# Optional: lock down the guardrail endpoint
- GUARDRAIL_API_KEY=${GUARDRAIL_API_KEY:-}
# Model headroom uses for compression (falls back to gpt-4o-mini)
- HEADROOM_DEFAULT_MODEL=${HEADROOM_DEFAULT_MODEL:-gpt-4o-mini}
restart: unless-stopped