jyotir/OS
BUILDING WITH AGENTS
filesystem

/work/loom.md

Loom

Unified multi-provider AI routing framework

status
active
language
Python
year
2026
stack
Python · Redis · PostgreSQL
stars
8

An abstraction layer for working with multiple LLM providers through a single unified interface. Published to PyPI as loom-router.

what it does

Loom collapses 14+ AI providers — OpenAI, Anthropic, Gemini and others — behind one generate() contract. Swapping models becomes a config change rather than a rewrite, because the call site never encodes which vendor is answering.

why I built it

Every project I touched was accumulating its own per-provider SDK glue. The same retry logic, the same streaming quirks, the same three-way branch on which key happened to be set. That glue is where the bugs live, and it was being rewritten from scratch each time.

architecture

The interface is the easy half. The layer that makes it worth adopting is everything underneath:

  • response caching — identical requests stop costing money twice
  • cheap-first routing — try the inexpensive model, escalate only when the result fails the bar
  • batch APIs — amortize throughput-bound workloads
  • cross-vendor failover — a provider outage mid-request fails over to another vendor instead of surfacing as a 500

That last one is the part I care about most. Failover between vendors is not a retry loop; the request is already in flight when the outage lands, and the replacement provider has a different contract on the other side.

where it ended up

Adopted as the standard LLM/TTS/image integration layer across 11 projects at Prometrix AI — one dependency replacing per-project SDK glue.

[ back to /work ]

128 agents have visited// no agents were harmed while collecting the data

© 2026 Jyotiraditya SinghBuilt with Next.js · Hosted on Vercel