Added
-
Result count control:
num_resultsparameter onsearxng_web_search(1–20) lets callers request only as many results as they need.SEARXNG_MAX_RESULTSenv var sets an operator-level hard cap that applies even whennum_resultsis omitted — useful for reducing token spend across all callers. -
Token budget limits:
SEARXNG_MAX_RESULT_CHARSenv var truncates each search result snippet to a character limit (appending…) before returning.URL_READ_MAX_CHARSenv var sets a defaultmaxLengthfor URL reads when the caller omits it — both controls are recommended for local models with small context windows. -
HEAD preflight for URL reader: A fast HEAD request is made before every URL fetch to check
Content-Length. If the server reports a size aboveURL_READ_MAX_CONTENT_LENGTH_BYTES(default 5 MB), the download is blocked and a descriptive message withreadHeadings/sectionpagination hints is returned instead of downloading an unbounded body. -
categoriesparameter onsearxng_web_search: Routes searches to specific SearXNG categories —general,news,images,videos,it,science,files,social media. Omitting the parameter uses the SearXNG instance default (general). -
Configurable search defaults:
SEARXNG_DEFAULT_LANGUAGEandSEARXNG_DEFAULT_SAFESEARCHenv vars set operator-level defaults for language and safe-search level. Per-call parameters still take precedence. InvalidSEARXNG_DEFAULT_SAFESEARCHvalues (not0,1, or2) are logged and ignored. -
Configurable timeouts:
SEARXNG_TIMEOUT_MScontrols the search request timeout andFETCH_TIMEOUT_MScontrols the URL reader fetch timeout (both default to10000ms). -
Lite tool schemas (
SEARXNG_LITE_TOOLS=true): When set, registers minimalquery-only andurl-only tool schemas instead of the full parameter list. Reduces context overhead for local models with small context windows while still forwarding any extra arguments the caller provides.
Security
- Pinned the npm trusted publishing installer step in the publish workflow to a full commit SHA to guard against tag-swap supply-chain attacks.
Full Changelog: v1.3.4...v1.4.0