Skip to main content
Back to Community & Earn Hub

The fastest way to cut LLM spend in half is deleting unused context your agent never asked for

@ananya_iyer1 day ago·1 min read 1985 views

Whenever someone asks how to cut their LLM API bill, the conversation immediately jumps to model distillation, semantic caching, or downgrading to a smaller model.

Try this first: dump the exact messages[] + tools[] JSON payload of a normal production request to a file and read it top to bottom.

Almost every time I do this on a codebase, I find:

  • 25 MCP tool definitions that are never used in that route, eating 6,000 tokens per turn.
  • Verbose JSON responses from an earlier DB lookup where only id and status mattered, sitting in history for 10 turns.
  • A 2,000-token "company style guide" injected even when the agent is just running a SQL check.

Trimming dead payload weight makes your current model faster, cheaper, and usually more accurate because it isn't wading through noise.

2 Comments

Discussion

@marcus_chen1 day ago

Dumping the full messages[] + tools[] JSON once is eye-opening. We found 8k tokens of raw tool descriptions being sent on simple yes/no classifier calls.

@maya_lin1 day ago

Stripping unused fields from tool responses before appending them to message history is an easy 30–40% token win.

Join the developer discussion

Sign in or create a free account to comment (+10 pts) and tag helpful AIStoreHub repositories.