AI Agent Hub
Back to plugins
🤖

dsh-fetch-timeouts

Model Inference Updated 2026.09.03

Run the following command in DeepSeek Harness:

dsh plugin install d3vmeh/dsh-fetch-timeouts

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install d3vmeh/dsh-fetch-timeouts in the terminal to install the plugin; the source is hosted at https://github.com/d3vmeh/dsh-fetch-timeouts .

About this plugin

Node's built-in fetch gives up after 300 seconds without response headers or 300 seconds without body bytes, and dsh's streamIdleTimeoutMs and timeoutMs operate at entirely different layers—tweaking them only swaps one error message for another. In practice this means Ollama or LM Studio, silently chewing through a long reasoning chain or assembling an entire file as a single tool call, gets severed at exactly 5:00 with UND_ERR_HEADERS_TIMEOUT or UND_ERR_BODY_TIMEOUT. dsh-fetch-timeouts does one thing clearly: it swaps Node's global fetch dispatcher for a configured undici Agent, pushing both timers to a default of 30 minutes so a local model gets the full window it needs to finish one coherent inference or generation.

The change is process-wide. Every call that routes through Node's global dispatcher—model requests, web search, HTTP MCP servers, cloud providers—picks up the same relaxed limits, while web_fetch builds its own per-request agent and is unaffected. The trade-off is that a genuinely dead connection can linger up to the configured duration before being declared lost, so pairing this plugin with a raised streamIdleTimeoutMs leaves dsh's idle watchdog as the only remaining safety net. Perfectly reasonable on a single-user box; worth a second thought on a shared host.

This plugin is for users running Ollama, LM Studio, or any local backend that does not emit keepalive pings, and who keep hitting the 5-minute silence cutoff. llama.cpp's llama-server sends a ping every 30 seconds by default, so those users typically never need it. The moment dsh exposes these two timeouts natively through its pi-ai dependency, this plugin becomes redundant on its own.

Use Cases

  • Ollama generating an entire file as a tool call gets cut off at 5 minutes
  • LM Studio reasoning on a large tool call triggers UND_ERR_HEADERS_TIMEOUT
  • A local backend without keepalive pings drops a long-running connection at 5:00

Best For

  • Developers and researchers running Ollama or LM Studio for local inference
  • Users repeatedly hitting the 5-minute silence cutoff while the model is still working
  • Single-user setups with slow local model servers that need a longer generation window