<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: j_filipe</title><link>https://news.ycombinator.com/user?id=j_filipe</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Mon, 18 May 2026 09:35:54 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=j_filipe" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by j_filipe in "Show HN: I built CostLens SDK to cut my AI bills by routing to cheaper models"]]></title><description><![CDATA[
<p>Thanks for sharing. I'll take a look!</p>
]]></description><pubDate>Mon, 17 Nov 2025 08:21:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=45951770</link><dc:creator>j_filipe</dc:creator><comments>https://news.ycombinator.com/item?id=45951770</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45951770</guid></item><item><title><![CDATA[New comment by j_filipe in "Show HN: I built CostLens SDK to cut my AI bills by routing to cheaper models"]]></title><description><![CDATA[
<p>Hey everyone!<p>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.<p>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.<p>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.<p>Works with both OpenAI and Anthropic - Claude Opus → Claude Haiku saves even more than the OpenAI routing since the price gap is
bigger.<p>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.<p>Also working on a team dashboard, but wanted to get the core SDK out there first since it's been so useful for me.</p>
]]></description><pubDate>Sun, 16 Nov 2025 15:51:13 +0000</pubDate><link>https://news.ycombinator.com/item?id=45945963</link><dc:creator>j_filipe</dc:creator><comments>https://news.ycombinator.com/item?id=45945963</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45945963</guid></item><item><title><![CDATA[Show HN: I built CostLens SDK to cut my AI bills by routing to cheaper models]]></title><description><![CDATA[
<p>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.<p>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.<p>How it works:
js
// Just swap this:
const openai = new OpenAI({ apiKey: 'sk-...' });<p>// For this:
const costlens = new CostLens();
const openai = costlens.openai({ apiKey: 'sk-...' });
// Everything else stays exactly the same<p>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<p>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)<p>Try it: npm install costlens<p>The core SDK is free and works locally. I'm also building a dashboard for teams to track their AI spending.<p>NPM: <a href="https://www.npmjs.com/package/costlens" rel="nofollow">https://www.npmjs.com/package/costlens</a><p>Anyone else tired of overpaying for AI APIs? What's your biggest cost pain point?</p>
<hr>
<p>Comments URL: <a href="https://news.ycombinator.com/item?id=45945927">https://news.ycombinator.com/item?id=45945927</a></p>
<p>Points: 2</p>
<p># Comments: 2</p>
]]></description><pubDate>Sun, 16 Nov 2025 15:47:20 +0000</pubDate><link>https://costlens.dev/</link><dc:creator>j_filipe</dc:creator><comments>https://news.ycombinator.com/item?id=45945927</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=45945927</guid></item></channel></rss>