About this project
This repository provides a production-ready implementation of a tiered LLM cascade router designed to reduce API expenses by up to 65%. The system employs a lightweight classifier (Claude Haiku) to analyze incoming queries and route them to one of three performance tiers: Gemini 2.5 Flash-Lite for simple formatting and extraction, Claude Sonnet for moderate analysis and coding, and Claude Opus for complex reasoning. The package includes a core routing engine, an evaluation harness to measure classification accuracy, and a shadow mode script for monitoring production traffic without affecting live responses. It supports Anthropic and Google Gemini APIs and provides detailed token usage and cost breakdowns for each routed request. The implementation is designed for developers looking to balance model performance with budget constraints in high-volume AI applications.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.