From 7a32885d260fe22e20a2b642c0d6e626381b8912 Mon Sep 17 00:00:00 2001 From: Viktor Barzin Date: Sat, 18 Apr 2026 22:32:34 +0000 Subject: [PATCH] extractor: bump claude poll timeout to 600s Real UK payslip PDFs are 100-200KB base64'd, which means ~300-500KB of prompt tokens. Claude (even Haiku) takes 1-5 minutes to process and emit structured JSON. The original 120s ceiling timed out before extraction could finish. Co-Authored-By: Claude Opus 4.7 (1M context) --- payslip_ingest/extractor.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/payslip_ingest/extractor.py b/payslip_ingest/extractor.py index ef74b5a..1ced592 100644 --- a/payslip_ingest/extractor.py +++ b/payslip_ingest/extractor.py @@ -39,12 +39,12 @@ EXTRACTION_PROMPT = ( "- All money in GBP unless the payslip is denominated otherwise.\n" '- If a field\'s value is ambiguous, pick the value from the "this period" column, not YTD.') -POLL_INTERVAL_SECONDS = 2 -MAX_POLL_SECONDS = 120 +POLL_INTERVAL_SECONDS = 3 +MAX_POLL_SECONDS = 600 BUSY_RETRY_DELAY_SECONDS = 5 MAX_BUSY_RETRIES = 10 DEFAULT_MAX_BUDGET_USD = 1.0 -DEFAULT_TIMEOUT_SECONDS = 300 +DEFAULT_TIMEOUT_SECONDS = 600 TERMINAL_STATUSES = {"completed", "failed", "timeout", "error"}