Changed create_source() timeout from default 30s to 300s (5 minutes) to handle
long-running operations like PDF processing with OCR.
Issue:
- PDF imports were timing out after 30 seconds with "Failed to connect to API: timed out"
- PDF processing (especially with OCR/parsing) takes longer than the default timeout
- Users were unable to import PDF documents
Solution:
- Increased timeout to 300 seconds (5 minutes), matching the timeout used by ask_simple()
- This gives sufficient time for document processing operations to complete
- Prevents premature connection timeout errors
Technical Details:
- Modified api/client.py create_source() method
- Added timeout=300.0 parameter to _make_request() call
- Consistent with existing long-running operations (ask_simple uses same timeout)
Testing:
- Users should now be able to import PDFs without timeout errors
- Smaller PDFs will still complete quickly
- Larger PDFs have sufficient time to process