How to Build a Cost-Aware LLM Routing System with NadirClaw Using Local Prompt Classification and Gemini Model Switching

TL;DR AI
2 min readKey summary
A tutorial shows how to use NadirClaw for cost-aware LLM routing between cheaper and more capable models.
It covers installing the tool, testing its local prompt classifier, and inspecting the simple and complex routing centroids.
An optional proxy can switch live requests to different models based on prompt complexity, using centroid similarity and local embeddings.
The approach aims to cut LLM spend by sending easy prompts to smaller models and reserving stronger models for harder tasks.
