anywhere on yshubham.com

Where to?

↑↓ moveenter open/ from anywhere

01/work/routing-run

routing.run

A stable OpenAI-compatible endpoint over a model market that changes every week.

role
Co-founder & CTO
period
Feb — Jun 2026

I cofounded Routing and built its backend and platform from zero: provider adapters, route policy, health-aware fallback, authentication, usage metering, billing, and the production path through acquisition and handover.

01

the problem

Model providers fail differently. One times out, another returns an incompatible error body, and a third begins streaming before failing halfway through the response.

If every product owns that complexity, changing a model or fallback chain becomes an application deployment. The gateway needed to make provider churn an operational decision instead.

constraints

  • Keep the client surface OpenAI-compatible so an existing integration can move by changing its base URL and key.
  • Preserve streaming while normalizing provider errors and retry behavior.
  • Meter usage without persisting prompts or completions.
  • Let operators change route aliases and fallback chains without shipping client code.
02

architecture

  1. clientOpenAI-compatible request
  2. edgeAPI key, limits, request identity
  3. policyroute alias, model choice, fallback chain
  4. healthlatency and provider failure signals
  5. providernormalized streaming adapter
  6. ledgerusage and billing metadata only

stack · Python · FastAPI · PostgreSQL · Redis · Docker

03

decisions

  1. A route is configuration, not code

    Applications call a stable alias. Provider selection and fallback order live in the control plane, so an operator can move traffic without touching every caller.

  2. Health is more than a ping

    A provider can return 200 and still be unusably slow. Routing decisions need recent latency and request failures as well as simple availability checks.

  3. Privacy changes the data model

    The proxy holds request bytes only long enough to forward them. Accounting is built from bounded metadata rather than a convenient archive of user prompts.

  4. Retries belong beside billing

    A retry or fallback must not become a second customer charge. Provider attempts and billable requests are separate events with explicit ownership.

04

results

1 stable API surface across hosted and self-operated model providers
0 prompt bodies persisted usage is counted without storing request content
no deploy to change a route model and fallback policy move in the console

Current product behavior and privacy language are documented on routing.run. Ownership and the acquisition handover reflect my role from February through June 2026.

05

failures & lessons

  1. The unhappy path is the product

    The simple proxy was never the hard part. Streaming failures, mismatched error formats, partial responses, and retry boundaries determined whether the gateway was trustworthy.

  2. Fallback needs a stop condition

    Blindly trying every provider increases latency and cost. Policy has to know which errors are retryable, how much time remains, and when returning the original failure is safer.

  3. Operations need an audit trail

    Moving traffic without a deploy is useful only when the team can explain which policy changed, who changed it, and how the request path reacted.