Skip to content

Instantly share code, notes, and snippets.

View maliqupid-267's full-sized avatar

maliqupid-267

View GitHub Profile
@maliqupid-267
maliqupid-267 / README.md
Last active April 28, 2026 19:47
Claude API Router — classify locally, route to cheapest model. From AIFirewire video

Claude API Router

Classify every prompt locally with Gemma 3, then route to the cheapest model that can handle it. Cuts Claude API spend by ~79% on a typical workload.

Built for the AIFirewire video: "I Cut My Claude API Bill 79% With 60 Lines of Python"

Why

Every Claude tutorial pushes you to hit Sonnet for everything. Sonnet 4.6 is $15 per million output tokens. Haiku 4.5 is $1. Local Gemma 3 is $0.