@goodandready/dsh-web-gateway: Robust Web Search and Extraction Tool for DeepSeek Harness

Introduction

DeepSeek Harness (DSH) relies on a plugin mechanism to extend its capabilities. The built-in web_search and web_fetch tools often require developers to handle fallback logic manually when encountering rate limits, CAPTCHAs, or empty results. This article introduces the @goodandready/dsh-web-gateway plugin, which provides DSH with more robust web search and page extraction capabilities through an independent toolchain and automatic fault tolerance mechanisms.

Plugin Overview

Name: @goodandready/dsh-web-gateway

Positioning: A toolchain providing failover-capable web search and Markdown extraction for DeepSeek Harness.

Maintainer: GooDAnDReaDY

License: MIT

Core Functions

This plugin registers three core tools and configures provider fallback chains for them:

  • web_gateway_search: Web search tool. The provider fallback chain is: Tavily → Brave → Firecrawl → Exa → SearXNG → DuckDuckGo.
  • web_gateway_extract: Markdown page extraction tool. The provider fallback chain is: Firecrawl → Tavily → Crawl4AI → Jina → readability.
  • web_gateway_research: Multi-source research tool. Combines search and extraction capabilities to organize top sources into a summary.

In addition, the plugin features the following:

  • Circuit Breaker: Automatically skips providers upon consecutive failures to avoid long waits for timeouts.
  • SSRF-Safe Extraction: Strictly validates URLs, allowing only http/https, prohibiting embedded credentials, and requiring resolution to public IPs (blocking internal addresses).

Installation and Activation

Installing this plugin is performed via the DSH command-line tool.

  1. Run the installation command:
    dsh plugin --profile web add @goodandready/dsh-web-gateway
  1. After installation, restart the web profile to activate the tools.

Configuration and Credentials

The plugin depends on external API keys. Please go to the Settings → Credentials page to add the following credential names:

  • TAVILY_API_KEY: Used for search and extraction
  • FIRECRAWL_API_KEY: Used for search and extraction
  • EXA_API_KEY: Used for search
  • BRAVE_API_KEY: Used for search
  • CRAWL4AI_TOKEN: Used for extraction (only used if crawl4aiUrl is set)

In Settings → Plugins → Web Gateway, you can adjust the following parameters:

  • defaultLimit: Default number of search results (default 5).
  • maxLimit: Hard cap on search results (default 20).
  • cacheTtlMs: Memory cache time-to-live (in milliseconds), 0 disables caching.
  • searxngUrl / crawl4aiUrl: Service address for local SearXNG or Crawl4AI; leaving blank disables the corresponding function.
  • allowInternalUrls: Whether to allow extraction of internal addresses (default false).

How It Works

This plugin does not replace DSH’s built-in web_search and web_fetch tools. It registers new web_gateway_* tools. When the model calls these tools, the plugin automatically attempts different providers according to the configured order. If a provider returns empty results, HTTP 429/5xx errors, or network errors, the tool automatically switches to the next one.

Notes

  1. URL Security: web_gateway_extract strictly restricts URLs to http/https with no authentication information, and the hostname must resolve to a public IP.
  2. Caching Mechanism: Results are cached in memory and only support TTL configuration.
  3. Tool Invocation: The plugin only registers new tools. If the built-in tools are required, they must still be specified in the prompt.

Conclusion

By providing provider fallback chains and circuit breaker mechanisms, this plugin enhances the reliability of web search and page extraction. To view the source code or submit feedback, please visit the GitHub Repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye