Show HN: Route LLM prompts to cheapest capable model – pydantic-AI and litellm
Category: infrastructure
Tags: llm-routing, cost-optimization, pydantic-ai, litellm, fastapi
Score: 5.0/10 (Innovation: 4, Technical: 5, Documentation: 6, Utility: 5)
This project provides a multi-LLM cost optimizer that routes prompts to the cheapest capable model based on quality tiers (fast, standard, quality, max) using pydantic-ai for routing decisions and litellm for unified execution across Claude, GPT, and Groq. It is interesting for developers looking to reduce LLM API costs without sacrificing response quality, though it is a simple wrapper around existing tools with no new algorithmic contributions.
Target audience: backend devs, devops
Repository: https://github.com/Reactance0083/pydantic-ai-multi-llm-cost-optimizer · Python · MIT
View on Hacker News