b361377088
The OpenAI client defaults to a 600s read timeout, so a wedged llama-server blocked requests for 10 minutes and never raised, which meant with_fallbacks() to OpenAI never triggered. Set a per-chunk read timeout (120s, configurable via LLAMA_TIMEOUT_SECONDS) plus one retry on the ChatOpenAI and LLMClient clients. Context is preserved because conversation history is rebuilt from Postgres on every request.