OpenAI-compatible web search provider for the built-in web_search tool: one baseURL/apiKey/model config powers Qwen Token Plan, OpenAI and any Responses API gateway.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:htcqp802/dsh-web-search-openai
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
OpenAI-compatible web search provider for DeepSeek Harness (DSH).
It plugs into the harness ctx.web seam and powers the built-in web_search tool through any gateway that
implements the OpenAI Responses API with the built-in web_search tool.
How it works
Your chat LLM (e.g. deepseek-v4) decides to call the web_search tool; the tool executes through the
ctx.web seam, which routes to the provider configured here (e.g. qwen3.7-plus + your Qwen Token Plan key).
Search and conversation models are fully decoupled — no model switching, no manual steps.
you ──> chat LLM (deepseek-v4, …)
│ decides it needs live info
▼
web_search tool (model-agnostic)
│ ctx.web seam ──> configured provider
▼
this provider: POST {baseURL}/responses
tools: [{ type: "web_search" }]
│
▼
qwen3.7-plus / any compatible model ──> real search results
│
▼
chat LLM answers grounded in the results
Verified configuration
| Field | Value |
|---|---|
baseURL |
https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1 (Qwen Token Plan CN) |
apiKeyEnv |
QWEN_TOKEN_PLAN_CN_API_KEY |
model |
qwen3.7-plus (also qwen3.7-max, qwen3.8-max) |
Why Responses API? Built-in web search on Qwen Token Plan only triggers through the Responses API with an explicit
tools: [{type: "web_search"}]declaration. The Chat Completionsenable_searchflag is silently ignored on that gateway. OpenAI and most OpenAI-compatible gateways expose the same shape.
Installation
Published as an npm package; one command once published:
dsh plugin add dsh-web-search-openai
For a local checkout (development), add it as a profile dependency and bundle:
cd ~/.dsh/profiles/web
pnpm add file:/path/to/dsh-web-search-openai
then add the package name to the dsh.profile.bundles list in profiles/web/package.json
(append it after the shipped bundles) and restart the app. The bundle's cordis.patch.yml
registers the provider and switches the web service's searchProvider to openai-search
— no shipped file is modified.
Configuration
In-GUI configuration card (v0.2+)
Install the plugin and open Settings → Plugins → Plugin config: the
dsh-web-search-openai card edits endpoint, credential reference, model,
maxOutputTokens, and the API key (stored through the credentials service,
never in config or code). Values take effect immediately — no restart needed.
Runtime precedence: UI-managed file ($DSH_HOME/dsh-web-search-openai.json)
web-search-openai:settings section > package defaults.
Configuration
Provider config lives in the web-search-openai settings section (or the plugin row in your composition):
web-search-openai:
baseURL: https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1
apiKeyEnv: QWEN_TOKEN_PLAN_CN_API_KEY
model: qwen3.7-plus
| Key | Default | Meaning |
|---|---|---|
apiKey |
unset | Literal API key (prefer apiKeyEnv; secrets never enter config). |
apiKeyEnv |
QWEN_TOKEN_PLAN_CN_API_KEY |
Credential reference resolved per search via the ctx.credentials seam, falling back to the launching environment. |
baseURL |
Qwen Token Plan CN | OpenAI-compatible base URL (no trailing /); /responses is appended. |
model |
qwen3.7-plus |
Any model exposing the web_search tool on your gateway. |
maxOutputTokens |
1024 |
Generated-token cap for one search call (the search itself is not truncated). |
API keys
Store the key through the standard harness credential paths — the Web Models settings page,
~/.dsh/.credentials.yaml, or the launching environment — under your apiKeyEnv name.
Billing notes
Each web_search call is a full model turn on the search gateway (reasoning + tool use + grounded answer,
roughly 3–4k tokens). On Qwen Token Plan, the built-in tools are billed per successful call and deducted
from your plan Credits. The chat model's tokens are billed separately.
Smoke test
cd dsh-web-search-openai
npm install
QWEN_TOKEN_PLAN_CN_API_KEY=sk-... node scripts/smoke.mjs "2025年诺贝尔物理学奖得主是谁?"
Plugin surface
- Registers a search provider (
id: openai-search) onctx.webviaregisterSearchProvider. - Registers no model-facing tools of its own; the shipped
web_searchtool stays the only entry point. - Response mapping is strict: a response without a
web_search_callblock fails withWEB_PROVIDER_ERRORinstead of scraping prose. Sources are deduped by URL;url_citationannotations add titles when present. - Error codes follow the seam vocabulary:
WEB_PROVIDER_CREDENTIAL_MISSING,WEB_PROVIDER_ERROR,WEB_ABORTED.
Development / publishing
npm install
node scripts/smoke.mjs # requires a key in the environment
npm publish # after bumping version
MIT licensed. Fork, adapt, and swap baseURL/apiKeyEnv/model to point at any compatible gateway.
Links
More in this category
Tencent/BrowserSkill#dsh-plugin-browserskill★ 10834
BrowserSkill bridge for controlling visible Chrome and Edge Agent Windows from DeepSeek Harness, with native browser tools, accessibility and VOM observations, screenshots, owned multi-session control, and a live Web UI overlay.
DDDMUC/dsh-free-search★ 1831
Free web search for DSH with 42 engines: 6 keyless (DuckDuckGo, Bing, SearXNG, Degoog, AnySearch), 6 key-or-keyless tiers (Exa, Tavily, Keenable, Firecrawl, Parallel, You.com), 5 HTML search pages, and keyed providers from Brave and Baidu to Zhihu, OpenAI and Claude. Failure-classified failover with cooldown and key rotation, allowlist switching, an editable fallback chain, zh/en language pools, Multi concurrent merge, 12 MCP tools and a standalone stdio server, with per-engine keys in settings.
omdsh-dev/dsh-browser#packages/browser/bridge-browser★ 1162
Chrome sidebar extension that lets DSH operate your browser directly, no vision capabilities required.
liustack/modsearch★ 1060
Web search bridge for text-only agents: ask the web or X, get structured JSON evidence (search, fetch, citations).
Fisfzy/dsh-ego-browser★ 594
Drive a real Chrome/Chromium browser from DeepSeek Harness with 35 structured tools for navigation, snapshots, clicks, forms, JavaScript/CDP, screenshots, downloads and tabs; a live sidebar mirrors the page and accepts mouse and keyboard input. It ships a managed CDP runtime, keeps login state across calls, and can import cookies from your everyday Chrome through a companion extension.
regrevia/Envoy#dsh-envoy★ 315
Distill any link into Markdown, a wiki or a knowledge base. Installs per host: DSH -> envoy-dsh; Claude Code/Codex -> envoy@envoy. Douyin/Bilibili video, image posts, WeChat, Xiaohongshu, PDFs, podcasts. Video is read on its own timeline with keyframes and ASR transcripts locatable to \[mm:ss], so the context carries what was said and shown instead of the title and the recommendation rail. On 60 turns with vs without: ends normally with the gaps named 22% -> 92%, times out 68% -> 0% (the A/B is exploratory: different time caps, no human correctness review). On 123 live links 80% came back usable (93% of the pages that answered).
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.