Description
Raises Mercury's default per-TSP-HTTP-call timeout from 120s → 300s in mercury/utils/http.py.
Why
The 120s default was a direct carryover from the original Mercury port (commit cf8f743c3b, 2025-04-08) with no comment, no ADR, no PR rationale, and no upstream constraint forcing it. Since then multiple tools have had to work around it with explicit per-call timeout= overrides:
| Override | Tool |
|---|
| 180s | composio_search/actions/vercel_ai_chat.py |
| 240s | bubble/actions/data_bulk_create_things.py |
| 300s | browserless/actions/scrape_content.py |
| 300s | composio/actions/download_s3_file.py |
| 300s | googledrive/actions/upload_from_url.py |
| 600s | googledrive/actions/download_file.py |
| 120-600s (user-controlled) | gemini/actions/generate_image.py |
300s aligns with the median override that tool authors are already choosing, and matches the "5 minutes" intuition several of them wrote in inline comments.
Headroom check
The chain is still constrained by the same upstream limits:
- Thermos → Mercury Lambda invoke timeout: 840s (
LAMBDA_INVOKE_TIMEOUT_SECONDS, apps/thermos/lib/awsutils/lambda.go)
- AWS Lambda hard execution limit: 900s
300s leaves ~540s of headroom under Thermos's ceiling. Tools that legitimately need >300s can still pass an explicit timeout= (the override mechanism is unchanged).
Backwards compatibility
- Every call site that already passes
timeout= is unaffected.
- Tools that previously succeeded under 120s continue to succeed.
- The only behavior change is for tools whose TSP call took 120-300s: those now succeed instead of hanging at the previous default.
How did I test this PR
pytest tests/test_utils/test_http.py → 130 passed
ruff check and ruff format --check on changed files → clean
- Updated
test_client_timeout_value assertion (was the only test pinning the literal 120.0)
- Did NOT change any of the tools that already override the timeout — they keep their existing values.