What a 60% LLM cost reduction actually looks like in practice
A client came to us in January with a $47,000/month OpenAI bill across three production systems. By the end of February, the same workload was running at $18,500/month with no measurable quality regression. The reduction was not from a single optimization but from four changes applied in a specific order — and one optimization we abandoned because it did not survive contact with real traffic.
Step one was instrumentation. The client had no per-feature token tracking. We added a thin middleware layer between application code and the OpenAI SDK that logged tokens-per-call, latency, and feature-attribution metadata to Postgres. Two weeks of data showed the cost distribution was extremely skewed: one feature (a long-form summarization endpoint hit by power users) accounted for 41% of total spend. Two other features were trivially cacheable but not cached.
Step two was model routing. We introduced a router that classified incoming requests by complexity proxy (input length, presence of structured outputs, expected output length) and routed cheap requests to gpt-4o-mini or Claude Haiku, expensive ones to the original gpt-4o. The router itself uses a small classifier we fine-tuned on 12,000 labeled requests. About 70% of traffic now goes to the cheaper models. Quality on the routed-down traffic was measured against held-out human-judged samples — no degradation detected.
Step three was prompt compression and template normalization. The summarization endpoint had grown a 1,400-token system prompt full of historical instructions. We reduced it to 480 tokens after measuring which sections actually changed outputs. We also normalized common phrases across templates to maximize KV-cache hits on Anthropic's prompt caching (~80% input cost reduction on cached portions).
Step four was semantic caching for the two trivially-cacheable endpoints. We deployed a Redis + sentence-transformers embedding layer that catches near-duplicate requests. Hit rate hovers around 34% in production. Each cache hit costs roughly $0.0001 vs. the original $0.025-$0.08 per call.
What we abandoned: aggressive fine-tuning of a smaller open-weight model to replace the routed-down workload entirely. The model trained successfully, the held-out evals looked competitive, but in shadow traffic against real production load we observed a 6% increase in escalations to the cheaper-but-still-prompted gpt-4o-mini path. Net cost savings disappeared after counting the GPU hosting cost on Modal. We kept the routing approach and dropped the custom model.
Total engagement: 7 weeks, two of our engineers part-time. Monthly savings: $28,500. The instrumentation layer we built is now permanent infrastructure on their side — every new LLM feature ships with cost attribution by default.