This commit is contained in:
2026-03-21 22:56:37 -07:00
parent b183167a64
commit f8c98b39bd
4 changed files with 304 additions and 82 deletions

View File

@@ -353,19 +353,35 @@ def list_configured_backend_names(config: Optional[Dict[str, Any]]) -> list[str]
without triggering backend initialization (which may perform network calls).
Behaviour:
- For each configured store type, returns the per-instance NAME override (case-insensitive)
when present, otherwise the instance key.
- Only includes store types that map to a discovered save backend class.
- Skips folder/provider-only/unknown entries so UI pickers do not surface
non-ingest destinations such as provider helpers.
- For each configured store type, returns the per-instance NAME override
(case-insensitive) when present, otherwise the instance key.
"""
try:
store_cfg = (config or {}).get("store") or {}
if not isinstance(store_cfg, dict):
return []
classes_by_type = _discover_store_classes()
names: list[str] = []
for raw_store_type, instances in store_cfg.items():
if not isinstance(instances, dict):
continue
store_type = _normalize_store_type(str(raw_store_type))
if store_type == "folder" or store_type in _PROVIDER_ONLY_STORE_NAMES:
continue
store_cls = classes_by_type.get(store_type)
if store_cls is None:
continue
for instance_name, instance_config in instances.items():
try:
_build_kwargs(store_cls, str(instance_name), instance_config)
except Exception:
continue
if isinstance(instance_config, dict):
override_name = _get_case_insensitive(dict(instance_config), "NAME")
if override_name: