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

@kamitobi/dsh-multi-search

v0.2.3

Published

Community plugin — NOT affiliated with DeepSeek AI. Extensible multi-provider web search for DSH — built-in DashScope and MiMo, easy to add more.

Downloads

1,846

Readme

@kamitobi/dsh-multi-search

npm version license dsh-plugin

⚠️ 声明:这是一个社区插件,与 DeepSeek AI 无关、未获其认可或维护。官方项目请见 deepseek-ai/deepseek-harness

English · 中文


在 DeepSeek Harness 中使用 DashScope、MiMo、MiniMax、智谱或任何第三方搜索 API。

DSH 内置的 web_search 工具只能使用 DeepSeek 的专有搜索 API。本插件将其替换为一个即插即用的适配器,支持 DashScope(阿里云百炼)小米 MiMoMiniMax智谱 AI(GLM) 或你自行开发的搜索后端 — 让你的 Agent 用已有的 API 联网搜索。

为什么需要这个插件?

DSH 内置的搜索提供商(deepseek-official)有以下限制:

  1. 使用 Anthropic Messages 协议,不是 OpenAI Chat Completions。
  2. 需要 付费 DeepSeek API Key,请求走 DeepSeek 服务器。
  3. 不支持本地模型或其他替代提供商。

如果你用的是 DashScope 上的 Qwen 模型小米 MiMoMiniMax智谱 GLM,或其他支持搜索的提供商,内置搜索对你来说毫无用处。dsh-multi-search 解决了这个问题。

安装

dsh plugin --profile web add @kamitobi/dsh-multi-search

配置

运行交互式配置向导:

npx -p @kamitobi/dsh-multi-search dsh-multi-search-setup

向导会:

  • 自动检测你的 DSH profiles
  • 让你选择搜索提供商(MiMo / DashScope / MiniMax / 智谱)
  • 提示输入 API Key(直接粘贴或输入环境变量名)
  • 可选设置自定义 API 端点
  • 将配置写入 profile 的 cordis.patch.yml

如果使用了环境变量,确保在 ~/.bashrc~/.zshrc 中导出:

# 根据你选择的提供商,导出对应的 API Key 环境变量
export XIAOMI_API_KEY='你的 API Key'       # MiMo
# export DASHSCOPE_API_KEY='你的 API Key'  # DashScope
# export MINIMAX_API_KEY='你的 API Key'    # MiniMax
# export ZHIPU_API_KEY='你的 API Key'      # 智谱

然后重启 DSH:

dsh web

修改配置

要更换提供商、修改 API Key 或其他设置,重新运行向导即可:

npx -p @kamitobi/dsh-multi-search dsh-multi-search-setup

向导会显示当前配置,确认后即可修改。

直接编辑 ~/.dsh/profiles/web/cordis.patch.yml

- id: multi-search
  config:
    activeProvider: mimo
    mimo:
      apiKeyEnv: 'XIAOMI_API_KEY'
      model: 'mimo-v2.5'
    # dashscope / minimax / zhipu 配置类似,只需更改 activeProvider 和对应的子配置

- id: web
  config:
    searchProvider: multi-search

然后导出环境变量,重启 DSH。

配置说明

API Key — 二选一

| 方式 | 配置 | 说明 | |------|------|------| | 环境变量(推荐) | apiKeyEnv: 'MY_KEY' | Key 留在 shell 中,不写入 YAML | | 直接填写 | apiKey: 'sk-xxx' | 更简单,但明文存储 |

提供商选项

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | activeProvider | string | mimo | mimo / dashscope / minimax / zhipu | | model | string | 提供商默认 | 模型标识符 | | baseURL | string | 提供商默认 | 自定义 API 端点 | | maxResults | number | 5 | 最大搜索结果数 |

DashScope 专属

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | forceSearch | boolean | false | 强制搜索 | | searchStrategy | string | max | turbo / max / agent |

MiMo 专属

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | forceSearch | boolean | true | 强制搜索 | | maxKeyword | number | 3 | 每轮最大关键词数 |

MiniMax 专属

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | forceSearch | boolean | true | 强制搜索 |

智谱专属

| 字段 | 类型 | 默认值 | 说明 | |------|------|--------|------| | searchQuery | string | '' | 强制搜索关键词(为空则由模型决定) |

添加新搜索提供商

插件采用 Provider 注册表 模式,添加新搜索后端只需 ~20 行代码:

// src/providers/tavily.ts
import type { WebSearchProvider, WebSearchRequest, WebSearchResult } from '@deepseek-ai/dsh-web'
import type { BaseProviderConfig } from '../types.js'

export class TavilySearchProvider implements WebSearchProvider {
  readonly id = 'multi-search'
  constructor(private readonly config: BaseProviderConfig) {}

  available(): boolean {
    return Boolean(this.config.apiKey)
  }

  async search(request: WebSearchRequest, signal?: AbortSignal): Promise<WebSearchResult> {
    // 调用你的搜索 API,返回 { content, sources, truncated }
    throw new Error('Not implemented')
  }
}

然后在 src/index.ts 中注册:

import { TavilySearchProvider } from './providers/tavily.js'

registerProvider('tavily', {
  create: (config) => new TavilySearchProvider(config),
})

参考内置的 DashScopeMiMoMiniMax智谱 实现。

工作原理

Agent 调用 web_search("查询")
        │
        ▼
   DSH web seam (ctx.web)
        │
        ▼
   dsh-multi-search 插件  ← 替换 deepseek-official
        │
   ┌────┼────┬────────┬──────┐
   │    │    │        │      │
DashScope MiMo MiniMax 智谱  社区扩展

插件覆盖了 DSH 的 searchProvider 配置,指向自己的提供商 — web_search 工具名不变,但请求走的是你配置的第三方 API,而不是 DeepSeek 的。

常见问题

| 问题 | 解决方案 | |------|----------| | "Provider not available (missing API key)" | 在配置中设置 apiKey,或设置 apiKeyEnv + 导出环境变量 | | 搜索返回空结果 | 尝试 forceSearch: true;检查模型是否支持 enable_search / web_search / web_search_20250305 | | "Multiple usable web providers" | 确保 web seam 配置中设置了 searchProvider: multi-search(插件会自动处理) |

许可证

MIT

致谢