Skip to content

dsh-web-search-tinyfish

Verified

@ownweb-me/dsh-web-search-tinyfish Β· v0.1.3

pnpm: `@ownweb-me/dsh-web-search-tinyfish`

Install

dsh plugin add @ownweb-me/dsh-web-search-tinyfish

Confirm the layer applied with dsh --profile default --dump-config β€” see the install guide.

Source

Published to npm without a public repository. Inspect the package contents before installing.

Readme

dsh-web-search-tinyfish

pnpm: @ownweb-me/dsh-web-search-tinyfish

Registers the tinyfish search provider on the shared web capability seam (ctx.web), backed by the TinyFish Search API. It declares no tools β€” the model-facing web_search tool is owned by @deepseek-ai/dsh-tool-web and routes to whichever provider the seam selects. The search and fetch registries are separate, so it can be active alongside dsh-web-fetch-tinyfish.

Selection

dsh-base pins the built-in search backend (searchProvider: deepseek-official), and a web row in a patch replaces the whole row config. Route web_search to TinyFish with:

- id: web
  config:
    searchProvider: tinyfish

or

export DSH_WEB_SEARCH_PROVIDER=tinyfish

Without a pin, exactly one usable provider must be registered for search (auto-select); several usable providers without a pin fail with WEB_PROVIDER_AMBIGUOUS. If you've disabled the built-in provider rows in your profile layer (web-search-deepseek), any search provider without a registered/selected provider fails with WEB_PROVIDER_UNAVAILABLE.

Credentials

Resolved per call β€” the first source with a value wins:

Priority Source
1 tinyfishApiKey literal config field (this plugin)
2 TINYFISH_API_KEY in the launching environment
3 refs.TINYFISH_API_KEY in the dsh credential store (~/.dsh/.credentials.yaml)
4 TINYFISH_API_KEY in the project .env / ~/.dsh/.env

The env-var name is renamable via tinyfishApiKeyEnv. The store file holds refs under refs: keyed by environment-variable name:

# ~/.dsh/.credentials.yaml (must be owner-readable only: chmod 600)
version: 1
refs:
  TINYFISH_API_KEY: sk-tinyfish-...

The store watches the file, so edits (including rotations and removals) take effect on the very next request β€” no restart, no config edit. A provider with no resolvable key is unavailable, and a pinned selection then fails with WEB_PROVIDER_CREDENTIAL_MISSING. Restate the entire config when overriding (patches replace, they do not merge):

- id: dsh-web-search-tinyfish
  config:
    tinyfishApiKey: '...'         # optional literal key; wins over the store
    tinyfishApiKeyEnv: TINYFISH_API_KEY

Run from source

The plugin resolves its @deepseek-ai/* imports from its own node_modules, so install first:

pnpm install
pnpm dsh web --patch ./cordis.yml

(The overlay uses an absolute path into this checkout; adjust if you move it. Note: the loader transpiles TS in strip-only mode β€” erasable syntax only, no parameter properties or enums.)

Install from npm

The package is published to the public npm registry, so no local registry or .npmrc is needed β€” the default registry is npmjs:

dsh plugin --profile demo add @ownweb-me/dsh-web-search-tinyfish
dsh --profile demo --dump-config     # shows the "# == dsh-web-*" layers

Unlike add ., a registry install also installs the package's own dependencies, and the tarball ships prebuilt JS (the prepare script runs at publish time; main points at the emitted .js), so no build step runs in the profile.

Install as a bundle

(Or install this local checkout as a bundle instead of the registry package:)

dsh plugin --profile demo add .
pnpm install     # add . doesn't install the package's dependencies
dsh --profile demo --dump-config     # shows the "# == dsh-web-*" layers

For git/path installs of this TypeScript package, pnpm runs the prepare script (esbuild) on install; if pnpm blocks the build, allowlist it in the profile's pnpm-workspace.yaml allowBuilds.

Either way, add the web row override to the profile's cordis.patch.yml (see "Selection").

Errors

All failures are WebErrors with machine-routable codes: WEB_PROVIDER_CREDENTIAL_MISSING (no key), WEB_PROVIDER_ERROR (provider HTTP/transport failure; TinyFish per-URL errors include the error code and, when present, the upstream HTTP status), WEB_ABORTED (cancellation).

Verification

TINYFISH_API_KEY=tf-fake pnpm dsh web --patch ./cordis.yml

Expect the [dsh-web-search-tinyfish] registration line; a real web_search then reaches TinyFish (an invalid fake key β†’ WEB_PROVIDER_ERROR wrapping the upstream HTTP error).