mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 14:22:47 +02:00
fix(multi-agent): fail closed when connector discovery raises
This commit is contained in:
parent
73272ce348
commit
bba5fb1db8
1 changed files with 12 additions and 1 deletions
|
|
@ -85,7 +85,18 @@ async def create_surfsense_deep_agent(
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logging.warning("Failed to discover available connectors/document types: %s", e)
|
logging.warning(
|
||||||
|
"Connector/doc-type discovery failed; excluding connector subagents this turn: %s",
|
||||||
|
e,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Fail closed: a None list short-circuits ``get_subagents_to_exclude`` to "exclude
|
||||||
|
# nothing", which would silently advertise every connector specialist on a flaky
|
||||||
|
# discovery call. Empty list excludes connector-gated subagents while keeping builtins.
|
||||||
|
if available_connectors is None:
|
||||||
|
available_connectors = []
|
||||||
|
if available_document_types is None:
|
||||||
|
available_document_types = []
|
||||||
_perf_log.info(
|
_perf_log.info(
|
||||||
"[create_agent] Connector/doc-type discovery in %.3fs",
|
"[create_agent] Connector/doc-type discovery in %.3fs",
|
||||||
time.perf_counter() - _t0,
|
time.perf_counter() - _t0,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue