dsh-web-tinyfish: TinyFish Search and Fetch Provider

DeepSeek Harness (DSH) supports the web_search and web_fetch tools through a plugin mechanism. By default, DSH includes the deepseek-official search provider and the http fetch provider. However, the local fetcher has limitations when handling JavaScript rendering, PDF decoding, and complex bot protection. The dsh-web-tinyfish plugin introduces TinyFish as an alternative, addressing these pain points.

Plugin Overview

This plugin provides TinyFish search and fetch providers for DSH, enabling the built-in web_search and web_fetch tools.

  • Name: dsh-web-tinyfish
  • Repository: https://github.com/HateYouLittle/dsh-web-tinyfish
  • Author: HateYouLittle
  • Category: Web tools
  • License: MIT

Installation and Configuration

Installing this plugin requires a DSH runtime and a valid TinyFish API key.

  1. Install the Plugin
    Use the official command to install:
    dsh plugin --profile <profile> add dsh-web-tinyfish
After installation, the plugin registers the provider ID `tinyfish`.
  1. Configure the API Key
    The plugin does not bundle an API key; you must provide it via environment variables or configuration. If not configured, the provider will report as unavailable.

    • Environment Variable: Set TINYFISH_API_KEY.
    • Configuration File: Set the apiKey field in your private configuration overrides.

Core Capabilities

Using the TinyFish providers enables the following capabilities:

  • Search Support: Provides titles, snippets, and publication dates via ctx.web.search().
  • Fetch Support: Supports JavaScript rendering via ctx.web.fetch(), allowing content extraction from SPA-like sites.
  • PDF Text Extraction: Can parse and extract text from PDF documents—a task the local fetcher cannot perform.
  • Bot Protection Handling: Explicitly marks bot-protection challenges as bot_blocked errors instead of returning the challenge page body.
  • Output Formats: Produces clean Markdown, HTML, or JSON output rather than raw HTML.

Behavior and Limitations

  • SSRF Protection: Fetch request URLs are sent to the TinyFish server. TinyFish rejects private IPs, localhost, and cloud metadata endpoints, so SSRF protection is enforced on the TinyFish side. For sensitive data fetches, consider resetting to the http provider.
  • Reset Method: To switch back to the default providers, modify the configuration as follows:
    searchProvider: 'deepseek-official'
    fetchProvider: 'http'

Summary

This plugin equips DSH with more powerful web handling capabilities, suitable for development scenarios that require processing dynamic content, PDF documents, or complex anti-scraping measures. Plugin repository: https://github.com/HateYouLittle/dsh-web-tinyfish

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

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

Xiaoye