{"record":{"id":"e0ed0c2631b571de","repo":"deepseek-ai/deepseek-harness","slug":"web-provider-error-e0ed0c","errorCode":"WEB_PROVIDER_ERROR","errorMessage":"DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search","messagePattern":"DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search","errorType":"exception","errorClass":"WebError","httpStatus":null,"severity":"error","filePath":"packages/web/web-search-deepseek/src/provider.ts","lineNumber":151,"sourceCode":"\n/**\n * Map a DeepSeek Anthropic Messages response to a normalized search result. Walks\n * `web_search_tool_result` blocks for citeable `web_search_result` items, joins each to its\n * citation excerpt as `snippet`, and dedupes by `url` (a `max_uses > 1` request can surface\n * the same URL across searches). The web service owns the final `maxResults` truncation, so\n * `truncated` is always `false` here.\n *\n * @param response - the parsed Messages response body.\n * @returns the normalized result with deduped, snippet-joined sources.\n * @throws {@link WebError} when native search produced no result block.\n */\nexport function mapAnthropicResponse(response: AnthropicResponse): WebSearchResult {\n  const blocks = response.content ?? []\n  const resultBlocks = blocks.filter(\n    (block): block is WebSearchToolResultBlock => block.type === 'web_search_tool_result',\n  )\n  if (resultBlocks.length === 0) {\n    throw new WebError(\n      'DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search',\n      'WEB_PROVIDER_ERROR',\n    )\n  }\n\n  const snippets = citationSnippets(blocks)\n  const seen = new Set<string>()\n  const sources: WebSearchSource[] = []\n  for (const block of resultBlocks) {\n    for (const item of block.content ?? []) {\n      if (item.type !== 'web_search_result' || item.url.length === 0 || seen.has(item.url)) continue\n      seen.add(item.url)\n      const snippet = snippets.get(item.url)\n      sources.push({\n        url: item.url,\n        ...item.title != null && item.title.length > 0 ? { title: item.title } : {},\n        ...snippet != null && snippet.length > 0 ? { snippet } : {},\n        ...item.page_age != null && item.page_age.length > 0 ? { publishedAt: item.page_age } : {},","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/web-search-deepseek/src/provider.ts#L133-L169","documentation":"Error \"DeepSeek returned no web_search_tool_result blocks; the request may not have triggered native web search\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/web-search-deepseek/src/provider.ts:151 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rephrase the request so DeepSeek triggers native web search, or use a different search provider."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}