SearXNG search hard-pins `language=en`, which makes Bing return unrelated results for non-English queries — Deep Research reports then consist of random pages
Prerequisites
- I searched open issues and discussions and did not find an existing report of this bug.
- This is not a security vulnerability. (Vulnerabilities go to GitHub Security Advisories — see SECURITY.md.)
- I am running the latest code from the
devbranch (the default branch you get on clone, where fixes land first) and the bug still reproduces there. Pleasegit pullthe latestdevbefore filing.
Odysseus Revision
451900fc1515 (2026-08-25)
Install Method
Docker (docker compose up)
Operating System
Linux
Steps to Reproduce
- Start Odysseus with the bundled SearXNG (
docker compose up -d), stockconfig/searxng/settings.yml,SEARXNG_GENERAL_ENGINESunset. - Run the queries Odysseus sends directly against SearXNG (host port 8080 by default), once with the pinned language and once without. Only Bing is enabled to match the situation where the other pinned engines are blocked:
Q='Saugroboter+mit+Wasserwechselstation+Preis+2026+Deutschland+Stra%C3%9Fenpreis+iRobot+Roomba+Ecovacs+Dreame+Roborock'
#-- (a) exactly what providers.py sends (language=en, safesearch=2, engines=bing)
curl -s "http://127.0.0.1:8080/search?q=$Q&format=json&categories=general&engines=bing&language=en&safesearch=2" \
| python3 -c 'import sys,json; [print(r["url"]) for r in json.load(sys.stdin)["results"][:5]]'
#-- (b) same query, language=de
curl -s "http://127.0.0.1:8080/search?q=$Q&format=json&categories=general&engines=bing&language=de&safesearch=2" \
| python3 -c 'import sys,json; [print(r["url"]) for r in json.load(sys.stdin)["results"][:5]]'
#-- (c) same query, no language parameter
curl -s "http://127.0.0.1:8080/search?q=$Q&format=json&categories=general&engines=bing&safesearch=2" \
| python3 -c 'import sys,json; [print(r["url"]) for r in json.load(sys.stdin)["results"][:5]]'- Compare the URLs: (a) returns unrelated pages that change on every call, (b) and (c) return robot-vacuum test pages.
- For the end-to-end effect, start a Deep Research with a German prompt and read
app.log/data/deep_research/rp-*.json(see below).
Observed (three consecutive runs of (a), then (b) and (c)):
-- language=en, run 1
https://www.facebook.com/Budissa.Bautzen/
https://www.budissa-bautzen.de/
https://www.facebook.com/budissa.bautzen.9/
-- language=en, run 2
(0 results)
-- language=en, run 3
https://support.google.com/youtubetv/?hl=en
https://support.google.com/youtubetv/answer/7129768?hl=en&co
https://www.zhihu.com/question/1903231775980913051
-- language=en, safesearch=0
https://support.microsoft.com/en-gb/contactus
https://support.microsoft.com/de-de/accounts-billing/manage/
-- language=en, safesearch=1
https://www.google.pl/index.html
https://www.google.com/?hl=pl
-- language=de (also identical for language=de-DE, language=all, and no language)
https://www.test.de/Saugroboter-im-Test-4806685-0/
https://www.chip.de/test-kaufberatung/haushalt-garten/staubsaugerroboter-test-...
https://www.faz.net/kaufkompass/test/der-beste-saugroboter/
https://www.smarthomeassistent.de/saugroboter/
https://www.mediamarkt.de/de/category/saugroboter-90.htmlSo the safesearch level does not matter; the language=en pin alone flips Bing from correct
results to random ones. An English query (robot vacuum water refill station review 2026)
with language=en returns sensible results, which is presumably why the pin looked fine
during development.
To see the end-to-end effect, start a Deep Research with a German prompt on an instance whose
non-Bing engines are blocked. app.log then shows e.g.
src.deep_research - INFO - Round 1 queries: ['Saug-Wisch-Roboter 2026 Deutschland Multifunktionsstation ...', ...]
httpx - INFO - HTTP Request: GET http://searxng:8080/search?q=Saugroboter+...&format=json&language=en&safesearch=2&categories=general&engines=bing%2Cmojeek%2Cpresearch "HTTP/1.1 200 OK"
services.search.providers - INFO - SearXNG JSON API returned 10 results for: Saugroboter ...
httpx - INFO - HTTP Request: GET https://chatgpt.com/ "HTTP/1.1 403 Forbidden"
httpx - INFO - HTTP Request: GET https://en.wikipedia.org/wiki/ChatGPT "HTTP/1.1 200 OK"
httpx - INFO - HTTP Request: GET https://www.youtube.com/ "HTTP/1.1 200 OK"
src.deep_research - INFO - Skipping low-quality extraction from https://en.wikipedia.org/wiki/ChatGPT
src.deep_research - INFO - Round 1: extracted 5 findingsand the saved data/deep_research/rp-*.json has raw_findings whose summaries all begin with
"The provided webpage is completely irrelevant to the research goal …".
Expected Behaviour
Search results in the language of the query, or at least the SearXNG default behaviour
(language=all) when the query is not English. A non-English Deep Research should not be
silently degraded to random pages.
Actual Behaviour
Every SearXNG request carries language=en. For non-English queries Bing returns unrelated
pages, and since those are non-empty, none of the three fallbacks in searxng_search_api()
(news → general, drop language, drop engines) is triggered. The report and its images are
built from the unrelated pages.
Logs / Screenshots
Model / Backend (if relevant)
No response
Are you willing to submit a fix?
Yes — I can open a PR
Additional Information
searxng_search_api() in services/search/providers.py sends language=en with every
SearXNG request and offers no way to change that (no setting, no environment variable). With
that pin, Bing answers a German multi-word query with ten random pages (Google landing
pages, Baidu Zhidao, a football club's Facebook page, Telekom e-mail help articles — a
different set on every call) instead of returning nothing. Because the response is non-empty,
the "retry without language" fallback on line 218 never fires, and the junk goes straight
into extraction, synthesis and the visual report.
The same query with language=de, language=all, or without a language parameter returns
the expected results (Stiftung Warentest, chip.de, FAZ, Mediamarkt).
On a self-hosted instance where the other engines of _GENERAL_ENGINES (bing,mojeek,presearch)
and the SearXNG defaults are blocked (mojeek 403, presearch 530, brave 429, duckduckgo and
startpage CAPTCHA — the state the comment above line 132 describes), Bing is the only source,
so every non-English Deep Research run produces a report about nothing. The model even notices:
each extracted finding says "The provided webpage is completely irrelevant to the research goal",
and the final report states that the search returned no usable results. The section images in the
visual report are the og:image of the random pages (a ChatGPT logo, a YouTube thumbnail, a car
maker's navigation-update page).
Environment
- Odysseus
mainat commit451900fc151554f4c8654d1e4d3dadc1d029b047451900f (2026-08-25) (v1.0.3 hotfix line), self-hosted viadocker compose up -d --build; behaviour verified unchanged in currentmain(services/search/providers.pylines 132, 157, 206, 218–220 as of 2026-09-23). - Bundled SearXNG
docker.io/searxng/searxng:2026.5.31-7159b8aed, stockconfig/searxng/settings.yml(use_default_settings: true, onlyjsonformat added). research_search_providerunset →search_providerdefaultsearxng;SEARXNG_GENERAL_ENGINESunset →bing,mojeek,presearch;search_safesearchdefaultstrict.- Chat model: Qwen3.8-27B via an OpenAI-compatible endpoint (irrelevant to the bug — the queries the model generated were fine; the search layer replaced their results).
- UI language / user locale: German; research prompt in German.
Where in the code
services/search/providers.py:
- line 157:
"language": "en"in the baseparamsfor every search, with the comment "Pin English for ALL searches"; line 206 repeats it in the news → general fallback. - lines 218–220: the fallback that drops
languageonly runs whenparsedis empty — Bing's random results are not empty, so it never runs for this case. - line 132:
_GENERAL_ENGINESdefaults tobing,mojeek,presearch. When mojeek and presearch are blocked (as they are here), Bing is the sole source and its behaviour decides everything.
src/deep_research.py _search() forwards to the same function through _call_provider,
so Deep Research and the web_search agent tool are affected alike.
Suggested fix
Any one of these would resolve the case; the first two are small:
- Make the language configurable and default to not pinning it. E.g. a
SEARXNG_LANGUAGEenvironment variable and/or asearch_languagesetting next tosearch_safesearch, withall(SearXNG default) orautoas default andenas an opt-in for instances that need the English pin the comment describes. - Derive the language from the query or the user's UI locale instead of a constant — the agent layer already has the UI language, and Deep Research knows the prompt language.
- Treat "results, but none of them mention the query terms" as a failed search in
searxng_search_api(), so the existing "retry without language" fallback fires for this case too. This is the defensive variant that would also catch other engines that answer with filler instead of an error.
Happy to test a patch on the instance above; the reproduction is deterministic within a few
runs and takes one curl.
Source: odysseus-dev/odysseus