What does stream_error mean?
A streamed response broke before it finished. If it happens mid-stream you get data: {"error": {...}} followed by data: [DONE].
Code: stream_error · HTTP status: 502, 503 or 504
Text you already received is real, but the answer is incomplete.
Common causes#
- an interruption while the model was streaming
How to fix it#
- Treat the reply as incomplete; don't show it as final.
- Retry the request (the whole request, not just the rest).
- Check for an
errorobject in every chunk, not just the HTTP status, since the status was already 200 when the stream started.
Should my code retry?#
Retryable.
The error body uses the OpenAI shape, so OpenAI SDKs raise it as an exception you can catch:
{"error": {"message": "...", "type": "...", "code": "stream_error", "param": null}}
Every response also carries an X-Request-Id. Keep it in your logs; it's the quickest way for support to find a request.
See the full list in the Model API reference.
Still need help?#
- General support: support@clatterlabs.com or team@clatterlabs.xyz
- Infrastructure questions, or permanent deletion of your data (your whole account or one service): infrastructure@clatterlabs.xyz
We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.