fix(web): honor Hermes config-aware SEARXNG_URL lookup#34306
Open
Kailigithub wants to merge 1 commit into
Open
fix(web): honor Hermes config-aware SEARXNG_URL lookup#34306Kailigithub wants to merge 1 commit into
Kailigithub wants to merge 1 commit into
Conversation
Collaborator
This was referenced May 29, 2026
kshitijk4poor
added a commit
that referenced
this pull request
Jun 7, 2026
…s Hermes config Follow-up to #34306. The provider fix made SearXNG *usable* with a config-only SEARXNG_URL, but tools/web_tools._has_env still read raw os.getenv, so the backend auto-detect cascade and check_web_api_key remained blind to it — SearXNG worked when explicitly selected but was never auto-selected. Route _has_env (and the SearXNG diagnostic print) through a config-aware _env_value helper mirroring the provider's _searxng_url(). Fixing the shared helper covers every provider key in one place. Adds regression tests for config-only auto-detect and check_web_api_key. See #34290.
kshitijk4poor
added a commit
that referenced
this pull request
Jun 7, 2026
…nv-34306 fix(web): honor Hermes config-aware SEARXNG_URL lookup (salvage #34306 + auto-detect follow-up)
changman
pushed a commit
to changman/hermes-agent
that referenced
this pull request
Jun 10, 2026
…s Hermes config Follow-up to NousResearch#34306. The provider fix made SearXNG *usable* with a config-only SEARXNG_URL, but tools/web_tools._has_env still read raw os.getenv, so the backend auto-detect cascade and check_web_api_key remained blind to it — SearXNG worked when explicitly selected but was never auto-selected. Route _has_env (and the SearXNG diagnostic print) through a config-aware _env_value helper mirroring the provider's _searxng_url(). Fixing the shared helper covers every provider key in one place. Adds regression tests for config-only auto-detect and check_web_api_key. See NousResearch#34290.
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
…s Hermes config Follow-up to #34306. The provider fix made SearXNG *usable* with a config-only SEARXNG_URL, but tools/web_tools._has_env still read raw os.getenv, so the backend auto-detect cascade and check_web_api_key remained blind to it — SearXNG worked when explicitly selected but was never auto-selected. Route _has_env (and the SearXNG diagnostic print) through a config-aware _env_value helper mirroring the provider's _searxng_url(). Fixing the shared helper covers every provider key in one place. Adds regression tests for config-only auto-detect and check_web_api_key. See #34290.
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
…nv-34306 fix(web): honor Hermes config-aware SEARXNG_URL lookup (salvage #34306 + auto-detect follow-up)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a configuration consistency bug where the SearXNG web search provider only checked
os.getenv("SEARXNG_URL"), ignoring values set through Hermes' config-aware env handling (.envfiles,hermes config set, etc.).Problem
SearXNGWebSearchProviderreadsSEARXNG_URLusingos.getenv()directly in bothis_available()andsearch(). WhenSEARXNG_URLis configured through Hermes' own env handling (which populates the Hermes config layer but not necessarily the raw process env), SearXNG reports unavailable even though it is correctly configured.Solution
Introduce
_searxng_url()helper that checks Hermes config-aware env first viaget_env_value(), then falls back toos.getenv(). Bothis_available()andsearch()now use this helper.The fallback preserves backward compatibility: if Hermes config lookup fails for any reason, the code gracefully degrades to raw process env.
Verification
python3 -m py_compile plugins/web/searxng/provider.pypassesruff check plugins/web/searxng/provider.pypasses (no issues)Closes #34290