From ee0c38da66457eb1e4c688adc74dc978747fbd79 Mon Sep 17 00:00:00 2001 From: buua436 <66937541+buua436@users.noreply.github.com> Date: Thu, 9 Oct 2025 16:56:23 +0800 Subject: [PATCH] fix:update searxng_url logic (#10440) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ### What problem does this PR solve? issue: [#10417](https://github.com/infiniflow/ragflow/issues/10417) change: Adjusted the `searxng_url` priority logic to ensure the frontend-provided URL takes precedence over the model’s default configuration. This allows user-specified SearXNG endpoints to be correctly applied during execution, improving flexibility across different environments. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- agent/tools/searxng.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/tools/searxng.py b/agent/tools/searxng.py index f8c30bfd1..32e807585 100644 --- a/agent/tools/searxng.py +++ b/agent/tools/searxng.py @@ -85,7 +85,7 @@ class SearXNG(ToolBase, ABC): self.set_output("formalized_content", "") return "" - searxng_url = (kwargs.get("searxng_url") or getattr(self._param, "searxng_url", "") or "").strip() + searxng_url = (getattr(self._param, "searxng_url", "") or kwargs.get("searxng_url") or "").strip() # In try-run, if no URL configured, just return empty instead of raising if not searxng_url: self.set_output("formalized_content", "")