Skip to content

About

Universal full-URL search adapter for DeepSeek Harness | 为 DSH 打造的独立搜索引擎(Tavily/SearXNG 等)全称 URL 直连插件

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

dsh-custom-search

dsh-plugin DeepSeek Harness License: MIT

English | 中文说明


A universal full-URL web search adapter plugin for DeepSeek Harness (dsh).
为 DeepSeek Harness 打造的通用全称 URL 独立搜索引擎适配插件(支持 Tavily、SearXNG 等,原地接管原生搜索)。


中文说明

dsh-custom-search 是专为 DeepSeek Harness 开发的第三方通用网页搜索适配插件。

📌 背景与痛点

官方原生 web-search-deepseek 插件硬编码绑定了 Anthropic Messages 大模型协议与 /messages 请求路径,导致用户无法直接对接标准独立搜索引擎(如 Tavily、SearXNG 等)。

本插件基于 Harness 原生 dsh.bundle 规范构建,采用原地覆盖(In-place Monkey Patching)技术,在保留官方原生设置卡片的前提下,实现任意全称搜索端点直连,即装即用。

✨ 特性

  • 🌐 全称 URL 原样直连:用户在设置中填入什么完整 URL,就直接请求该地址,绝不强加 /messages,也不拼接任何私有后缀。
  • 🧩 无私有厂商硬编码:不针对任何单一厂商写死逻辑,通用支持 Tavily、SearXNG 等符合 REST 规范的独立搜索服务。
  • ⚡ 原生设置卡片无缝复用:保留官方 Web UI 的「网页搜索」设置项,无需新建额外的配置面板,直接复用其 Base URL 与 API Key 字段。
  • 🔄 双协议智能自适应:
    • 大模型协议:若配置留空或指向 DeepSeek 官方,全自动放行原生逻辑;若填写带 /messages 结尾的大模型代理端点,自动消除重复拼接;
    • 独立搜索协议:若填写标准独立搜索端点(如 Tavily 的 /search),自动按通用 REST 规范请求并解析搜索结果列表。
  • 🚀 原生插件契约:遵循官方 Cordis 与 dsh.bundle 规范,不修改 Harness 任何一行核心源码。

📦 安装与配置

在已拉取/安装有 DeepSeek Harness 的工作目录中执行:

方式一:从 GitHub 仓库直接一键安装(推荐)

pnpm dsh plugin --profile web add git+https://github.com/baizhufbb/dsh-custom-search.git

方式二:本地克隆安装

git clone https://github.com/baizhufbb/dsh-custom-search.git
pnpm dsh plugin --profile web add ./dsh-custom-search

⚙️ 设置与使用

  1. 启动 Harness Web 端:
    pnpm dsh web
  2. 打开浏览器访问 http://127.0.0.1:3080,点击右上角 设置(Settings) ➡️ 插件配置(Plugin configuration) ➡️ 网页搜索(Web search):
    • 接口地址(Base URL / Endpoint):填入你要调用的完整全称 URL(例如 Tavily: https://api.tavily.com/search);
    • API Key:填入对应的搜索引擎密钥(例如 tvly-dev-...)。
  3. 点击保存后,在对话框中进行联网搜索,就会自动向你配置的完整端点发起请求。

🗑️ 卸载

如需恢复 Harness 官方默认搜索逻辑:

pnpm dsh plugin --profile web remove dsh-custom-search

English

dsh-custom-search is a universal full-URL web search adapter plugin for DeepSeek Harness, built on the official dsh.bundle plugin specification.

📌 Background

The official web-search-deepseek plugin hardcodes the Anthropic Messages protocol and appends /messages to all requests, preventing users from connecting to standard REST search engines such as Tavily or SearXNG.

This plugin seamlessly intercepts the search provider in-place, keeping the native Web UI settings card while enabling direct full-URL REST connections without touching any core Harness code.

✨ Highlights

  • 🌐 Direct Full-URL Requests: Requests the exact URL configured by the user, without appending /messages or altering paths.
  • 🧩 Zero Vendor Hardcoding: Completely vendor-agnostic, working out-of-the-box with Tavily, SearXNG, and other REST search endpoints.
  • ⚡ Native Settings Reuse: Integrates directly with the built-in "Web search" settings modal (Base URL and API Key fields).
  • 🔄 Dual-Protocol Adaptive Routing:
    • Messages Protocol: Falls back to official DeepSeek logic when left blank or targeting official endpoints; strips redundant /messages when proxy endpoints already specify it.
    • Search Protocol: Automatically routes standard search endpoints (e.g., Tavily's /search) via standard REST POST requests and maps source results.
  • 🚀 Zero Core Modification: Fully respects Cordis bundle contracts with no core changes required.

📦 Installation

In your DeepSeek Harness directory, run:

# Install directly from GitHub
pnpm dsh plugin --profile web add git+https://github.com/baizhufbb/dsh-custom-search.git

Or install from a local checkout:

git clone https://github.com/baizhufbb/dsh-custom-search.git
pnpm dsh plugin --profile web add ./dsh-custom-search

⚙️ Configuration & Usage

  1. Launch Harness Web interface:
    pnpm dsh web
  2. Navigate to http://127.0.0.1:3080, click Settings ➡️ Plugin configuration ➡️ Web search:
    • Base URL / Endpoint: Enter your full search endpoint (e.g. https://api.tavily.com/search).
    • API Key: Enter your search provider's API key.
  3. Save your settings. Web searches from the agent will now hit your custom search endpoint directly.

🗑️ Uninstallation

To revert to the stock search provider:

pnpm dsh plugin --profile web remove dsh-custom-search

🏷️ GitHub Topics

To help community members discover this plugin in the ecosystem, make sure your GitHub repository includes the dsh-plugin topic tag.

📄 License

MIT

About

Universal full-URL search adapter for DeepSeek Harness | 为 DSH 打造的独立搜索引擎(Tavily/SearXNG 等)全称 URL 直连插件

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages