npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-fetch-timeouts

v0.1.0

Published

Raise Node's HTTP timeouts for the whole DeepSeek Harness process so slow local models are not cut off at 5 minutes

Readme

dsh-fetch-timeouts

Raises Node's HTTP timeouts for the whole DeepSeek Harness process, so a slow local model is not cut off after 5 minutes of silence.

The problem it fixes

Node's built-in fetch (which dsh's model adapters use) gives up when a server sends no response headers for 300 seconds, or no body bytes for 300 seconds. dsh has no setting for those two timers: streamIdleTimeoutMs is dsh's own watchdog and timeoutMs is the SDK's request timer, so raising them changes the failure message from pi-ai stream idle timeout to Failure reason: terminated (UND_ERR_BODY_TIMEOUT / UND_ERR_HEADERS_TIMEOUT) at exactly 5:00.

Servers that stay silent that long include Ollama and LM Studio while a model thinks or generates a large tool call (for example the entire contents of a file for write), and any backend that does not send keepalive pings. llama.cpp's llama-server sends a ping every 30 seconds by default, so llama.cpp users usually do not need this plugin.

Install

dsh plugin --profile web add dsh-fetch-timeouts

That is enough: the defaults raise both timeouts to 30 minutes. To change them, add to ~/.dsh/profiles/web/cordis.patch.yml:

- id: fetch-timeouts
  config:
    headersTimeoutMs: 3600000   # time allowed before response headers arrive; 0 disables
    bodyTimeoutMs: 3600000      # time allowed between body chunks; 0 disables

Restart dsh web. One line confirms it at startup:

fetch-timeouts: headers 1800000 ms, body 1800000 ms (process-wide)

Also raise dsh's own watchdog on the provider route, or it will fire first:

llm-pi-ai:
  providers:
    ollama:
      streamIdleTimeoutMs: 1800000
      timeoutMs: 1800000

What you should know

  • It is process-wide. Every fetch in the dsh host (model calls, web search, HTTP MCP servers, cloud providers) gets the same longer limits. A genuinely dead connection therefore takes up to the configured time to be noticed. Reasonable on a single-user machine; think twice on a shared host.
  • It works by installing an undici Agent as Node's global fetch dispatcher. If NODE_USE_ENV_PROXY is set it installs undici's proxy-aware agent instead, so HTTP_PROXY, HTTPS_PROXY and NO_PROXY keep working. Tested on Node 22 with undici 8 (undici 8 requires Node 22.19 or newer).
  • Loading the plugin's undici dependency already swaps Node's default dispatcher for undici's own (same 300 second defaults); the plugin then applies your timeouts. Unloading the plugin returns to undici's default, not to Node's original object.
  • It is a stopgap. When dsh exposes these timeouts itself (its pi-ai dependency already accepts a custom fetch), this plugin becomes unnecessary.

License

MIT