Back to home@k12u

dsh-web-search-xai

No description

Stars
0
Language
JavaScript
Created
Aug 24, 2026
Updated
Aug 24, 2026

Introduction

dsh-web-search-xai

xAI-backed WebSearchProvider for the DeepSeek Harness web seam (ctx.web).

It does not register a model-facing tool. The conversation model keeps calling dsh-tool-web's web_search. This package only supplies the backend: an auxiliary xAI Responses request with the native server-side web_search tool, then maps citations into the seam's WebSearchResult.

This is the same shape as @deepseek-ai/dsh-web-search-deepseek, not “put xAI web_search on the conversation turn”.

Install (this profile)

dsh plugin --profile web add /absolute/path/to/dsh-web-search-xai

Then insert the plugin and select it in the profile cordis.patch.yml:

- id: web
  config:
    searchProvider: xai

- insert:
    - id: web-search-xai
      name: dsh-web-search-xai
      config:
        apiKeyEnv: XAI_CUSTOM_API_KEY
        model: grok-4.6

Restart the existing DSH process. A second server does not update the current GUI.

Config

KeyDefaultMeaning
apiKeyomittedLiteral key. Prefer apiKeyEnv.
apiKeyEnvXAI_API_KEYCredential reference resolved per search through ctx.credentials, else the launch environment.
baseURLhttps://api.x.ai/v1Responses API base; /responses is appended. $XAI_SEARCH_BASE_URL is the env fallback.
modelgrok-4.6Auxiliary search model.
maxOutputTokens2048max_output_tokens for the auxiliary request.
allowedDomainsunsetAt most 5 domains. Cannot be combined with excludedDomains.
excludedDomainsunsetAt most 5 domains.
enableImageUnderstandingfalseForwards enable_image_understanding to xAI.

This out-of-tree plugin keeps zero @deepseek-ai/* imports so a link: install can load from the workspace. Change model or key via the profile cordis.patch.yml and restart.

Mapping

  • content ← Responses output_text / message text
  • sources[] ← top-level citations, url_citation annotations, and any structured sources/results on web-search output items
  • Absence of native-search evidence (citations, a web_search* output item, or server_side_tool_usage) is WEB_PROVIDER_ERROR

One search costs a full xAI model turn.