Skip to main content
Even the best models encounter occasional failures. This guide explains how the Gateway reports errors and how you should respond.

Error categories

Errors can originate from the Gateway, the provider, or your request. The error response will include metadata to help you diagnose the issue.
Status rangeMeaningTypical action
400-499Invalid request or authentication issuesFix the payload or credentials.
429Rate limitedRetry with backoff and respect limits
500-599Gateway or provider failureRetry with backoff and log details

Retry behavior

  • Implement exponential backoff with jitter.
  • Use the Retry-After header when present.
  • Avoid infinite retries by setting a max retry count.

Provider errors

Sometimes errors originate upstream. We will attempt to indicate this in the error response. The router should attempt to navigate you away from that provider if possible, should these errors keep happening.

Next steps

Last modified on February 11, 2026