RailgunHamster/dsh-web-search ↗★ 0

dsh-web-search

多源网页搜索服务提供商路由插件 适合需要灵活切换 OpenAI 或 DeepSeek 原生搜索后端的用户。

套件
dsh-web-search
相容性
待驗證
Harness 依賴範圍
*
Cordis 依賴範圍
*
版本
0.4.0
最近更新
2026年9月29日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:RailgunHamster/dsh-web-search

Configuration

The web-search entry's config accepts:

KeyDefaultMeaning
provideropenai-responsesSelected backend
responsesApiKeyEnvOPENAI_API_KEYCredential / env name for Responses search
responsesBaseURLhttps://api.openai.com/v1Responses API base URL
responsesModelgpt-4oModel that exposes tools: [{ type: "web_search" }]
responsesMaxTokens1024max_output_tokens for Responses search
deepseekApiKeyEnvDEEPSEEK_API_KEYCredential / env name for DeepSeek search
deepseekBaseURLhttps://api.deepseek.com/anthropic/v1DeepSeek Anthropic-compatible base URL
deepseekModeldeepseek-v4-flashDeepSeek search model
deepseekApiVersion2023-06-01anthropic-version header
deepseekMaxTokens4096DeepSeek max_tokens
deepseekMaxUses5DeepSeek web_search max_uses

Provide keys through DSH credentials or the launching environment. Do not put real keys in Git, cordis.patch.yml, or this README.

Example entry in the profile's cordis.patch.yml:

- id: web-search
  config:
    provider: openai-responses
    responsesApiKeyEnv: OPENAI_API_KEY
    responsesBaseURL: https://api.openai.com/v1
    responsesModel: gpt-4o

Switching provider in the settings form saves immediately and applies to later web_search calls. A DSH restart is not required for that switch. The other fields are ordinary config: change them in cordis.patch.yml, and DSH re-applies the plugin.

On its first boot DSH 0.1.7+ imports a legacy settings.yaml web-search: section into this entry, provided 0.4.0 is already installed then. If that boot ran with 0.3.x, the selection stays in settings.yaml.imported; set provider on the entry above.

配置

web-search 条目的配置支持:

字段默认值含义
provideropenai-responses当前 backend
responsesApiKeyEnvOPENAI_API_KEYResponses 搜索使用的凭据 / 环境变量名
responsesBaseURLhttps://api.openai.com/v1Responses API 根地址
responsesModelgpt-4o支持 tools: [{ type: "web_search" }] 的模型
responsesMaxTokens1024Responses 搜索的 max_output_tokens
deepseekApiKeyEnvDEEPSEEK_API_KEYDeepSeek 搜索使用的凭据 / 环境变量名
deepseekBaseURLhttps://api.deepseek.com/anthropic/v1DeepSeek Anthropic 兼容根地址
deepseekModeldeepseek-v4-flashDeepSeek 搜索模型
deepseekApiVersion2023-06-01anthropic-version 请求头
deepseekMaxTokens4096DeepSeek max_tokens
deepseekMaxUses5DeepSeek web_search 的 max_uses

密钥只能放在 DSH credentials 或启动环境里,不要写入 Git、cordis.patch.yml 或本文。

profile cordis.patch.yml 条目示例:

- id: web-search
  config:
    provider: openai-responses
    responsesApiKeyEnv: OPENAI_API_KEY
    responsesBaseURL: https://api.openai.com/v1
    responsesModel: gpt-4o

在设置表单里切换 provider 会立刻保存,并作用于之后的 web_search,不必为了切换而重启 DSH。其余字段是普通配置:改 cordis.patch.yml,DSH 会重新应用插件。

DSH 0.1.7+ 首次启动时会把旧 settings.yaml 的 web-search: 段导入这个条目,前提是那时已装好 0.4.0。如果首次启动时装的还是 0.3.x,选择只留在 settings.yaml.imported 里,需要在上面的条目里手动设置 provider。