Skip to content

feat: search the web and read pages with DeepSeek where a deployment names it - #293

Open
bencode wants to merge 1 commit into
mainfrom
feat/deepseek-search
Open

bencode wants to merge 1 commit into
mainfrom
feat/deepseek-search

Conversation

@bencode

@bencode bencode commented Nov 2, 2026

Copy link
Copy Markdown
Owner

What

A deployment can switch web search to DeepSeek's Search & Fetch tools:

GAMMA_SEARCH_PROVIDER=deepseek   → search and page reading use DeepSeek, with DEEPSEEK_API_KEY
GAMMA_SEARCH_PROVIDER unset      → Tavily when TAVILY_API_KEY is set, as before

The public deployment already sets DEEPSEEK_API_KEY for chat, so the provider is named explicitly rather than inferred from the key; it stays on Tavily.

How

  • web-search/provider.ts: the Tavily client becomes a shared serviceClient; deepseekSearch and deepseekExtract sit beside the Tavily pair. A hit's snippet is DeepSeek's model-oriented summary, falling back to snippet; date becomes published. A query is cut to DeepSeek's 128-character limit instead of being refused. Both extractors share the title trimming and the size cap.
  • main.ts: picks the services from GAMMA_SEARCH_PROVIDER; an unknown value, or deepseek without a key, stops the server at start.
  • GAMMA_SEARCH_PROXY now applies to Tavily only; DeepSeek is reached directly.
  • compose.production.yml forwards GAMMA_SEARCH_PROVIDER; docs/self-hosting.md and the README describe it.

Checked

  • pnpm check: Biome, TypeScript and all unit tests pass. Two web integration tests failed once under the full parallel run; test:integration alone passes 85/85, and this branch touches no web code.
  • Against the live API: a Chinese query returned hits with summaries; Fetch read github.com/bencode as Markdown, and answered 404 for a page it could not reach, which surfaces as the route's usual 502.

GAMMA_SEARCH_PROVIDER=deepseek uses DeepSeek's Search and Fetch tools with
DEEPSEEK_API_KEY. Unset, search stays on Tavily as before.
This was referenced Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant