Skip to content

Streaming Debugging

Streaming requests involve three layers: the client connection, RouteAPI forwarding, and the model service response. Troubleshooting should distinguish where the issue originates.

IssuePossible cause
No outputThe client did not enable stream, or the current model does not support it
Output interruptedModel service timeout, network disconnect, or client connection closed
No usage receivedThe current model does not support stream_options.include_usage
JSON parsing failedThe client is not parsing by SSE line
  • Read data: line by line.
  • Ignore empty lines.
  • End after receiving [DONE].
  • Parse each JSON chunk independently.
  • Do not parse the entire response as one JSON document.