dsh-brave-search
A Brave Search provider for DeepSeek Harness.
One backend, one job: send the query to Brave's Web Search API and hand the
results back through ctx.web. No settings card, no multi-backend fan-out, no
state. If you have ever wanted web_search to just be Brave, this is that.
- Single
fetchtohttps://api.search.brave.com/res/v1/web/search - Key resolved from the credential service, then
$DSH_HOME/.credentials.yaml, then the environment - Honors
maxResultsand the harness'srecencyfilter; caps at Brave'scount=20 - Clear failures: missing key, non-2xx, and the 429 free-tier ceiling
Requirements
- DeepSeek Harness with the
webservice (any profile that mounts@deepseek-ai/dsh-web) - A Brave Search API key — free tier is 2,000 queries/month: https://api-dashboard.search.brave.com/
Install
dsh plugin --profile web add github:BuffMcBigHuge/dsh-brave-search
The package ships its own bundle patch, so the provider is mounted automatically.
Point web_search at it
Add this to your profile patch ($DSH_HOME/profiles/<profile>/cordis.patch.yml):
- id: web
name: "@deepseek-ai/dsh-web"
config:
searchProvider: brave
Careful: a patch entry's
configreplaces the entry's config object rather than merging into it. If your profile already setsfetchProvider(or anything else onweb), repeat it in the same block — omitting it drops the setting and you will getmultiple usable web providers are registered.
Store the key
Through the credential store, by hand:
# $DSH_HOME/.credentials.yaml
version: 1
refs:
BRAVE_API_KEY: your-key-here
Keep that file at chmod 600 — the credential provider refuses to load a
document readable beyond its owner. An environment variable works too:
BRAVE_API_KEY=… dsh web
Verify
Ask for a search. No telemetry line is printed; the results themselves are the
signal. A misconfigured key surfaces as brave: HTTP 401, and a missing one as
brave: no BRAVE_API_KEY found — ….
How it differs from a multi-backend plugin
It registers exactly one provider (brave), so provider selection is
unambiguous once searchProvider is set. There is no fallback: if Brave is
down or rate-limited, the search fails rather than silently answering from
another engine.
Development
node --test test/
License
MIT
No comments yet. Be the first to write one.