A relay service starts erroring or slowing down: how to tell whose problem it is

Tutorials Published 2026-09-21 Updated 2026-09-27 106 views API Compass
"When it breaks, everyone blames the relay." Usually the truth is more specific: it could be your client, the relay, the upstream, or the model provider. Here is how to localise it in a few steps.

Why guessing wastes money

When calls start failing, the instinct is to blame the relay service and switch providers. That is sometimes right and often wrong — and switching costs you the balance on the old account plus a round of migration work.

The failure can sit in four places. Each one has a different symptom pattern, and localising it takes a few minutes.

The four layers

LayerTypical symptoms
Your client / codeWrong base_url, expired key, malformed request body, client-side timeout set too low
The relay serviceConsistent errors across every model, authentication failures, sudden key invalidation
The relay's upstreamErrors on one model family only, intermittent 500s, latency spikes on specific models
The model providerWidely reported outage, errors on models that go direct to the vendor as well

Step 1: is it every model or one model

This single question splits the space in half.

Every model failing → look at your client first, then the relay service. A credential problem, a wrong base URL or a service-wide outage all look like this.

One model family failing → almost always upstream. The relay's route for that family is down while the rest of its capacity is fine.

Step 2: does the same request work against the vendor directly

If you have any vendor access at all, run the same prompt through it.

  • Fails on the vendor too → the model provider is having a bad day. Nothing to fix locally; wait, or fall back to another model.
  • Works on the vendor, fails on the relay → the problem is on the relay side or its upstream route.

This is the most decisive test available and it takes one call.

Step 3: read the status code properly

The code tells you which layer to look at.

CodeMost likely cause
401Key invalid, expired, or the service rotated credentials
403Key valid but not permitted for this model, or the service is blocking the request
404Wrong path or a model name the service does not recognise
429Rate limit — could be yours, the service's, or the upstream's
500 / 502 / 503Something behind the relay failed or timed out

The distinction between 429 as yours versus theirs: if you are well under your plan's limit and still getting 429, the cap is on their side or upstream.

Step 4: check whether it is latency or failure

These have different causes.

Latency only: time to first token rises while success rate stays high. Usually upstream congestion or the service routing you to a slower channel. Check whether it correlates with peak hours.

Failure only: requests come back as errors quickly. Usually a route or credential problem.

Both at once, across several models: this is the pattern that most often precedes a service going under. Worth watching, not worth panicking over on one occurrence.

Step 5: is it intermittent or continuous

Continuous failures on one model → the route is down. Report it; if it persists more than a day or two, start using your backup.

Intermittent failures with no pattern → most often the relay's capacity. Retries with exponential backoff absorb a lot of this. If your retry logic has no backoff, adding it may fix the symptom entirely.

What to do about it, in order

  1. Check your own client first. Expired key, wrong base_url, request body shape. This is embarrassing to discover after blaming the provider, and it is common.
  2. Retry with backoff. Transient 500s and 429s are normal on any relay and any direct vendor. Absorbing them costs nothing.
  3. Have a backup configured. Two services, switchable by environment variable. This is the single most effective protection against a bad day.
  4. Implement model fallback. If the flagship is unavailable, degrade to a mid-tier model rather than failing the request. Most workloads can survive this.
  5. Then consider switching. Only after the checks above point at the service.

What not to do

  • Do not conclude from one failed request. Single failures happen everywhere.
  • Do not top up more to "unlock a better route" in the middle of an incident. That is exactly the moment the sales pitch is designed for.
  • Do not hard-code the model name. Keep it in configuration so you can degrade without a deploy.

Related reading

  • Give a relay service a health check: a 20-minute verification checklist (guides)
  • How we measure uptime: our methodology and its limits (guides)
  • Six signals that a relay service is about to disappear (guides)

Was this useful? If you have run into something the article does not cover, tell us and we will verify it and update the text.

Related articles

Video generation behind a relay: three API shapes, four billing traps, one acceptance checklist

2026-10-19

MCP through a relay: what works, what never will, and how to test it in ten minutes

2026-10-19

A relay selection decision tree: working back from your scenario to a site

2026-10-07

Logging and reconciliation: attributing token spend to the project level

2026-10-06

Migrating suppliers gradually: replacing an API site without interrupting service

2026-10-06

Build your own probe: twenty lines of script to monitor your API suppliers

2026-10-06

Read on: a few of the services we list

This article does not point at a specific model family, so here are a few of the highest-scoring services we list, in case you want to read on. They are ordered by score and uptime and are not a recommendation.

See the full list in the directory, or browse by model family.