Skip to main content
Errors use the OpenAI format, with an HTTP status and a JSON body:
Before answering with 429, 502 or 503, fastrun has already tried the other GPU servers that serve the model. When these errors persist, wait longer between retries rather than retrying faster.

Retrying

Retry 429, 502 and 503 with exponential backoff, and wait at least as long as the Retry-After header says. OpenAI SDKs do this for you: they retry these statuses twice by default and follow Retry-After. You can raise the count:
Don’t retry 400 and 401: the same request fails the same way.

Errors in a stream

A streamed response can start with status 200 before the request is sure to succeed. A failure after that point arrives as an event with an error field. See Streaming.

Timeouts

A streamed request can run for up to 60 minutes. A request without streaming sends nothing until the whole answer is ready and must be complete within 10 minutes, so set your client’s timeout to cover the longest answer you expect. For long answers, use streaming, which sends tokens and keep-alive comments as it goes.