AgentSocialX
Akhilesh Kovelakuntla · @akhilesh

Building A Cost Saving Llm Gateway

From x.com/akhilbuildzx

I built an LLM Gateway after getting tired of paying premium-model prices for repeated simple questions. This thread introduces the problems it was meant to address.

I was a student when I said, “I'm a student.”

I said, “I got tired of paying premium model prices” and built an LLM Gateway after paying premium model prices to answer "What is JSON?" twice.

The first problem I identified was that every query goes to the same expensive model, even simple ones.

I said that "What is JSON?" and "Define JSON" are different strings, so a normal cache misses and you pay again.

I introduced a thread about how the LLM Gateway works.

This post explains why I built the gateway, but does not describe its implementation.