Docs / Reference
Stream timeout
Streams that never start, go quiet, or reach the 2-hour maximum.
Last updated
Signs
- The tool shows a timeout while the model is still thinking.
- The stream ends with
upstream_timeoutorupstream_unavailablein the stream. - A very long task stops after about 2 hours.
The model did not start in time
Cent AI waits up to 600 seconds in total, across retries on other routes, for the model's first output. After that the request fails with upstream_timeout and nothing is charged. Retry, or use a model that answers faster.
The stream stopped in the middle
If the model goes quiet or the connection to it breaks after the stream started, the stream ends with an error event in your protocol's format:
| Cause | OpenAI code | Anthropic type |
|---|---|---|
| The model stopped or went idle after the first output | upstream_unavailable | api_error |
| Cent AI restarted during a deploy | upstream_unavailable | overloaded_error |
| The stream reached its maximum duration | upstream_timeout | timeout_error |
At the maximum duration the message is "The stream reached the maximum duration of {seconds} seconds." The default maximum is 2 hours.
Tokens already delivered are charged; there is no retry after the first output. Start a new request to continue.
The timeout is in your client
Cent AI sends : keepalive every 15 seconds from the start, so a connection is never silent for long. If your client still times out:
- Raise the client's total request timeout, or turn it off for streaming calls.
- Check proxies between your client and
api.cent-ai.devfor buffering or idle timeouts. - Use
stream: truefor any request that can take more than 100 seconds.
See Long streaming.