deepseek-ai/deepseek-harness · error · WebError
WEB_PROVIDER_ERROR
WEB_PROVIDER_ERROR
Error message
DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search
What it means
Error "DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search" thrown in deepseek-ai/deepseek-harness.
Source
Thrown at packages/web/web-search-deepseek/src/provider.ts:151
/**
* Map a DeepSeek Anthropic Messages response to a normalized search result. Walks
* `web_search_tool_result` blocks for citeable `web_search_result` items, joins each to its
* citation excerpt as `snippet`, and dedupes by `url` (a `max_uses > 1` request can surface
* the same URL across searches). The web service owns the final `maxResults` truncation, so
* `truncated` is always `false` here.
*
* @param response - the parsed Messages response body.
* @returns the normalized result with deduped, snippet-joined sources.
* @throws {@link WebError} when native search produced no result block.
*/
export function mapAnthropicResponse(response: AnthropicResponse): WebSearchResult {
const blocks = response.content ?? []
const resultBlocks = blocks.filter(
(block): block is WebSearchToolResultBlock => block.type === 'web_search_tool_result',
)
if (resultBlocks.length === 0) {
throw new WebError(
'DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search',
'WEB_PROVIDER_ERROR',
)
}
const snippets = citationSnippets(blocks)
const seen = new Set<string>()
const sources: WebSearchSource[] = []
for (const block of resultBlocks) {
for (const item of block.content ?? []) {
if (item.type !== 'web_search_result' || item.url.length === 0 || seen.has(item.url)) continue
seen.add(item.url)
const snippet = snippets.get(item.url)
sources.push({
url: item.url,
...item.title != null && item.title.length > 0 ? { title: item.title } : {},
...snippet != null && snippet.length > 0 ? { snippet } : {},
...item.page_age != null && item.page_age.length > 0 ? { publishedAt: item.page_age } : {},View on GitHub (pinned to b150a551b8)
Solutions
- Rephrase the request so DeepSeek triggers native web search, or use a different search provider.
When it happens
Trigger: Thrown at packages/web/web-search-deepseek/src/provider.ts:151 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of deepseek-ai/deepseek-harness@b150a551b8 (2026-08-24).
Data as JSON: /api/errors/e0ed0c2631b571de.
Report an issue: GitHub.