Introduction

In DSH, model-oriented web_search usually enters ctx.web.search() from dsh-tool-web and lands on a registered search provider. The published web-search-deepseek provider only handles the Anthropic-compatible /messages API and web_search_20250305.

If your custom model uses the OpenAI Responses endpoint, and that endpoint natively supports built-in web_search, standard configuration alone cannot route DSH’s search requests to this endpoint. dsh-web-search-responses is a DSH ctx.web search provider provided for this scenario.

What is it

dsh-web-search-responses is a DSH plugin maintained by herminger and is licensed under the MIT License.

It registers a search provider named responses-web, allowing ctx.web.search() to reuse the Responses API endpoint used by the current session model and send built-in web_search requests.

Core Capabilities

Below are the main capabilities verified for this plugin:

  • Registers the responses-web provider to send web_search requests to the Responses API endpoint used by the session model.
  • Uses tools and tool_choice with type: "web_search".
  • Parses the web_search_call item and message references in the response and converts them back to the standard DSH WebSearchResult.
  • Automatically follows the current model/route by default, or can be explicitly pinned to the llm-pi-ai route.
  • Supports configuring provider, model, baseURL, apiKeyEnv, includeSources, searchContextSize, toolChoice, and maxOutputTokens.

Installation and Activation

Installing from GitHub

Installing from GitHub recommends having pnpm available in your PATH. First, ensure pnpm is available, then run:

dsh plugin --profile web add github:herminger/dsh-web-search-responses

If you previously installed a local linked copy and want to switch to the GitHub source, first remove the old installation, then run the GitHub installation:

dsh plugin --profile web remove dsh-web-search-responses
dsh plugin --profile web add github:herminger/dsh-web-search-responses

Installing from a Local Checkout

If you already have a local checkout, you can add the local path directly:

dsh plugin --profile web add /path/to/dsh-web-search-responses

If you don’t have pnpm, you can also use patch for quick testing. overlay.patch.yml needs to be in the same directory as index.mjs, or use an absolute path:

dsh --profile web --patch /path/to/overlay.patch.yml

After installing or changing, completely restart dsh web for the new bundle to take effect.

Typical Usage

By default, this provider automatically follows the current model:

  • provider and model can come from the executing agent, DSH’s default model, or the uniquely configured llm-pi-ai Responses route.
  • baseURL and apiKeyEnv can come from that route’s llm-pi-ai settings.

To explicitly pin the route, you can edit the profile’s cordis.patch.yml and pin the provider with id: web-search-responses to cpa:

- id: web-search-responses
  config:
    provider: cpa

Common configuration options are as follows:

Field Description Default Value
provider The llm-pi-ai route to reuse Current model route
model Model used for the search request Current model
baseURL Prefix for the Responses endpoint, automatically appending /responses Route baseURL
apiKeyEnv Credential reference, e.g., CPA_API_KEY Route apiKeyEnv
includeSources Whether to send include: ["web_search_call.action.sources"] false
searchContextSize low / medium / high Not set
toolChoice { type: "web_search" } or "required" { type: "web_search" }
maxOutputTokens Upper limit on output tokens for the search request 4096

Troubleshooting

  • configured web provider "responses-web" is registered but unavailable: Usually caused by the plugin config being parsed as YAML null, such as an empty config:. Update to the latest index.mjs, which normalizes config ?? {}, then restart DSH.
  • Responses API returned no web_search_call item: Indicates that the endpoint/model actually does not support the built-in web_search tool.
  • no API key for "...": Check the route’s apiKeyEnv and the credentials saved in DSH.

Use Cases and Notes

This plugin is suitable for scenarios where the session model’s Responses endpoint already supports built-in web_search. Through it, DSH’s ctx.web search requests can directly reuse the endpoint used by the current session model, without relying on Anthropic Messages-compatible search providers.

It is recommended to check the source code and the MIT license before installing. The plugin runs with the permissions of the current dsh process. When involving API keys, routes, models, and network requests, ensure these configurations meet expectations.

References

GitHub Repository: https://github.com/herminger/dsh-web-search-responses

The index page can be found by searching for the plugin name dsh-web-search-responses.