← Cenk Akın's projects
Repo

llm-router: cheaper LLM answers at equal accuracy

@akincenkby Cenk Akın · Independent

Sends each question to the cheapest model that can answer it, and skips the model when the same question was already answered. Explainable difficulty rules, a cascade with escalation and fallback, and a semantic cache that never mixes up numbers. Measured on 40 questions with local models, tokens priced at Anthropic list prices: the rules kept the same 100% accuracy as always using the large model at 58% lower cost. The cache answered 14 of 15 reworded questions and was fooled by 0 of 5 number traps.

Built withPython standard libraryOllamaGemma 4Qwen 3.8EmbeddingGemma 2llm-routingsemantic-cachellmopscostopen-source
Looking forFeedback

Comments · 0

No comments yet. Tried it? Tell Cenk what worked, what didn't, or what you'd want next.
Sign in to comment

More from members

All projects

See what other members are building and what each project is looking for.