frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

I finally understand Cloudflare Zero Trust tunnels

https://david.coffee/cloudflare-zero-trust-tunnels
1•eustoria•1m ago•0 comments

Researchers say our solar system is moving impossibly fast

https://thedebrief.org/our-current-models-are-being-put-to-the-test-researchers-say-our-solar-sys...
1•geox•3m ago•0 comments

Practical Data Privacy (Book)

https://practicaldataprivacybook.com/
1•eustoria•5m ago•0 comments

How LimeWire ended the Napster music revolution

https://www.theverge.com/podcast/820818/limewire-music-piracy-version-history
2•el_duderino•7m ago•0 comments

Scraping Hacker News job posts and filtering them for remote roles

https://vimeo.com/manage/videos/1137439887
1•sebestindragos•8m ago•1 comments

Ask HN: What works to learn mathematical problem solving?

1•tiu•10m ago•0 comments

Show HN: A desktop app to manage Claude Code config

https://github.com/djyde/ccmate
1•djyde•15m ago•0 comments

Stronger Adaptive Attacks Bypass Defenses Against LLM Jailbreaks

https://arxiv.org/abs/2510.09023
1•baxtr•16m ago•0 comments

Shouting at seagulls could stop them stealing your food

https://news.exeter.ac.uk/faculty-of-environment-science-and-economy/shouting-at-seagulls-could-s...
1•gnabgib•17m ago•0 comments

Ask HN: Cloud providers are losing in favor of bare-metal?

2•clostao•17m ago•0 comments

'No point making a high-spec Steam Machine,' Larian publishing boss says

https://www.pcgamer.com/hardware/no-point-making-a-high-spec-steam-machine-larian-publishing-boss...
1•thunderbong•18m ago•0 comments

Owning a Cat Could Double Your Risk of Schizophrenia, Research Suggests

https://www.sciencealert.com/owning-a-cat-could-double-your-risk-of-schizophrenia-research-suggests
2•amichail•20m ago•0 comments

War with the Anglo-Saxons: How Britain became Russia's enemy number one

https://nestcentre.org/war-with-the-anglo-saxons/
1•prmph•22m ago•0 comments

Data centre in the shed reduces energy bills to £40

https://www.bbc.com/news/articles/c0rpy7envr5o
1•planetjones•23m ago•0 comments

Apply to Ampersand U

https://andys.blog/apply/
1•andytratt•27m ago•0 comments

ICLR review with 40 weaknesses and 40 additional questions

https://openreview.net/forum?id=kDhAiaGzrn&noteId=XzScUnmDGs
1•deepdarkforest•29m ago•1 comments

Show HN: PolyAgora – A natural-language multi-agent OS built with GPT-5.1

https://github.com/Takeshi-Sakamoto5/PolyAgora
1•takeshi_sakamo•30m ago•1 comments

The Best General View of Yosemite

https://worldhistory.substack.com/p/the-best-general-view-of-yosemite
2•crescit_eundo•34m ago•1 comments

Is Neon's price drop just coming from moving to Databricks AWS account?

https://www.vantage.sh/blog/neon-acquisition-new-pricing
4•jmarbach•35m ago•1 comments

Breaking the Humanoid Robot Delusion

https://www.computerworld.com/article/4082113/breaking-the-humanoid-robot-delusion.html
1•ohjeez•37m ago•0 comments

'Not in our name': Afrikaners push back against Trump's genocide claims

https://www.france24.com/en/africa/20251116-not-in-our-name-afrikaners-push-back-trump-false-whit...
2•prmph•40m ago•0 comments

Meridian: A Design Framework for Malleable Overview-Detail Interfaces

https://dl.acm.org/doi/10.1145/3746059.3747654
1•andsoitis•40m ago•0 comments

Show HN: AI Hub – Android all in one app for AIs

https://github.com/SilentCoderHere/AI-hub
1•SilentCoderHere•42m ago•0 comments

DoorDash to pay $18M to settle City Hall lawsuit

https://chicago.suntimes.com/city-hall/2025/11/14/doordash-18-million-settle-city-hall-lawsuit
2•ludicrousdispla•42m ago•1 comments

Foundation Interface Lab

https://hci.ucsd.edu/
2•jerlendds•43m ago•0 comments

Only three kinds of AI products work

https://www.seangoedecke.com/ai-products/
9•emschwartz•44m ago•5 comments

The Laffer curve for high incomes (2017)

https://www.econstor.eu/handle/10419/197646/
1•throw0101a•45m ago•0 comments

Electricity bills in states with the most data centers are surging

https://www.cnbc.com/2025/11/14/data-centers-are-concentrated-in-these-states-heres-whats-happeni...
3•speckx•46m ago•1 comments

America Is All-In on Deep Learning; China Emphasises Robotics and Hardware

https://www.hyperdimensional.co/p/the-bitter-lessons
4•pomarie•49m ago•1 comments

Women riding Tehran streets on motorbikes latest sign of Iran societal change

https://apnews.com/article/iran-women-motorbikes-hijab-rights-7f5fc4e0ce6fe0991ace53e22546d23e
2•bookofjoe•59m ago•0 comments
Open in hackernews

Show HN: I built CostLens SDK to cut my AI bills by routing to cheaper models

https://costlens.dev/
2•j_filipe•1h ago
My OpenAI bills were getting out of hand - I was using GPT-4 for everything, even simple tasks that GPT-3.5 could handle perfectly.

So I built CostLens. It's a drop-in replacement that automatically routes requests to cheaper models when possible, but falls back to premium ones when quality matters.

How it works: js // Just swap this: const openai = new OpenAI({ apiKey: 'sk-...' });

// For this: const costlens = new CostLens(); const openai = costlens.openai({ apiKey: 'sk-...' }); // Everything else stays exactly the same

Real savings: • Simple tasks: GPT-4 → GPT-4o-mini (95% cheaper) • Complex tasks: Still uses GPT-4 when needed • My bills dropped ~70% with zero code changes

Features: • Quality detection (auto-retries with better models if response is bad) • Works with existing code - no prompt changes needed • Caching with Redis • Instant mode (no signup required)

Try it: npm install costlens

The core SDK is free and works locally. I'm also building a dashboard for teams to track their AI spending.

NPM: https://www.npmjs.com/package/costlens

Anyone else tired of overpaying for AI APIs? What's your biggest cost pain point?

Comments

j_filipe•1h ago
Hey everyone!

I'm the dev behind this. Started as a weekend project because I kept getting sticker shock from my OpenAI bills. I'd use GPT-4 for literally everything - even "fix this typo" type requests that cost 20x more than they should.

The breakthrough was realizing most requests don't actually need the expensive models. So I built quality detection that tries the cheap model first, then upgrades only if the response is garbage.

Been using it in production for 3 months now. Went from ~$400/month to ~$120/month with zero changes to my actual prompts or code. The quality detection catches about 15-20% of requests that need the premium models.

Works with both OpenAI and Anthropic - Claude Opus → Claude Haiku saves even more than the OpenAI routing since the price gap is bigger.

Happy to answer any questions! The trickiest part was getting the quality scoring right - too aggressive and you get bad responses, too conservative and you don't save money.

Also working on a team dashboard, but wanted to get the core SDK out there first since it's been so useful for me.