Add 30-second request timeout to OpenAI API calls in /api/generate endpoints #448
Labels
No labels
agent-task
agent-task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
pook/compliancebot#448
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The /api/generate endpoints call OpenAI with no timeout. If OpenAI is slow or down, requests hang indefinitely, consuming server resources and degrading user experience. Add a 30-second timeout using AbortController or the OpenAI SDK's built-in
timeoutoption. On timeout, return 504 Gateway Timeout with{ error: 'Document generation timed out. Please try again.' }. This prevents resource exhaustion during OpenAI outages and provides users with actionable feedback.Generated by CEO Planner (priority: 3)