Skip to content

feat(ai): web search falls back to DuckDuckGo - #3900

Merged
dan-petty merged 3 commits into
mainfrom
feat/3876-ddg-search-fallback
Nov 7, 2026
Merged

dan-petty merged 3 commits into
mainfrom
feat/3876-ddg-search-fallback

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

When a Firecrawl search fails (HTTP 402, 429 or 5xx, no answer, or a reply with no results list), the same call now searches DuckDuckGo and returns results in the form of Firecrawl results. A search that Firecrawl answered is not repeated. The Service logged 7 searches in 24 hours that failed with HTTP 402, and the alternatives check and the refine investigation then ran without web results. The package ddgs builds the request and reads the page. The request goes through the HTTP entry point at the public level, because the client of ddgs takes no transport. The new counter devops_cli_web_search_fallbacks_total tells the backend; devops_cli_firecrawl_searches_total keeps its meaning.

Closes #3876

Change: openspec/changes/archive/2026-11-07-3876-web-search-falls-back-to-duckduckgo/

@dan-petty dan-petty added type/feature Type feature: a new function scope/ai AI review pipeline, personas, prompts, LLM client, or RAG labels Nov 7, 2026
@dan-petty

Copy link
Copy Markdown
Owner Author

Checks run on this branch before the push:

  • Full uv run devops ci (before the rebase onto origin/main): all 25 checks passed, also the known host failures. The test row took 10m 6s on a busy shared host, over the 5 minute budget (fix(ci): the pytest step of devops ci exceeds the 5-minute budget #3593).
  • After the rebase: uv lock --check, tests/ai/test_common_tools.py and tests/telemetry/test_telemetry_instruments.py pass.
  • New tests in tests/ai/test_common_tools.py use the shared HTTP fake: HTTP 402 falls back and returns Firecrawl form; a Firecrawl answer (also no result) runs no fallback; both backends fail and raise; the result limit; no key or query in the log. tests/http/test_http_egress.py holds the new caller duckduckgo at the public level.
  • Real-system probe on 2026-11-07: ddgs 9.16.1 returned results for a live query, and a plain POST with the devops-cli User-Agent to https://html.duckduckgo.com/html/ returned HTTP 200 with result blocks.

Not done and not run: a live search through the Service image in the cluster.

@dan-petty
dan-petty marked this pull request as ready for review November 7, 2026 04:28
@dan-petty
dan-petty merged commit 61b5c43 into main Nov 7, 2026
24 checks passed
@dan-petty
dan-petty deleted the feat/3876-ddg-search-fallback branch November 7, 2026 04:29
dan-petty pushed a commit that referenced this pull request Nov 7, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.77.0](v0.76.2...v0.77.0)
(2026-11-07)


### Features

* **ai:** web search falls back to DuckDuckGo
([#3900](#3900))
([61b5c43](61b5c43))
* **k8s:** add warnings and errors above logs, narrow both by pod
([#3886](#3886))
([6d105c2](6d105c2))
* **k8s:** Name one chat model for every slot of the Service
([#3891](#3891))
([4189c93](4189c93))
* **rag:** index managed repos and exclude private from search
([#3895](#3895))
([3cd4eba](3cd4eba)),
closes [#1389](#1389)


### Bug Fixes

* **roadmap:** name the reason of a failed intake write
([#3879](#3879))
([a341524](a341524))
* **roadmap:** reset a head that the agent moved
([#3883](#3883))
([0ff477f](0ff477f)),
closes [#3575](#3575)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: dan-petty-release[bot] <346998822+dan-petty-release[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope/ai AI review pipeline, personas, prompts, LLM client, or RAG type/feature Type feature: a new function

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ai): web search falls back to DuckDuckGo after Firecrawl

1 participant