llmtrim_compress
Compress an LLM request body and report token savings. Pass raw request JSON; receive compressed request with token counts and breakdown.
Instructions
Compress an LLM request body and report the token savings. Pass the raw request JSON; get back the compressed request in the same shape plus before/after token counts and the per-stage breakdown.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes | The provider request body (OpenAI, Anthropic, or Google shape). Accepts either the JSON object itself or a JSON string of it; the whole body is compressed and returned in the same shape. | |
| provider | No | Provider hint: `openai`, `anthropic`, or `google`. Leave unset to detect it from the request shape. |