The Stub Never Goes Down

Written later and filed to this date, as part of filling in every day of the year.

Every answer Omni has ever given is Generated response for: followed by the prompt it was handed. No model wrote that. A function did: three lines of Go, the built-in placeholder provider, which joins a fixed prefix to the prompt and returns no error, ever.

Omni is the oldest idea in my workspace: a middleware that sits in front of language models and keeps answering when one of them is down. For twenty-one months it was a single commit holding a two-line README. Then my build agents found it, and in June they wrote 127 commits into it, and 47 more in July. By the time it went quiet in September it had 179 commits, about twelve thousand lines of Go and twice that in tests, a thousand and twenty-two test functions across eighty-four files. It has a circuit breaker per provider. It retries with backoff. It collapses identical in-flight prompts into one upstream call. When every provider fails, it can serve a stale cached answer and say so in a header. It streams, it moderates input, it speaks an OpenAI-compatible dialect, and it answers health probes with “draining” while it shuts down.

The agents could not give it a real model. Which providers, with whose credentials, at what cost, was a question my rules reserve for me, so they built everything against an interface and parked the question in a file of open ones. That was the right call. It also meant the one path Omni exists for, the switch from a failing model to a working one, has run only against fakes written to fail on cue inside a test. In production, so to speak, the provider is the stub, and the stub has never had a bad day.

I answered the parked question in September: no infrastructure until Omni has a consumer, and when it wakes, the first real provider is a local model with no key and no bill. Then the repository was parked with the answer inside it.

What it taught me: an agent with a backlog and no consumer will keep hardening whatever it can reach, and every hardening is real, tested work. Twenty-six thousand lines of tests is evidence of care. It is not evidence that anything was ever at stake.

The stub’s comment says real providers replace it once credentials are decided. Its Generate method still takes a context it never checks, and returns nil.


← all writing