DeepSeek: R1 Reasoning Timeout / Empty Response

DeepSeek R1's chain-of-thought reasoning process can take minutes for complex prompts. Clients with default timeout settings (typically 30–60 seconds) will cut the connection before R1 finishes thinking. DeepSeek's API sends empty keep-alive lines during the reasoning phase to prevent TCP timeout, but some HTTP clients interpret the subsequent empty JSON body as a JSONDecodeError. The result looks like HTTP 200 success with no content — confusing and hard to distinguish from a genuine error.