← Back to home@GooDAnDReaDY

dsh-web-gateway

Resilient web search and page extract tools for DeepSeek Harness with provider fallback and SSRF-safe extract

Stars
0
Language
JavaScript
Created
Sep 20, 2026
Updated
Sep 26, 2026
GitHub repo

Introduction

📦 @goodandready/dsh-web-gateway

Resilient Web Search & SSRF-Safe Markdown Extract Fallback Chain for DeepSeek Harness

npm version license DSH Plugin Node version

All Author Projects

🇬🇧 English • 🇨🇳 中文说明 • 🇷🇺 Русский

⭐ If you like this plugin, please star it on GitHub — it shows me that the plugin is useful to you and motivates me to keep developing it.

🐛 If you find a bug or would like to request a feature, open a GitHub issue in any language — I will review your proposal and implement useful suggestions in a future plugin version.

Resilient web search and page extract tools for DeepSeek Harness.

When the built-in web_search / web_fetch tools hit rate limits, captchas, or empty results, this plugin gives the model a separate fallback chain with different tool names (no registration collisions).

Tools

ToolPurpose
web_gateway_searchSearch the web. Chain: Tavily → Brave → Firecrawl → Exa → SearXNG → DuckDuckGo
web_gateway_extractFetch a URL as markdown. Chain: Firecrawl → Tavily → Crawl4AI → Jina → readability
web_gateway_researchSearch + extract top sources into a capped multi-source brief

A provider is skipped on missing key, empty result, HTTP 429/5xx, rate limits or network error. Built-in Circuit Breaker temporarily pauses providers suffering consecutive failures to avoid long timeouts. Results are cached in memory (configurable TTL). Successful responses include provider, skipped (providers not used and why), and cached.

Extract URLs are validated: http/https only, no embedded credentials, and hostnames must resolve to public IPs (loopback / RFC1918 / link-local / metadata blocked). Set allowInternalUrls only if you intentionally need internal targets.

Install

dsh plugin --profile web add @goodandready/dsh-web-gateway

Restart the web profile after install.

Credentials

Add keys under Settings → Credentials (or $DSH_HOME/.credentials.yaml). The settings card stores only credential names, never secret values:

Default nameUsed by
TAVILY_API_KEYsearch + extract
FIRECRAWL_API_KEYsearch + scrape
EXA_API_KEYsearch
BRAVE_API_KEYsearch
CRAWL4AI_TOKENextract (only if crawl4aiUrl is set)

Settings

Configure in Settings → Plugins → Web Gateway:

SettingDefaultMeaning
defaultLimit5Default search result count
maxLimit20Hard search cap
timeoutMs30000Per-provider timeout
cacheTtlMs600000In-memory cache TTL (0 disables)
searxngUrlemptyLocal SearXNG base URL; empty disables
crawl4aiUrlemptyCrawl4AI base URL; empty disables
includeDomains / excludeDomainsemptySearch domain allow/deny lists
freshnessanyany / day / week / month
diskCacheEnabledtruePersist cache under the DSH profile
dailyCap*0Per-provider daily caps (0 = unlimited, UTC day)
searchProviderOrdertavily,firecrawl,exa,searxngComma-separated search provider order
extractProviderOrderfirecrawl,tavily,crawl4aiComma-separated extract provider order
allowInternalUrlsfalseAllow private/loopback extract targets

How it relates to core DSH web tools

DeepSeek Harness already ships web_search and web_fetch via @deepseek-ai/dsh-tool-web. This plugin does not replace them. It registers web_gateway_* tools so the model can fall back when the built-in path fails.

Development

npm test
npm run check

Tests run offline with mocked fetch (no live network).

Visual verification

Plugins settings card for Web Gateway — Dark and Light themes side by side:

dsh-web-gateway v0.1.2 visual verification

License

MIT © GooDAnDReaDY