AI Help
Why did an AI API response stop halfway through its answer?
Inspect the final response status and transport outcome to distinguish token-limit truncation, interruption and incomplete processing.
Steps to follow
- Save the response ID, status, incomplete details and stream termination information available from the endpoint.
- Check output-token limits and whether the client consumed the whole stream. A dropped connection can occur while server-side work continues.
- Retrieve the response when supported and reconcile existing output before retrying. Request a continuation with clear boundaries when appropriate.
Example in practice
Illustrative example. A response ending mid-table with an output-limit reason needs a smaller scope or a larger supported limit before the table is accepted.
Related AI help
- How do I handle an AI refusal when my app expects a structured response?
- How do I tell when streamed AI tool arguments are complete and ready to parse?