SeaViod/dsh-plugin-deepsearch ↗★ 0

dsh-plugin-deepsearch

Switch DSH's built-in web_search between the DeepSeek Search API (/v1/tools/search) and the default account search, with live fallback, a settings page and a sidebar switch. 适合需要灵活切换、配置DeepSeek搜索源并提供自动降级的用户。

패키지
dsh-plugin-deepsearch
호환성
미검증
버전
0.2.0
라이선스
MIT
최근 업데이트
2026. 10. 17.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:SeaViod/dsh-plugin-deepsearch

Configuration

Configuration is read from the config block of the plugin's entry in the profile patch, and is normalized so that invalid values fall back to the defaults instead of throwing:

- insert:
    - id: deepsearch
      name: dsh-plugin-deepsearch
      config:
        apiKeyEnv: DEEPSEEK_API_KEY
        count: 8
        retryCount: 1

All keys are optional. The table below matches the host config schema; the config block is also what a bundle install can carry.

KeyDefaultNormalisation / meaning
apiKey''API key given inline. String, trimmed; empty means "unset". Not recommended: it stays in the patch file. Never echoed back by any route.
apiKeyEnv'DEEPSEEK_API_KEY'Name of the credentials reference / environment variable to resolve. Must match /^[A-Za-z_][A-Za-z0-9_]*$/, otherwise the default is used.
baseURL'https://api.deepseek.com'API base URL. Trimmed; must parse as an http(s) URL; trailing slashes are stripped.
searchPath'/v1/tools/search'Search endpoint path (appended to baseURL). Trimmed, forced to start with /; a ? or # rejects the value; empty falls back to the default.
fetchPath'/v1/tools/fetch'Page-fetch endpoint path (same rules as searchPath).
keyFile''Key file for the file-based key. '' means $DSH_HOME/deepsearch-key.txt; ~/... expands to the home directory; a relative path resolves under $DSH_HOME; anything else is used as an absolute path.
count8Number of search results. Integer, clamped to 1..50.
needContentfalseAsk the search API for page content (direct deepsearch search calls only). Only a strict true enables it.
timeoutMs30000Timeout per HTTP attempt. Integer, clamped to 1000..120000.
retryCount1Extra attempts after the first one (on 408/429/5xx). Integer, clamped to 0..3.
retryDelayMs1200Delay between retry attempts. Integer, clamped to 100..10000.
maxFetchChars20000Maximum characters returned by fetch/the search tool when content is requested. Integer, clamped to 1000..200000.
providerId'deepseek-search-api'Search provider id to register. Must match /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/ and must not collide with an existing provider, except for the plugin's own re-registration.
fallbackProvider''Preferred fallback provider id used when switching OFF. Empty means auto-detect (the previously active provider, then the first available provider that is not ours).
fallbackOnErrortrueWhen the Search API call fails, fall back to another provider. Only a strict true enables it.
language'auto'auto / en / zh. auto resolves from DSH_LANGUAGE, DSH_LOCALE, LANG, LC_ALL (Chinese locales map to zh, everything else to en).
checkQuery'DeepSeek'Query used by the "test endpoint" button. Trimmed, non-empty, at most 128 characters.

The normalized config is exposed read-only through the plugin status (and the deepsearch tool's status action) without apiKey. The key itself is never part of diagnostics, logs or any response body.