Extrafemi Labs · Flagship product

Introducing Lodestone

Reliable AI calls for tools on a shoestring budget: Extrafemi’s own library, and the day of free-model failures that made us build it.

Extrafemi LabsThe Extrafemi Group6 min read

The Lodestone website: Reliable AI calls for tools on a shoestring budget, running serverless
Lodestone — lodestone.extrafemi.com
1 in 15free-model answers were usable
45 stwo models held the connection and never answered
$0.0004a paid call to read a job posting, in about 3 seconds
0dependencies in the library that came out of it

Lodestone is Extrafemi's flagship product: a small library that keeps AI-powered tools working when the models behind them fail. We designed it, we built it, and it carries our name. It is the most technical thing Extrafemi has made, and we are proud of it.

It began with a bad day. On 28 October 2026, a feature in KeyStone, our jobs, grants and visa app, stopped working. Scoring a CV against a job posting ran for its whole 24-second budget and then showed the person an error page they could not read. Nothing in our code had changed. The free AI models behind it had.

This is what we measured, what we got wrong, and what we built afterwards. We think it is useful to anyone who ships a small tool on a free or cheap AI model.

What we measured

Before we touched anything, we tested it. We made three attempts each on five free models on OpenRouter, 15 in total.

  • One usable answer in 15. It took 25 seconds.
  • Two models were rate-limited every time (a 429).
  • Two held the connection open for 45 seconds and never answered.
  • Once, the router picked a safety classifier, which replied "User Safety: safe" to a request for JSON.

Free models come and go. They get withdrawn, rate-limited or stuck, and a tool that depends on them inherits every one of those bad days.

What a paid model did instead

We tried a low-cost paid model, Claude Haiku 5.5, with its reasoning switched off. Reading a job posting took about 3 seconds and cost $0.0004. Scoring a CV against the posting took about 5 seconds and cost $0.0006.

Free models 15 attempts

1 in 15

usable, and it took 25 seconds

Low-cost paid model reasoning off

$0.0004

about 3 seconds to read a job posting

$0.0006

about 5 seconds to score a CV against it

That is the number we keep coming back to. For a tool run by one person, a call that costs four hundredths of a cent is affordable. A call that fails after 24 seconds, and is paid for again when the person tries once more, is not.

What we got wrong

Our first speed table timed each model until the response headers arrived. OpenRouter sends headers early and the body follows seconds later, so every model looked much faster than it really was. If you measure any AI API, time it to the last byte of the answer.

What we built

We moved the defensive code out of KeyStone and into Lodestone, so the next tool we build does not need to rewrite it. It is TypeScript, has no dependencies, and is MIT licensed. We built it to the standard we hold every Extrafemi product to.

It sits between your code and the models, and it does a few things we could not find together in one place:

  • A time budget. A serverless function has about 30 seconds before its gateway cuts it off. Lodestone plans inside 24 and gives each attempt a slice, so one slow model cannot use up everything.
  • Failover that changes the model. If a model is withdrawn, slow or rate-limited, it moves to the next one. If a whole provider is down, it moves to another provider that has its own key.
  • A circuit breaker. A model that keeps failing is skipped for every request until it recovers, instead of every request paying to find out again.
  • Spend limits that hold. A daily and a monthly limit, with a hold taken for each paid attempt so a burst of requests cannot overshoot.
  • Per-caller limits and customer keys. Each caller has their own allowance, and a customer who brings their own key never touches your fallback providers or your spend.
  • Plain-language errors. "429" means four different things: a daily limit, a per-minute limit, a busy service, or no credit. Lodestone tells them apart and turns each into a sentence a person can act on.

It is not a replacement for a gateway. OpenRouter already offers model fallbacks of its own, and a gateway gives you access to hundreds of models and one bill. Lodestone works inside your function, on top of them, and keeps going when a whole gateway has a bad day.

The part that surprised us

Our tests passed. Then we called the fallback providers for real, for the first time, with real keys, and the live calls found things the fakes never could.

  • Groq · 404Groq had withdrawn the model we had listed. The call came back as a 404.
  • Groq · 11 vs 4Groq's model list also contained speech, text-to-speech and safety models next to its chat models. Our code counted 11 chat models. There are 4.
  • Requesty · 402Requesty accepted our key and listed 807 models, then refused the chat call with a 402, because the account had no credit.
  • Python port · 403Our Python port was refused with a 403 by Groq, because Python's default User-Agent is blocked by Cloudflare-fronted providers. On a Mac it also failed to connect at all, because the python.org build of Python ships without trusted certificates.

Every one of those is now fixed or written down. The lesson is the same one we keep relearning: a test against a fake tells you your code does what you think. Only a real call tells you what the world does.

A security review of the library found a bug of ours: a private call, made with a CV, could be saved in the shared cache for a day. It is fixed in version 0.7.0, and the changelog says so plainly.

What is proven and what is not

We would rather tell you than let you find out.

Live calls
Only Groq and OpenRouter have answered a live call. Every other provider is checked against fakes of its documented request, and the Providers page says so.
Production
It runs in production in one place: KeyStone, on Netlify Functions. The same checks run in CI on Node 20, 22 and 24, Cloudflare Workers, Deno and Bun, but we have not deployed to Vercel, Render or Base44 yet, and the page says that too.
Python port
There is a Python port. It is alpha, and its page lists exactly what is missing.
Not covered
It does not do streaming, tool calling, embeddings or speech. It is for one-shot text and JSON calls.

Who it is for

Indie builders, startups in the Global South, and free public tools: people for whom a fraction of a cent per call matters and a 30-second limit is real. Gateways speak to platform teams. This is for the person deploying a serverless function on a Friday night.

Try it

Installnpm install @extrafemi-ai/lodestone

Lodestone can also order models by measured quality for Hausa, Igbo and Yoruba, using the scorecards from Naija Eval (opens in a new tab), our benchmark of Nigeria’s own language model.

If you run it somewhere and it breaks, or works, please open an issue. That is how the proof table gets longer.

We built Lodestone because our own tools needed it. We are proud to share it.

Extrafemi LabsOwned software, built and shipped.
About Labs · More insights

Have a project in mind?

Tell us about the work. We read every message and reply directly.

Start a project