fix(models): OpenRouter disk snapshot follows the configured catalog TTL, not the default constant

refresh_interval_seconds() honours model_catalog.ttl_minutes / legacy ttl_hours;
reading DEFAULT_TTL_MINUTES would let the snapshot and the manifest it is
filtered from go stale on different clocks for anyone who changed the TTL.
This commit is contained in:
kshitijk4poor
2026-09-09 21:08:22 +05:30
committed by kshitij
parent 441157f184
commit 1eaeb73839
+3 -2
View File
@@ -154,9 +154,10 @@ _openrouter_catalog_cache: list[tuple[str, str]] | None = None
def _openrouter_catalog_disk_ttl() -> float:
from hermes_cli.model_catalog import DEFAULT_TTL_MINUTES
"""Same TTL as the catalog manifest this list is filtered from (honours ``model_catalog.ttl_minutes``)."""
from hermes_cli.model_catalog import refresh_interval_seconds
return DEFAULT_TTL_MINUTES * 60.0
return refresh_interval_seconds()
def _openrouter_catalog_disk_path() -> Path: