This commit is contained in:
@@ -496,7 +496,7 @@ class ApiHandler(BaseHTTPRequestHandler):
|
||||
except Exception: old = {}
|
||||
for name in ("nous_api_key", "firecrawl_api_key"):
|
||||
if name not in credentials and name in old: credentials[name] = old[name]
|
||||
if config["enabled"] and any(name not in credentials for name in ("nous_api_key", "firecrawl_api_key")):
|
||||
if config["enabled"] and ("nous_api_key" not in credentials or ("SEARXNG_BASE_URL" not in os.environ and "firecrawl_api_key" not in credentials)):
|
||||
return self.send_json(400, {"error": "provider_credentials_required"})
|
||||
ciphertext = encrypt_provider_secret(json.dumps(credentials, sort_keys=True)) if credentials else ""
|
||||
fingerprint = hashlib.sha256(json.dumps(credentials, sort_keys=True).encode()).hexdigest() if credentials else ""
|
||||
|
||||
Reference in New Issue
Block a user