This commit is contained in:
@@ -66,7 +66,10 @@ def _config():
|
||||
nous_key = credentials.get("step_api_key", credentials.get("nous_api_key", "")) if provider in STEPFUN_PROVIDER_IDS else credentials.get("nous_api_key", "")
|
||||
return {"provider": provider, "model": row["model"], "nous_url": row["nous_base_url"], "nous_allowed": {urlparse(row["nous_base_url"]).hostname}, "nous_key": nous_key, "searxng_url": row["firecrawl_base_url"] if row["firecrawl_base_url"].startswith("http://searxng") else os.environ.get("SEARXNG_BASE_URL", "").strip(), "searxng_allowed": _hosts("SEARXNG_ALLOWED_HOSTS", "searxng"), "firecrawl_url": row["firecrawl_base_url"], "firecrawl_allowed": {urlparse(row["firecrawl_base_url"]).hostname}, "firecrawl_key": credentials.get("firecrawl_api_key", "")}
|
||||
except Exception:
|
||||
return {"provider": "", "model": "", "endpoint": "", "allowed": set(), "api_key": ""}
|
||||
# A removed/legacy database must not poison subsequent server or test
|
||||
# contexts. Fall back to the explicit environment configuration, which
|
||||
# is still validated fail-closed by _endpoint().
|
||||
pass
|
||||
provider = os.environ.get("AI_RESEARCH_PROVIDER", "").strip().lower()
|
||||
# Nous uses its conventional key directly; no gateway or key translation is needed.
|
||||
nous_key = os.environ.get("NOUS_API_KEY", "").strip()
|
||||
|
||||
Reference in New Issue
Block a user