frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

CostRouter – Cut AI API costs 60% by routing to the cheapest capable model

4•alex_1002•1h ago
Hey HN,

I built CostRouter because I noticed 70-80% of our AI API calls didn't need GPT-4o/5. Simple text extraction, basic Q&A, formatting — all going to the most expensive model.

CostRouter is an API gateway that scores each request's complexity (0-100) and routes it to the cheapest model that can handle it:

- Simple queries → Llama 4 Scout ($0.0001/1K tokens) - Medium → Gemini 3 Flash ($0.0005/1K tokens) - Complex reasoning → stays on GPT-5.2 or Claude Opus

Integration is one line — just change your base_url:

    client = OpenAI(
        api_key="crx_live_...",
        base_url="https://cost-router-alex10020s-projects.vercel.app/api/v1"
    )
Pricing: we charge 10% of what we save you. If we save you $0, you pay $0.

In a 100K request/month test: - Before: $3,127/mo (all GPT-5.2) - After: $1,245/mo - Net savings after our fee: $1,694/mo

Tech stack: Next.js, Supabase, Vercel. The routing engine scores prompt complexity based on length, keyword analysis, and structural patterns, then maps to the cheapest model above the quality threshold.

Would love feedback on the routing approach and pricing model.

https://cost-router-alex10020s-projects.vercel.app

FlowViz – A free, zero-login Mermaid diagram editor

https://flowviz.app/
1•mizarau•1m ago•0 comments

British tourist among 20 charged in Dubai over videos of Iranian missile strikes

https://www.theguardian.com/world/2026/mar/12/british-tourist-among-20-charged-in-dubai-over-vide...
1•TheAlchemist•3m ago•0 comments

Mapping production AI agents to IAM roles, tools, and network exposure

https://cartography.dev/blog/aibom
1•alexchantavy•3m ago•0 comments

Show HN: Slop or not – can you tell AI writing from human in everyday contexts?

https://slop-or-not.space
1•eigen-vector•4m ago•0 comments

Verified orchestration and cost tracking for Copilot CLI

https://github.com/moonrunnerkc/copilot-swarm-orchestrator
1•bradkinnard•4m ago•1 comments

Theremin Schematics

http://www.thereminworld.com/Schematics
1•dmbche•4m ago•0 comments

Straightforward descriptions of cybersecurity products. You're welcome

https://risky.biz/catalog/
1•mooreds•5m ago•0 comments

Is the sky falling for international enrollment?

https://www.chronicle.com/newsletter/latitudes/2026-03-11
1•mooreds•11m ago•1 comments

Show HN: I've just launched my own API

https://docs.simpleblogapi.com
1•lucastonelli•12m ago•1 comments

How to build a sharable Claude Code agent with skills

https://registry.gitagent.sh
1•Shreyaskapale•12m ago•0 comments

Perlsky Is a Perl 5 Implementation of an at Protocol Personal Data Server

https://tangled.org/alice.mosphere.at/perlsky
1•mooreds•12m ago•0 comments

Show HN: Push-to-talk dictation for Android apps and terminal workflows

1•pol_avec•14m ago•0 comments

A.I. Incites a New Wave of Grieving Parents Fighting for Online Safety

https://www.nytimes.com/2026/03/10/technology/ai-social-media-child-safety-parents.html
2•SCEtoAux•15m ago•0 comments

CrackArmor: Multiple Vulnerabilities in AppArmor

https://cdn2.qualys.com/advisory/2026/03/10/crack-armor.txt
1•stevekemp•16m ago•0 comments

Does Where You're Born Matter More Than How Hard You Work?

https://www.decodeecon.com/p/does-where-youre-born-matter-more
1•NomNew•18m ago•0 comments

Show HN: OpenClaw-class agents on ESP32 (and the IDE that makes it possible)

https://pycoclaw.com/
1•pycoclaw•19m ago•1 comments

Show HN: Turkish Sieve Engine – Full Prime Statistics Up to 10^14 and V2 Preview

https://github.com/bilgisofttr/turkishsieve
1•bilgisoft•20m ago•0 comments

Faster Bundler

https://railsatscale.com/2026-03-09-faster-bundler/
1•hahahacorn•21m ago•0 comments

Big Pork attacks California law on caging

https://www.latimes.com/politics/newsletter/2026-03-12/chabria-column-pig-confinement-pork-califo...
2•bilsbie•21m ago•0 comments

A DOGE bro left Social Security with 500M records on a drive and expected pardon

https://www.techdirt.com/2026/03/11/a-doge-bro-allegedly-walked-out-of-social-security-with-500-m...
1•spenvo•22m ago•0 comments

How to Run Local LLMs with Claude Code (Unsloth)

https://unsloth.ai/docs/basics/claude-code
1•armcat•22m ago•0 comments

AI assistants now equal 56% of global search engine volume

https://searchengineland.com/ai-assistants-global-search-engine-volume-study-471118
2•gmays•23m ago•0 comments

What is the strongest open source model for coding against Opus 4.6?

2•eeko_systems•26m ago•0 comments

Whole-Brain Connectomic Graph Model Enables Whole-Body Locomotion Control in Fly

https://arxiv.org/abs/2602.17997
2•sosodev•28m ago•0 comments

Patience – 3Sec Hold Game:)

https://3sec.site/
2•casultra•28m ago•2 comments

Show HN: Homecastr - AI home price forecasts on a map

https://www.homecastr.com/
2•dhardestylewis•29m ago•0 comments

Show HN: DevNode.studio, 100% local dev tools to make back end work faster

https://www.devnode.studio/
2•nyosef26•29m ago•1 comments

Brex tests agents: by committing fraud

https://www.brex.com/journal/articles/simulation-testing-ai-audit-agent
3•brandonbloom•34m ago•0 comments

Cryo FAQ

https://notebook.ldeming.com/whyilovecryo/
3•sebg•34m ago•0 comments

AI Slop: A Slack API Rate Limiting Disaster

https://code.dblock.org/2026/03/12/ai-slop-a-slack-api-rate-limiting-disaster.html
3•dblock•34m ago•0 comments