skip to content

Should a company build its own model gateway, self-run an open-source proxy, buy a managed one or have none, after one gateway release took every AI feature down?

level: principalimportance: should knowfreq 29%

answer

  1. concept failed or operation failed
  2. none, self-run, managed, built
  3. who is on call for it
  4. translation upkeep never ends
  5. stable shape keeps it swappable

basics

~20 s

Usually keep the gateway and fix release practice; one outage rarely proves the concept wrong. No gateway suits one team on one provider, a self-run proxy a fast start, managed when nobody can run it, built when fit demands.

solid answer

~50 s

I would first ask whether the concept or the operation failed. If many teams share providers and need central keys, caps and logs, removing the gateway hands those back to every team every day to avoid a failure that a canary, automatic rollback and cells would have capped at minutes. Then I would choose by who must run it. No gateway fits one or two teams on one provider. A self-run open-source proxy gives broad provider coverage fast, but its upgrades and its releases become ours. A managed one removes operations but adds an internet hop, sees every prompt and makes its outages ours to explain. Building fits strict identity or billing needs, at the price of keeping translation current as provider APIs change. Whichever we pick, apps call a stable platform-owned shape so it stays swappable.

go deeper

for a junior

Recall the four options (none, self-run open-source proxy, managed service, built in-house) and that whoever runs the gateway owns its outages.

for a middle

Explain what each option costs in overhead, availability and upkeep, especially the never-ending work of keeping request translation current as providers change.

for a senior

Show you can read an outage as a release-practice failure or a concept failure, and say which fixes (canary, rollback, cells) apply before anyone removes the gateway.

for a principal

Make the call for this company: which facts (team count, platform staffing, data path, fit) decide it, how to keep it reversible, and what would make you revisit it.

## Start from what the outage showed In this leaf's scenario, one gateway release took every AI feature in the company down for forty minutes, and a staff engineer now asks whether the **model gateway** should exist at all. The first step is to separate two questions: - **Was the concept wrong?** Did the gateway buy nothing the company needs, such as central key custody, per-team spend caps, request logs and failover? - **Was the operation wrong?** Did a release reach every replica at once with no canary, no automatic rollback and no cells? A forty-minute outage like this one often indicts the second. Removing the gateway then hands keys, caps and logs back to every team, a cost paid every day, to avoid a failure that release discipline could have capped at minutes. General build-versus-buy method applies, but the criteria below are the ones specific to a component in the path of every model call. ## The four options | option | hop and overhead | availability you control | ongoing cost | fits when | |---|---|---|---|---| | **none** | none | each team's own | every team re-implements keys, caps and logs, or goes without | one or two teams, one provider | | **self-run open-source proxy** | in your network | yours to run | upgrades, patching, its release breaking you | many teams, fast start, broad provider coverage | | **managed, externally hosted** | usually an extra internet hop | the vendor's | fees, vendor reviews, its outages are yours | no platform team to run it | | **built in-house** | in your network | yours | keeping translation current as providers change | strict internal identity, billing or routing needs | ## Criteria specific to a model gateway - **Overhead.** A self-run or in-house gateway in the same region adds milliseconds; a managed one outside your network usually adds a round trip over the internet to every call. - **Blast radius and who is on call.** Whoever runs it owns the outage. A managed gateway's incident is yours to explain but not yours to fix. - **Translation upkeep.** Providers keep changing request fields, tool-call formats and stream events. Building means owning that churn forever; adopting means waiting for someone else to ship it. - **Data path.** A managed gateway sees every prompt and response. Check its data processing and retention terms with whoever reviews contracts before adopting it. - **Fit.** How many teams and providers, and whether internal identity, chargeback or routing rules would force a fork of an open-source proxy. When one aggregator product's shared request shape and vendor contracts stop fitting a workload is a separate question about that kind of product. ## Embedded instead of networked There is a fifth shape: a **library or per-host sidecar** that every application embeds, with policy pushed from a central control plane. It removes the shared network hop and the single fleet that can fail together, but each application now fetches provider credentials, and policy changes ship at the pace of application deploys. It suits key custody least and overhead best. ## Keeping the choice reversible 1. Have applications call a **stable request shape** owned by the platform, not one implementation's own extensions. 2. Keep **gateway-owned model aliases**, so callers name a role, not a provider model. 3. Keep **keys, budgets and log records** in your own systems where you can, so a swap does not reset them. 4. Run the gateway behind an internal hostname, so moving to another implementation is a routing change. ## A defensible answer to the staff engineer - If many teams share providers and need central keys, caps and logs: keep a gateway and fix release practice first (canary on per-route provider 4xx, automatic rollback, cells, drained shutdowns). - If there is no platform team and the data path allows it: a managed gateway, accepting the extra hop and the vendor's availability. - If the open-source proxy you run keeps being patched or forked to fit internal identity and billing: that is the signal to build. - If only one or two teams on one provider use models: no gateway, with a small shared client wrapper, revisited when a third team arrives. None of these is right for every company; the lead's job is to say which facts would move the answer.

  • What would push you from a self-run open-source proxy to building your own gateway?
    When you keep patching or forking it to carry internal identity, chargeback or routing rules, so every upstream upgrade becomes a merge, or when its release cadence and bugs keep causing outages you cannot fix at source. At that point you already own the code in practice, without the control.
  • Can a library embedded in every application replace a networked model gateway?
    Partly. It removes the shared hop and the single fleet that fails together, but each app fetches provider credentials and policy changes ship at the pace of app deploys. It works when caps and logs can be enforced by pushed config and reporting out of band, and it is weakest on key custody.
  • What must a managed model gateway's terms answer before you adopt it?
    Whether it stores prompts and responses, for how long and who can read them; what availability it commits to and what happens when it misses; where it runs relative to your providers; and how you leave. Check the actual data processing terms with whoever reviews contracts rather than the product page.

  • One gateway outage proves the company should remove the gateway entirely.
  • Building an in-house gateway is cheap once the first version ships.
  • A managed gateway adds no latency because it runs close to the providers.
  • Self-running an open-source proxy means nobody on our side has to be on call.
  • The gateway choice is irreversible, so pick the one with the most features.