mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix(memory): retry failed config schema loads instead of caching None
A syntax error in a provider's config_schema.py was cached as 'no schema' until process restart, rendering a silent empty panel even after the file was fixed. Cache only successful loads and genuine file-absence.
This commit is contained in:
parent
0e09cc5cd4
commit
41e59f6126
2 changed files with 30 additions and 0 deletions
|
|
@ -132,7 +132,10 @@ def get_provider_config_schema(name: str) -> ProviderConfigSchema | None:
|
|||
spec.loader.exec_module(module)
|
||||
schema = getattr(module, "CONFIG_SCHEMA", None)
|
||||
except Exception:
|
||||
# A broken schema file must not cache: it would render as a silent
|
||||
# empty panel until process restart even after the file is fixed.
|
||||
_log.exception("failed to load config schema for memory provider %r", name)
|
||||
return None
|
||||
|
||||
_SCHEMA_CACHE[name] = schema
|
||||
return schema
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue