feat: add self-hosted SearXNG research mode
CI / compose (push) Successful in 13m39s

This commit is contained in:
Marco0300
2026-09-03 21:49:02 +02:00
parent 0f70674b16
commit d298a98723
11 changed files with 175 additions and 42 deletions
+6 -7
View File
@@ -31,13 +31,12 @@ The provider status is available at authenticated `GET
`/api/v1/discovery/provider-status` alias is retained). Configure only on the
server. The native Nous adapter uses OpenAI-compatible Chat Completions at
`https://inference-api.nousresearch.com/v1/chat/completions` and strict
`web_search`/`scrape_website` tools backed by an allowlisted Firecrawl-compatible
API. Configure server-side `NOUS_API_KEY`, `NOUS_MODEL`, `NOUS_BASE_URL`,
`NOUS_ALLOWED_HOSTS`, `FIRECRAWL_API_KEY`, `FIRECRAWL_BASE_URL`, and
`FIRECRAWL_ALLOWED_HOSTS` with `AI_RESEARCH_PROVIDER=nous_portal`. Tool calls,
responses, criteria, and results are bounded; page text is untrusted; only
structured HTTPS targets are accepted and the existing SSRF-safe crawler fetches
and persists evidence. Status is fail-closed and never returns secrets.
`web_search`/`scrape_website` tools. In the primary no-paid-scraper mode,
`web_search` uses internal SearXNG (`SEARXNG_BASE_URL`, normally
`http://searxng:8080`) and `scrape_website` uses the existing SSRF-safe scanner;
configure server-side `NOUS_API_KEY`, `NOUS_MODEL`, `NOUS_BASE_URL`,
`NOUS_ALLOWED_HOSTS`, `SEARXNG_ALLOWED_HOSTS`, and `SEARXNG_SECRET_KEY`.
Firecrawl settings are optional legacy compatibility only.
All protected endpoints require the server-side session cookie. Every query is constrained by the authenticated user's `organization_id`; IDs from another tenant behave as not found and must not disclose whether a record exists.