Skip to content
~/connor.meador
All projects

// case study

Multi-Model AI Orchestration Platform

The AI infrastructure behind the sites I run — multi-model routing, RAG, chat assistants, and budget-enforced automation

Year
2026
Role
Sole designer and builder — router, RAG pipeline, chat assistants, budget enforcement, and the automation routines that run on top.
Status
Live
View the code

github.com/ConnorMeador/rag-pipeline-ts

Architecture diagram: task sources flowing into a single router with budget caps and failover, fanning out to cloud and local model providers, with every run logged for cost and audit

// in plain english

This is the behind-the-scenes system that does the repetitive work on the sites I run. It sends each AI task to the cheapest model that can handle it, switches to a backup when one fails, and stops at a spending limit. It also powers the chat assistants on ten of my sites, which answer from each site’s own content. I designed and built all of it.

// about this project

What it does and how I built it

Running 18 production sites solo only works because the repetitive work is automated. This platform routes every AI call — site builds, scheduled audits, live chat assistants, bulk content jobs — through a single router that picks the cheapest model capable of the task, with automatic failover when a provider degrades and hard spending caps enforced in code. A RAG pipeline with locally-run embeddings and an opt-in LLM rerank stage grounds the chat assistants that run on ten of the live sites, and every run is logged end to end, so spend and failovers stay auditable after the fact.

My role: Sole designer and builder — router, RAG pipeline, chat assistants, budget enforcement, and the automation routines that run on top.

Built under ROC Web Tech, the web studio I founded.

// decisions

  • One gateway chokepoint instead of per-script API calls

    Early scripts each called providers directly — which meant budget caps, failover, and logging had to be reimplemented (or forgotten) in every script. Routing everything through one internal gateway put cost enforcement, model fallback, and spend logging at a single seam. New scripts inherit all three for free.

  • Local-first tier ladder with logged escalation

    Mechanical work — transforms, classification, alt text, embeddings — runs on hardware I already own, at no per-call cost. Moving a task to a paid model has to be justified by capability, and every reroute is logged. The discipline is structural, not aspirational: the cheap path is the default path.

  • Budgets enforced in code, with hard halts

    An unattended AI loop with no ceiling is an incident waiting to happen. Spending is capped at every layer, with an early warning before a ceiling is reached and an automatic halt on billable calls once it is. Autonomous loops carry their own stop conditions on top of that, so a stuck job degrades into a logged skip instead of a runaway bill.

  • Evidence ledger on every run

    Each automated run leaves a structured record of what happened and what it cost. That turns "why did last night's job spend what it spent" from archaeology into a query — and it is how routing regressions get caught.

// highlights

  • Routes across Anthropic, OpenAI, Google, Groq, DeepSeek, and local Ollama models by task class and capability
  • Automatic failover chains — every reroute is logged, so a cascading provider outage reads as a report, not a mystery
  • Hard budget enforcement — spending caps at every layer, with an automatic halt on billable calls before they run away
  • RAG with locally-run embeddings + opt-in LLM rerank second stage that fails open
  • Chat assistants grounded on per-site content, live on 10 production directory sites
  • Local inference and image generation share one 16 GB GPU without colliding
  • Public TypeScript extract of the RAG pipeline on GitHub (rag-pipeline-ts) — architecture walkthrough available in interviews

// what I’d do differently

The router's architecture was ahead of its observability — when the telemetry pipeline silently broke, calls quietly failed over to the premium tier for weeks before an audit caught it. The dollar caps held (that tier is flat-fee), which is exactly why nothing screamed: the failure cost routing discipline and premium-model throughput, not money. I now treat monitoring as part of the feature — if the ledger isn't writing, the router isn't done, and a watchdog checks that the watchers themselves are alive.

Stack

  • TypeScript
  • Node.js
  • LiteLLM
  • Ollama
  • n8n
  • GitHub Actions

AI Tools

  • Claude API
  • OpenAI API
  • Gemini API
  • Groq
  • DeepSeek API
  • Ollama (local models)

Built with AI as a force multiplier — scaffolding, research, automation, and code review all flow through these tools in my daily loop.

// gallery

Architecture diagrams

Click any diagram to enlarge.

// let’s build

Want this on your team?

I design, build, and ship production AI and web systems end-to-end — and I’m looking for a full-time AI engineering role to do it on a team.