Keep asyncio import for future timeout implementation.
Handle TimeoutError and other exceptions properly.
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>
Prevents socket hang up when LLM is slow or unavailable.
- Timeout: 120 seconds (configurable via OUTLINE_TIMEOUT_SECONDS)
- Returns 504 Gateway Timeout error if exceeded
- Fixes: socket hang up errors in Next.js proxy
Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com>